INTRO(3)
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. 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. Together with the (3N), (3X), and (3C) routines, these functions constitute library libc, which is automatically loaded by the C compiler cc(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.
(3M) These functions constitute the math library, libm. They are automatically loaded as needed. 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 intro(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.
(3C) Routines included for compatibility with other systems. In particular, a number of system call interfaces provided in previous releases of 4BSD have been included for source code compatibility. The manual page entry for each compatibility routine indicates the proper interface to use.
FILES
/lib/libc.a
/usr/lib/libm.a
/usr/lib/libc_p.a
/usr/lib/libm_p.a
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
NameAppears on PageDescription
abortabort.3generate a fault
absabs.3integer absolute value
acossin.3mtrigonometric functions
alarmalarm.3cschedule signal after specified time
asctimectime.3convert date and time to ASCII
asinsin.3mtrigonometric functions
assertassert.3xprogram verification
atansin.3mtrigonometric functions
atan2sin.3mtrigonometric functions
atofatof.3convert ASCII to numbers
atoiatof.3convert ASCII to numbers
atolatof.3convert ASCII to numbers
cabshypot.3mEuclidean distance
callocmalloc.3memory allocator
ceilfloor.3mabsolute value, floor, ceiling functions
clearerrferror.3sstream status inquiries
closedirdirectory.3directory operations
cossin.3mtrigonometric functions
coshsinh.3mhyperbolic functions
ctimectime.3convert date and time to ASCII
cursescurses.3xscreen functions with “optimal”
cursor motion
dbminitdbm.3xdatabase subroutines
deletedbm.3xdatabase subroutines
ecvtecvt.3output conversion
edataend.3last locations in program
endend.3last locations in program
endgrentgetgrent.3get group file entry
endhostentgethostent.3nget network host entry
endnetentgetnetent.3nget network entry
endprotoentgetprotoent.3nget protocol entry
endpwentgetpwent.3get password file entry
endserventgetservent.3nget service entry
environexecl.3execute a file
etextend.3last locations in program
execexecl.3execute a file
execeexecl.3execute a file
execlexecl.3execute a file
execleexecl.3execute a file
execlpexecl.3execute a file
exectexecl.3execute a file
execvexecl.3execute a file
execvpexecl.3execute a file
exitexit.3terminate a process after flushing
any pending output
expexp.3mexponential, logarithm, power, square root
fabsfloor.3mabsolute value, floor, ceiling functions
fclosefclose.3sclose or flush a stream
fcvtecvt.3output conversion
feofferror.3sstream status inquiries
ferrorferror.3sstream status inquiries
fetchdbm.3xdatabase subroutines
fflushfclose.3sclose or flush a stream
fgetcgetc.3sget character or word from stream
fgetsgets.3sget a string from a stream
filenoferror.3sstream status inquiries
firstkeydbm.3xdatabase subroutines
floorfloor.3mabsolute value, floor, ceiling functions
fprintfprintf.3sformatted output conversion
fputcputc.3sput character or word on a stream
fputsputs.3sput a string on a stream
freadfread.3sbuffered binary input/output
freemalloc.3memory allocator
frexpfrexp.3split into mantissa and exponent
fscanfscanf.3sformatted input conversion
fseekfseek.3sreposition a stream
ftellfseek.3sreposition a stream
ftimetime.3cget date and time
fwritefread.3sbuffered binary input/output
gammagamma.3mlog gamma function
gcvtecvt.3output conversion
getcgetc.3sget character or word from stream
getchargetc.3sget character or word from stream
getenvgetenv.3value for environment name
getgrentgetgrent.3get group file entry
getgrgidgetgrent.3get group file entry
getgrnamgetgrent.3get group file entry
gethostbyaddrgethostent.3nget network host entry
gethostbynamegethostent.3nget network host entry
gethostentgethostent.3nget network host entry
getlogingetlogin.3get login name
getnetbyaddrgetnetent.3nget network entry
getnetbynamegetnetent.3nget network entry
getnetentgetnetent.3nget network entry
getpassgetpass.3read a password
getprotobynamegetprotoent.3nget protocol entry
getprotobynumbergetprotoent.3nget protocol entry
getprotoentgetprotoent.3nget protocol entry
getpwgetpw.3get name from uid
getpwentgetpwent.3get password file entry
getpwnamgetpwent.3get password file entry
getpwuidgetpwent.3get password file entry
getsgets.3sget a string from a stream
getservbynamegetservent.3nget service entry
getservbyportgetservent.3nget service entry
getserventgetservent.3nget service entry
getwgetc.3sget character or word from stream
getwdgetwd.3get current working directory pathname
gmtimectime.3convert date and time to ASCII
gttystty.3cset and get terminal state (defunct)
htonlbyteorder.3nconvert values between host and
network byte order
htonsbyteorder.3nconvert values between host and
network byte order
hypothypot.3mEuclidean distance
indexstring.3string operations
inet_addrinet.3nInternet address manipulation routines
inet_lnaofinet.3nInternet address manipulation routines
inet_makeaddrinet.3nInternet address manipulation routines
inet_netofinet.3nInternet address manipulation routines
inet_networkinet.3nInternet address manipulation routines
initgroupsinitgroups.3xinitialize group access list
initstaterandom.3better random number generator
insqueinsque.3insert/remove element from a queue
isalnumctype.3character classification macros
isalphactype.3character classification macros
isasciictype.3character classification macros
isattyttyname.3find name of a terminal
iscntrlctype.3character classification macros
isdigitctype.3character classification macros
islowerctype.3character classification macros
isprintctype.3character classification macros
ispunctctype.3character classification macros
isspacectype.3character classification macros
isupperctype.3character classification macros
ldexpfrexp.3split into mantissa and exponent
localtimectime.3convert date and time to ASCII
logexp.3mexponential, logarithm, power, square root
log10exp.3mexponential, logarithm, power, square root
longjmpsetjmp.3non-local goto
mallocmalloc.3memory allocator
mktempmktemp.3make a unique file name
modffrexp.3split into mantissa and exponent
nextkeydbm.3xdatabase subroutines
nicenice.3cset program priority
ntohlbyteorder.3nconvert values between host and
network byte order
ntohsbyteorder.3nconvert values between host and
network byte order
opendirdirectory.3directory operations
pausepause.3cstop until signal
pclosepopen.3initiate I/O to/from a process
perrorperror.3system error messages
popenpopen.3initiate I/O to/from a process
powexp.3mexponential, logarithm, power, square root
printfprintf.3sformatted output conversion
psignalpsignal.3system signal messages
putcputc.3sput character or word on a stream
putcharputc.3sput character or word on a stream
putsputs.3sput a string on a stream
putwputc.3sput character or word on a stream
qsortqsort.3quicker sort
randrand.3crandom number generator
randomrandom.3better random number generator
rcmdrcmd.3xroutines for returning a stream to
a remote command
re_compregex.3regular expression handler
re_execregex.3regular expression handler
readdirdirectory.3directory operations
reallocmalloc.3memory allocator
remqueinsque.3insert/remove element from a queue
rewindfseek.3sreposition a stream
rewinddirdirectory.3directory operations
rexecrexec.3xreturn stream to a remote command
rindexstring.3string operations
rresvportrcmd.3xroutines for returning a
stream to a remote command
ruserokrcmd.3xroutines for returning a
stream to a remote command
scandirscandir.3scan a directory
scanfscanf.3sformatted input conversion
seekdirdirectory.3directory operations
setbufsetbuf.3sassign buffering to a stream
setegidsetuid.3set user and group ID
seteuidsetuid.3set user and group ID
setgidsetuid.3set user and group ID
setgrentgetgrent.3get group file entry
sethostentgethostent.3nget network host entry
setjmpsetjmp.3non-local goto
setnetentgetnetent.3nget network entry
setprotoentgetprotoent.3nget protocol entry
setpwentgetpwent.3get password file entry
setrgidsetuid.3set user and group ID
setruidsetuid.3set user and group ID
setserventgetservent.3nget service entry
setstaterandom.3better random number generator
setuidsetuid.3set user and group ID
signalsignal.3simplified software signal facilities
sinsin.3mtrigonometric functions
sinhsinh.3mhyperbolic functions
sleepsleep.3suspend execution for interval
sprintfprintf.3sformatted output conversion
sqrtexp.3mexponential, logarithm, power, square root
srandrand.3crandom number generator
srandomrandom.3better random number generator
sscanfscanf.3sformatted input conversion
stdiointro.3sstandard buffered input/output package
storedbm.3xdatabase subroutines
strcatstring.3string operations
strcmpstring.3string operations
strcpystring.3string operations
strlenstring.3string operations
strncatstring.3string operations
strncmpstring.3string operations
strncpystring.3string operations
sttystty.3cset and get terminal state (defunct)
swabswab.3swap bytes
sys_errlistperror.3system error messages
sys_nerrperror.3system error messages
sys_siglistpsignal.3system signal messages
systemsystem.3issue a Shell command
tansin.3mtrigonometric functions
tanhsinh.3mhyperbolic functions
telldirdirectory.3directory operations
tgetenttermcap.3xterminal independent operation routines
tgetflagtermcap.3xterminal independent operation routines
tgetnumtermcap.3xterminal independent operation routines
tgetstrtermcap.3xterminal independent operation routines
tgototermcap.3xterminal independent operation routines
timetime.3cget date and time
timestimes.3cget process times
timezonectime.3convert date and time to ASCII
tputstermcap.3xterminal independent operation routines
ttynamettyname.3find name of a terminal
ungetcungetc.3spush character back into input stream
utimeutime.3cset file times
vallocvalloc.3aligned memory allocator
varargsvarargs.3variable argument list
RELATED INFORMATION
intro(3C), intro(3S), intro(3M), intro(3N), nm(1), ld(1), cc(1), intro(2)