INTRO(3) — UNIX Programmer’s Manual
NAME
intro − introduction to C 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. Most of these functions are accessible from the C library, which is automatically loaded by the C compiler.
The C library also includes all the functions described in section 2.
The functions described in this section are grouped into various sections:
(3) The straight “3” functions are the standard C library functions.
(3N) These functions constitute the internet network library.
(3S) These functions constitute the ‘standard I/O package’, see stdio(3S) for more details. Declarations for these functions may be obtained from the include file <stdio.h>.
(3C) These routines are 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. Use of these routines should, for the most part, be avoided. The manual page entry for each compatibility routine indicates the proper interface to use.
(3M) These functions constitute the math library, libm. C programs that wish to use this library need to specify the “−lm” option.
(3X) These functions constitute minor libraries and other miscellaneous run-time facilities. Most are available only when programming in C. These functions include libraries that provide device independent plotting functions, terminal independent screen management routines for two dimensional non-bitmap display terminals, and functions for managing data bases with inverted indexes. These functions are located in separate libraries indicated in each manual entry.
SEE ALSO
stdio(3S), math(3M), intro(2), cc(1), ld(1), nm(1)
LIST OF FUNCTIONS
Standard C library functions
NameAppears on PageDescription
abortabort.3generate a fault
absabs.3integer absolute value
acossin.3minverse trigonometric function
acoshasinh.3minverse hyperbolic function
alarmalarm.3cschedule signal after specified time
allocamalloc.3memory allocator
arcplot.3xgraphics interface
asctimectime.3convert date and time to ASCII
asinsin.3minverse trigonometric function
asinhasinh.3minverse hyperbolic function
assertassert.3xprogram verification
atansin.3minverse trigonometric function
atanhasinh.3minverse hyperbolic function
atan2sin.3minverse trigonometric function
atofatof.3convert ASCII to numbers
atoiatof.3convert ASCII to numbers
atolatof.3convert ASCII to numbers
bcmpbstring.3bit and byte string operations
bcopybstring.3bit and byte string operations
bzerobstring.3bit and byte string operations
cabshypot.3mcomplex absolute value
callocmalloc.3memory allocator
cbrtsqrt.3mcube root
ceilfloor.3minteger no less than
circleplot.3xgraphics interface
clearerrferror.3sstream status inquiries
closedirdirectory.3directory operations
closelogsyslog.3control system log
closeplplot.3xgraphics interface
contplot.3xgraphics interface
copysignieee.3mcopy sign bit
cossin.3mtrigonometric function
coshsinh.3mhyperbolic function
cryptcrypt.3DES encryption
ctimectime.3convert date and time to ASCII
cursescurses.3xscreen functions with “optimal” cursor motion
dbminitdbm.3xdata base subroutines
deletedbm.3xdata base subroutines
dremieee.3mremainder
ecvtecvt.3output conversion
edataend.3last locations in program
encryptcrypt.3DES encryption
endend.3last locations in program
endfsentgetfsent.3xget file system descriptor file entry
endgrentgetgrent.3get group file entry
endhostentgethostbyname.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
eraseplot.3xgraphics interface
erferf.3merror function
erfcerf.3mcomplementary error function
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
expm1exp.3mexp(x)−1
fabsfloor.3mabsolute value
fclosefclose.3sclose or flush a stream
fcvtecvt.3output conversion
feofferror.3sstream status inquiries
ferrorferror.3sstream status inquiries
fetchdbm.3xdata base subroutines
fflushfclose.3sclose or flush a stream
ffsbstring.3bit and byte string operations
fgetcgetc.3sget character or word from stream
fgetsgets.3sget a string from a stream
filenoferror.3sstream status inquiries
firstkeydbm.3xdata base subroutines
floorfloor.3minteger no greater than
fopenfopen.3sopen a stream
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
gcvtecvt.3output conversion
getcgetc.3sget character or word from stream
getchargetc.3sget character or word from stream
getdiskbynamegetdisk.3xget disk description by its name
getenvgetenv.3value for environment name
getfsentgetfsent.3xget file system descriptor file entry
getfsfilegetfsent.3xget file system descriptor file entry
getfsspecgetfsent.3xget file system descriptor file entry
getfstypegetfsent.3xget file system descriptor file entry
getgrentgetgrent.3get group file entry
getgrgidgetgrent.3get group file entry
getgrnamgetgrent.3get group file entry
gethostbyaddrgethostbyname.3nget network host entry
gethostbynamegethostbyname.3nget network host entry
gethostentgethostbyname.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
j0j0.3mbessel function
j1j0.3mbessel function
jnj0.3mbessel function
labelplot.3xgraphics interface
ldexpfrexp.3split into mantissa and exponent
lgammalgamma.3mlog gamma function; (formerly gamma.3m)
lib2648lib2648.3xsubroutines for the HP 2648 graphics terminal
lineplot.3xgraphics interface
linemodplot.3xgraphics interface
localtimectime.3convert date and time to ASCII
logexp.3mnatural logarithm
logbieee.3mexponent extraction
log10exp.3mlogarithm to base 10
log1pexp.3mlog(1+x)
longjmpsetjmp.3non-local goto
mallocmalloc.3memory allocator
malloc_debugmalloc.3memory allocator
malloc_errormalloc.3memory allocator
malloc_good_sizemalloc.3memory allocator
malloc_sizemalloc.3memory allocator
mktempmktemp.3make a unique file name
modffrexp.3split into mantissa and exponent
moncontrolmonitor.3prepare execution profile
monitormonitor.3prepare execution profile
monstartupmonitor.3prepare execution profile
moveplot.3xgraphics interface
nextkeydbm.3xdata base subroutines
nicenice.3cset program priority
nlistnlist.3get entries from name list
ntohlbyteorder.3nconvert values between host and network byte order
ntohsbyteorder.3nconvert values between host and network byte order
opendirdirectory.3directory operations
openlogsyslog.3control system log
openplplot.3xgraphics interface
pausepause.3cstop until signal
pclosepopen.3initiate I/O to/from a process
perrorperror.3system error messages
pointplot.3xgraphics interface
popenpopen.3initiate I/O to/from a process
powexp.3mexponential x∗∗y
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
rintfloor.3mround to nearest integer
rresvportrcmd.3xroutines for returning a stream to a remote command
ruserokrcmd.3xroutines for returning a stream to a remote command
scalbieee.3mexponent adjustment
scandirscandir.3scan a directory
scanfscanf.3sformatted input conversion
seekdirdirectory.3directory operations
setbufsetbuf.3sassign buffering to a stream
setbuffersetbuf.3sassign buffering to a stream
setegidsetuid.3set user and group ID
seteuidsetuid.3set user and group ID
setfsentgetfsent.3xget file system descriptor file entry
setgidsetuid.3set user and group ID
setgrentgetgrent.3get group file entry
sethostentgethostbyname.3nget network host entry
setjmpsetjmp.3non-local goto
setkeycrypt.3DES encryption
setlinebufsetbuf.3sassign buffering to a stream
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 function
sinhsinh.3mhyperbolic function
sleepsleep.3suspend execution for interval
spaceplot.3xgraphics interface
sprintfprintf.3sformatted output conversion
sqrtsqrt.3msquare root
srandrand.3crandom number generator
srandomrandom.3better random number generator
sscanfscanf.3sformatted input conversion
stdiointro.3sstandard buffered input/output package
storedbm.3xdata base 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
syslogsyslog.3control system log
systemsystem.3issue a shell command
tansin.3mtrigonometric function
tanhsinh.3mhyperbolic function
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
ttyslotttyname.3find name of a terminal
ungetcungetc.3spush character back into input stream
utimeutime.3cset file times
vallocmalloc.3memory allocator
varargsvarargs.3variable argument list
vfreemalloc.3memory allocator
vlimitvlimit.3ccontrol maximum system resource consumption
vtimesvtimes.3cget information about resource utilization
y0j0.3mbessel function
y1j0.3mbessel function
ynj0.3mbessel function
HISTORY
12-Nov-86 Andi Swimmer (andi) at Carnegie-Mellon University
Revised for 4.3.
4th Berkeley Distribution — June 21, 1989