Intro(3G)
Intro --
introduction to general library routines
Synopsis
cc . . . -lgen
#include <libgen.h>
Description
This section contains manual pages for the routines in
the libgen general-purpose library.
This library is not implemented as a shared object
and is not automatically linked by the C compilation
system. Specify -lgen on the
cc(1)
command line to link with this library.
Files
LIBDIRlibgen.a libgen library (archive)
Return values
For functions that return a floating-point value, if an error occurs,
the value of errno will be one of the values represented by the manifest
constants EDOM or ERANGE (defined in math.h).
EDOM typically indicates a domain error: one of the input values
was not in the domain of the function.
ERANGE typically indicates a range error: the calculated result
was either too big or too small to be represented by the data type
returned by the function.
Functions that result in a range error typically return zero for underflow
or a value that will compare equal to ±HUGE_VAL for overflow.
HUGE_VAL is defined in math.h.
On systems that support IEEE infinity, HUGE_VAL is infinity.
If the system supports IEEE NaN (not-a-number), functions that
result in a domain error typically return NaN.
Such functions may also raise one of the IEEE floating-point exceptions.
On systems that do not support IEEE NaN, functions
that result in a domain error typically return zero.
The error behavior for programs compiled with the -Xt (transitional)
compilation mode is different (see
cc(1)).
In that case, these functions typically return zero instead
of IEEE NaN for domain errors and a value that will compare
equal to ±HUGE instead of ±HUGE_VAL for overflows.
HUGE is defined in math.h.
Definitions
A character (except a multibyte character; see
mbchar(3C))
is any bit pattern able to fit into a byte on the machine.
The null character is a character with value 0, conventionally
represented in the C language as \0.
A character array is a sequence of characters.
A null-terminated character array (a ``string'')
is a sequence of characters, the last of which is the null character.
The null string is a character array containing only the terminating
null character.
A NULL pointer is the value that is obtained by casting
0 into a pointer.
C guarantees that this value will not match that of any legitimate
pointer, so many functions that return pointers return NULL
to indicate an error.
The macro NULL is defined in stdio.h.
Types of the form size_t are defined in the appropriate header files.
References
cc(1)
Standards conformance
The following are conformant with X/Open Portability Guide, Issue 4, Version 2
(UNIX95):
advance(3G),
basename(3G),
closelog(3G),
compile(3G),
dirname(3G),
encrypt(3G),
endutxent(3G),
getutxent(3G),
openlog(3G),
pututxline(3G),
regcmp(3G),
setkey(3G),
setlogmask(3G),
setutxent(3G),
step(3G)
The remaining routines are not part of any currently supported standard.
They are an extension of AT&T System V provided by the Santa
Cruz Operation.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004