INTRO(3) — System Interface Manual — Subroutines
NAME
intro − introduction to library functions
DESCRIPTION
This section describes functions that may be found in various libraries. The library functions are those other than the functions which directly invoke UNIX system primitives, described in section 2. This section has the libraries physically grouped together. This is a departure from older versions of the UNIX Programmer’s Reference Manual, which did not group functions by library. The functions described in this section are grouped into various libraries:
(3) and (3S)
The straight “3” functions are the standard C library functions. The C library also includes all the functions described in section 2. The 3S functions comprise the standard I/O library. All of these functions constitute library libc, which is automatically loaded by the C compiler cc(1) and the Fortran compiler f77(1). The link editor ld(1) searches this library under the ‘−lc’ option. Declarations for some of these functions may be obtained from include files indicated on the appropriate pages.
(3F) The 3F functions are all functions callable from FORTRAN. These functions perform the same jobs as do the straight “3” functions.
(3J) These functions are part of the job control facilities, contained in the library “−ljobs.” The job control facilities are outlined in jobs(3J).
(3M) These functions constitute the math library, libm. They are automatically loaded as needed by the Fortran compiler f77(1). The link editor searches this library under the ‘−lm’ option. Declarations for these functions may be obtained from the include file <math.h>.
(3N) These functions constitute the internet network library,
(3S) These functions constitute the ‘standard I/O package’, see stdio(3S). These functions are in the library libc already mentioned. Declarations for these functions may be obtained from the include file <stdio.h>.
(3X) Various specialized libraries have not been given distinctive captions. Files in which such libraries are found are named on appropriate pages.
FILES
/lib/libc.a
/lib/libm.a, /usr/lib/libm.a (one or the other)
/usr/lib/libjobs.a
SEE ALSO
stdio(3), nm(1), ld(1), cc(1), f77(1), intro(2)
DIAGNOSTICS
Functions in the math library (3M) may return conventional values when the function is undefined for the given arguments or when the value is not representable. In these cases the external variable errno (see intro(2)) is set to the value EDOM (domain error) or ERANGE (range error). The values of EDOM and ERANGE are defined in the include file <math.h>.
LIST OF FUNCTIONS
The functions listed below are those available in the C library. Function names which are indented below others appear on the same manual page as the one which they are indented from. For example, setkey appears on the same manual page as does crypt, but it is crypt which actually appears at the head of the manual page.
abortgenerate a fault
absinteger absolute value
atofconvert ASCII to numbers
atoiconvert ASCII to numbers (see atof.3)
atolconvert ASCII to numbers (see atof.3)
cryptDES encryption
setkeyDES encryption (see crypt.3)
encryptDES encryption (see crypt.3)
ctime convert date and time to ASCII
localtime convert date and time to ASCII (see ctime.3)
gmtime convert date and time to ASCII (see ctime.3)
asctime convert date and time to ASCII (see ctime.3)
timezone convert date and time to ASCII (see ctime.3)
ctypecharacter classification
isalphatest character is alphabetic (see ctype.3)
isuppertest character is upper case (see ctype.3)
islowertest character is lower case (see ctype.3)
isdigittest character is digit (see ctype.3)
isalnumtest character is letter or digit (see ctype.3)
isspacetest character is whitespace (see ctype.3)
ispuncttest character is punctuation (see ctype.3)
isprinttest character is printable (see ctype.3)
iscntrltest character is a control character (see ctype.3)
isasciitest character is ASCII (see ctype.3)
ecvtoutput conversion
fcvtoutput conversion (see ecvt.3)
gcvtoutput conversion (see ecvt.3)
endlast locations in program
etextlast locations in program (see end.3)
edatalast locations in program (see end.3)
frexpsplit into mantissa and exponent
ldexpsplit into mantissa and exponent (see frexp.3)
modfsplit into mantissa and exponent (see frexp.3)
getenvvalue for environment name
getfsentfile system descriptor file entry
getfsspecfile system descriptor file entry (see getfsent.3)
getfsfilefile system descriptor file entry (see getfsent.3)
setfsentfile system descriptor file entry (see getfsent.3)
endfsentfile system descriptor file entry (see getfsent.3)
getgrentgroup file entry
getgrgidgroup file entry (see getgrent.3)
getgrnamgroup file entry (see getgrent.3)
setgrentgroup file entry (see getgrent.3)
endgrentgroup file entry (see getgrent.3)
getloginlogin name
getpassread a password
getpwget name from uid
getpwentpassword file entry
getpwuidpassword file entry (see getpwent.3)
getpwnampassword file entry (see getpwent.3)
setpwentpassword file entry (see getpwent.3)
endpwentpassword file entry (see getpwent.3)
introintroduction to library functions
mallocmain memory allocator
freemain memory allocator (see malloc.3)
reallocmain memory allocator (see malloc.3)
callocmain memory allocator (see malloc.3)
mktempmake a unique file name
monitorprepare execution profile
monstartupprepare execution profile (see monitor.3)
nlistget entries from name list
perrorsystem error messages
sys_errlist, sys_nerrsystem error messages (see perror.3)
sys_nerrsystem error messages (see perror.3)
qsortquicker sort
randrandom number generator
srandrandom number generator (see rand.3)
randombetter random number generator
srandombetter random number generator (see random.3)
initstateroutines for changing generators
setstateroutines for changing generators (see initstate.3)
re_compregular expression handler
re_execregular expression handler (see re_comp.3)
scandirscan a directory
setjmpnon-local goto
longjmpnon-local goto (see setjmp.3)
sleepsuspend execution for interval
stringstring operations
strcatconcatenate null terminated strings (see string.3)
strncatconcatenate n characters (see string.3)
strcmpcompare strings (see string.3)
strncmpcompare n characters (see string.3)
strcpycopy string (see string.3)
strncpycopy n characters (see string.3)
strlenobtain string length (see string.3)
indexfind first occurrence of character in string (see string.3)
rindexfind last occurrence of character in string (see string.3)
swabswap bytes
systemissue a shell command
ttynamefind name of a terminal
vallocaligned memory allocator
varargsvariable argument list
Sun System Release 0.3 — 19 January 1983