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 that directly invoke ULTRIX system primitives, described in section 2. This section has the libraries physically grouped together. This is a departure from older versions of the ULTRIX 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. Together with the (3N), (3X), and (3C) routines, these functions constitute library libc, which is automatically loaded by the C compiler cc(1), the Pascal compiler pc(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. The GFLOAT version of libc is used when you use the cc(1) command with the −Mg option, or you use the ld(1) command with the −lcg option. The GFLOAT version of libc must be used with modules compiled with cc(1) using the −Mg option. Note that neither the compiler nor the linker ld(1) can detect when mixed double floating point types are used, and your program may produce erroneous results if this occurs. .
(3F) The 3F functions are all functions callable from Fortran. These functions perform the same jobs as do the straight “3” functions.
(3M) These functions constitute the math library, libm. They are automatically loaded as needed by the Pascal compiler pc(1) and 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>. The GFLOAT version of libm is used when you use the ld(1) command with the −lcg option. Note that you must use the GFLOAT version of libm with modules compiled using the cc(1) command with the −Mg option. Note that neither the compiler nor the linker ld(1) can detect when mixed double floating point types are used, and the program may produce erroneous results if this occurs. .
(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 4.2BSD 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/lib_cg.a
/usr/lib/libm.a .
/usr/lib/libc_p.a
/usr/lib/m_g.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>.
SEE ALSO
intro(3C), intro(3S), intro(3F), intro(3M), intro(3N), nm(1), ld(1), cc(1), f77(1), intro(2)
LIST OF FUNCTIONS
NameAppears on PageDescription
abortabort.3generate a fault
abortabort.3fterminate abruptly with memory image
absabs.3integer absolute value
accessaccess.3fdetermine accessability of a file
acossin.3mtrigonometric functions
alarmalarm.3cschedule signal after specified time
alarmalarm.3fexecute a subroutine after a specified time
allocamalloc.3memory allocator
arcplot.3xgraphics interface
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
bcmpbstring.3bit and byte string operations
bcopybstring.3bit and byte string operations
besselbessel.3fof two kinds for integer orders
bitbit.3fand, or, xor, not, rshift, lshift bitwise functions
bzerobstring.3bit and byte string operations
cabshypot.3mEuclidean distance
callocmalloc.3memory allocator
ceilfloor.3mabsolute value, floor, ceiling functions
chdirchdir.3fchange default directory
chmodchmod.3fchange mode of a file
circleplot.3xgraphics interface
clearerrferror.3sstream status inquiries
closedirdirectory.3directory operations
closelogsyslog.3control system log
closeplplot.3xgraphics interface
contplot.3xgraphics interface
cossin.3mtrigonometric functions
coshsinh.3mhyperbolic functions
cryptcrypt.3DES encryption
ctimectime.3convert date and time to ASCII
ctimetime.3freturn system time
cursescurses.3xscreen functions with “optimal” cursor motion
dbminitdbm.3xdata base subroutines
deletedbm.3xdata base subroutines
dffracflmin.3freturn extreme values
dflmaxflmin.3freturn extreme values
dflmaxrange.3freturn extreme values
dflminflmin.3freturn extreme values
dflminrange.3freturn extreme values
drandrand.3freturn random values
dtimeetime.3freturn elapsed execution time
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
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
eraseplot.3xgraphics interface
etextend.3last locations in program
etimeetime.3freturn elapsed execution time
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
exitexit.3fterminate process with status
expexp.3mexponential, logarithm, power, square root
fabsfloor.3mabsolute value, floor, ceiling functions
fclosefclose.3sclose or flush a stream
fcvtecvt.3output conversion
fdatefdate.3freturn date and time in an ASCII string
fdopenfopen.3sopen a stream
feofferror.3sstream status inquiries
ferrorferror.3sstream status inquiries
fetchdbm.3xdata base subroutines
fflushfclose.3sclose or flush a stream
ffracflmin.3freturn extreme values
ffsbstring.3bit and byte string operations
fgetcgetc.3fget a character from a logical unit
fgetcgetc.3sget character or word from stream
fgetsgets.3sget a string from a stream
filenoferror.3sstream status inquiries
firstkeydbm.3xdata base subroutines
flmaxflmin.3freturn extreme values
flmaxrange.3freturn extreme values
flminflmin.3freturn extreme values
flminrange.3freturn extreme values
floorfloor.3mabsolute value, floor, ceiling functions
flushflush.3fflush output to a logical unit
fopenfopen.3s open a stream
forkfork.3fcreate a copy of this process
fpecnttrpfpe.3ftrap and repair floating point faults
fprintfprintf.3sformatted output conversion
fputcputc.3fwrite a character to a fortran logical unit
fputcputc.3sput character or word on a stream
fputsputs.3sput a string on a stream
freadfread.3sbuffered binary input/output
freemalloc.3memory allocator
freopenfopen.3s open a stream
frexpfrexp.3split into mantissa and exponent
fscanfscanf.3sformatted input conversion
fseekfseek.3freposition a file on a logical unit
fseekfseek.3sreposition a stream
fstatstat.3fget file status
ftellfseek.3freposition a file on a logical unit
ftellfseek.3sreposition a stream
ftimetime.3cget date and time
fwritefread.3sbuffered binary input/output
gammagamma.3mlog gamma function
gcvtecvt.3output conversion
gerrorperror.3fget system error messages
getarggetarg.3freturn command line arguments
getcgetc.3fget a character from a logical unit
getcgetc.3sget character or word from stream
getchargetc.3sget character or word from stream
getcwdgetcwd.3fget pathname of current working directory
getdiskbynamegetdisk.3xget disk description by its name
getenvgetenv.3value for environment name
getenvgetenv.3fget value of environment variables
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
getgidgetuid.3fget user or group ID of the caller
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
getloggetlog.3fget user’s login name
getlogingetlogin.3get login name
getnetbyaddrgetnetent.3nget network entry
getnetbynamegetnetent.3nget network entry
getnetentgetnetent.3nget network entry
getpassgetpass.3read a password
getpidgetpid.3fget process id
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
getuidgetuid.3fget user or group ID of the caller
getwgetc.3sget character or word from stream
getwdgetwd.3get current working directory pathname
gmtimectime.3convert date and time to ASCII
gmtimetime.3freturn system time
gttystty.3cset and get terminal state (defunct)
hostnmhostnm.3fget name of current host
htonlbyteorder.3nconvert values between host and network byte order
htonsbyteorder.3nconvert values between host and network byte order
hypothypot.3mEuclidean distance
iargcgetarg.3freturn command line arguments
idateidate.3freturn date or time in numerical form
ierrnoperror.3fget system error messages
indexindex.3ftell about character objects
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
inet_ntoainet.3nInternet address manipulation routines
initgroupsinitgroups.3xinitialize group access list
initstaterandom.3better random number generator
inmaxflmin.3freturn extreme values
inmaxrange.3freturn extreme values
insqueinsque.3insert/remove element from a queue
ioinitioinit.3fchange f77 I/O initialization
irandrand.3freturn random values
isalnumctype.3character classification macros
isalphactype.3character classification macros
isasciictype.3character classification macros
isattyttynam.3ffind name of a terminal port
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
itimeidate.3freturn date or time in numerical form
j0j0.3mbessel functions
j1j0.3mbessel functions
jnj0.3mbessel functions
killkill.3fsend a signal to a process
labelplot.3xgraphics interface
ldexpfrexp.3split into mantissa and exponent
lenindex.3ftell about character objects
lib2648lib2648.3xsubroutines for the HP 2648 graphics terminal
lineplot.3xgraphics interface
linemodplot.3xgraphics interface
linklink.3fmake a link to an existing file
lnblnkindex.3ftell about character objects
locloc.3freturn the address of an object
localtimectime.3convert date and time to ASCII
logexp.3mexponential, logarithm, power, square root
log10exp.3mexponential, logarithm, power, square root
longlong.3finteger object conversion
longjmpsetjmp.3non-local goto
lstatstat.3fget file status
ltimetime.3freturn system time
mallocmalloc.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.3x graphics interface
pausepause.3cstop until signal
pclosepopen.3initiate I/O to/from a process
perrorperror.3system error messages
perrorperror.3fget system error messages
plotplot.3xgraphics interface
pointplot.3xgraphics interface
popenpopen.3initiate I/O to/from a process
powexp.3mexponential, logarithm, power, square root
printfprintf.3sformatted output conversion
psignalpsignal.3system signal messages
putcputc.3fwrite a character to a fortran logical unit
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
qsortqsort.3fquick sort
randrand.3crandom number generator
randrand.3freturn random values
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
renamerename.3frename a file
rewindfseek.3sreposition a stream
rewinddirdirectory.3directory operations
rexecrexec.3xreturn stream to a remote command
rindexindex.3ftell about character objects
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
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
sethostentgethostent.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
shortlong.3finteger object conversion
signalsignal.3simplified software signal facilities
signalsignal.3fchange the action for a signal
sinsin.3mtrigonometric functions
sinhsinh.3mhyperbolic functions
sleepsleep.3suspend execution for interval
sleepsleep.3fsuspend execution for an interval
spaceplot.3xgraphics interface
sprintfprintf.3sformatted output conversion
sqrtexp.3mexponential, logarithm, power, square root
srandrand.3crandom number generator
srandomrandom.3better random number generator
sscanfscanf.3sformatted input conversion
statstat.3fget file status
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
systemsystem.3fexecute a UNIX command
tansin.3mtrigonometric functions
tanhsinh.3mhyperbolic functions
tclosetopen.3ff77 tape I/O
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
timetime.3freturn system time
timestimes.3cget process times
timezonectime.3convert date and time to ASCII
topentopen.3ff77 tape I/O
tputstermcap.3xterminal independent operation routines
trapertraper.3ftrap arithmetic errors
trapovtrapov.3ftrap and repair floating point overflow
treadtopen.3ff77 tape I/O
trewintopen.3ff77 tape I/O
trpfpetrpfpe.3ftrap and repair floating point faults
tskipftopen.3ff77 tape I/O
tstatetopen.3ff77 tape I/O
ttynamttynam.3ffind name of a terminal port
ttynamettyname.3find name of a terminal
ttyslotttyname.3find name of a terminal
twritetopen.3ff77 tape I/O
ungetcungetc.3spush character back into input stream
unlinkunlink.3fremove a directory entry
utimeutime.3cset file times
vallocvalloc.3aligned memory allocator
varargsvarargs.3variable argument list
vlimitvlimit.3ccontrol maximum system resource consumption
vtimesvtimes.3cget information about resource utilization
waitwait.3fwait for a process to terminate
y0j0.3mbessel functions
y1j0.3mbessel functions
ynj0.3mbessel functions