DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
System calls and libraries

General purpose library (libgen)

libgen contains general purpose functions, and functions designed to facilitate internationalization. These are described on the Section S manual pages. ``libgen functions'' describes functions in libgen. The header files <libgen.h> and, occasionally, <regexp.h> should be included in programs that use these functions.

libgen functions

advance step Execute a regular expression on a string.
basename Return a pointer to the last element of a path name.
bgets Read a specified number of characters into a buffer from a stream until a specified character is reached.
bufsplit Split the buffer into fields delimited by tabs and new-lines.
compile Return a pointer to a compiled regular expression that uses the same syntax as ed.
copylist Copy a file into a block of memory, replacing new-lines with null characters. It returns a pointer to the copy.
dirname Return a pointer to the parent directory name of the file path name.
eaccess Determine if the effective user ID has the appropriate permissions on a file.
gmatch Check if name matches shell file name pattern.
isencrypt Use heuristics to determine if contents of a character buffer are encrypted.
mkdirp Create a directory and its parents.
p2open p2close p2open is similar to popen (see popen(S)). It establishes a two-way connection between the parent and the child. p2close closes the pipe.
pathfind Search the directories in a given path for a named file with given mode characteristics. If the file is found, a pointer is returned to a string that corresponds to the path name of the file. A null pointer is returned if no file is found.
regcmp Compile a regular expression and return a pointer to the compiled form.
regex Compare a compiled regular expression against a subject string.
rmdirp Remove the directories in the specified path.
strccpy strcadd strccpy copies the input string to the output string, compressing any C-like escape sequences to the real character. strcadd is a similar function that returns the address of the null byte at the end of the output string.
strecpy Copy the input string to the output string, expanding any non-graphic characters with the C escape sequence. Characters in a third argument are not expanded.
strfind Return the offset of the first occurrence of the second string in the first string. -1 is returned if the second string does not occur in the first.
strrspn Trim trailing characters from a string. It returns a pointer to the last character in the string not in a list of trailing characters.
strtrns Return a pointer to the string that results from replacing any character found in two strings with a character from a third string. This function is similar to the tr command.


Next topic: Standard I/O library
Previous topic: Math functions

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005