Miscellaneous Utility Functions
char *ucase (char *string);
string string to convert
This function converts each lowercase character of the specified
string to uppercase and returns the string.
char *lcase (char *string);
string string to convert
This function converts each uppercase character of the specified
string to lowercase and returns the string.
char *cpystr (char *string);
string string to copy
This function makes a copy of the string from free storage and returns
the copy.
long find_rightmost_bit (long *valptr);
valptr pointer to value to search
This function returns -1 if the 32-bit value pointed to by valptr
is non-zero, otherwise it returns the bit number (0 = LSB, 31 = MSB) of
the right-most bit in that value. This is used to convert from the bits
in the cache's userflags item to an index into the stream's userFlags
array of flag texts.
long min (long i,long j);
i first argument
j second argument
This function returns the minimum of the two integers.
long max (long i,long j);
i first argument
j second argument
This function returns the maximum of the two integers.
long search (char *s,long c,char *pat,long patc);
s string to search
c size of string
pat pattern to search in string
patc size of pattern
This function does a fast case-independent search for the given
pattern in pat (length patc) in base string s, and returns T if the
pattern is found in the string.
long pmatch (char *s,char *pat,delim);
long pmatch_full (char *s,char *pat,delim);
s string to match
pat wildcard (* and %) to match in pattern
delim hierarchy delimiter
This function returns T if the given wildcard pattern matches the
string in s with hierarchy delimiter delim. Otherwise NIL is returned.
long dmatch (char *s,char *pat,char delim);
s string to match
pat wildcard (* and %) to match in pattern
delim hierarchy delimiter
This function returns T if the given wildcard pattern matches the
directory. If not, then none of the elements in the directory are
considered for recursive checking with pmatch_full().