install approved copyright notice
[unix-history] / usr / src / share / man / man3 / intro.3
CommitLineData
09056340
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
ce2f92c4 5.\" @(#)intro.3 6.8 (Berkeley) %G%
09056340 6.\"
e45d659d 7.TH INTRO 3 ""
09056340
KM
8.UC 4
9.SH NAME
699d1388 10intro \- introduction to C library functions
09056340
KM
11.SH DESCRIPTION
12This section describes functions that may be found
4885e3a3
KM
13in various libraries.
14The library functions are those other than the
ecdf96eb 15functions which directly invoke UNIX system primitives, described in section 2.
4885e3a3
KM
16Most of these functions are accessible from the C library,
17.IR libc ,
09056340 18which is automatically loaded by the C compiler
ecdf96eb 19.IR cc (1),
4885e3a3
KM
20and the Pascal compiler
21.IR pc (1).
09056340
KM
22The link editor
23.IR ld (1)
24searches this library under the `\-lc' option.
4885e3a3
KM
25The C library also includes all the functions described in section 2.
26.PP
27A subset of these functions are available from Fortran;
28they are described separately in
29.IR intro (3F).
30.PP
31The functions described in this section are grouped into various sections:
09056340 32.TP
4885e3a3
KM
33(3)
34The straight ``3'' functions are the standard C library functions.
ecdf96eb
KM
35.TP
36(3N)
4885e3a3 37These functions constitute the internet network library.
09056340
KM
38.TP
39(3S)
ecdf96eb 40These functions constitute the `standard I/O package', see
4885e3a3
KM
41.IR stdio (3S)
42for more details.
43Declarations for these functions may be obtained from
ecdf96eb
KM
44the include file
45.RI < stdio.h >.
09056340 46.TP
ecdf96eb 47(3C)
4885e3a3
KM
48These routines are included for compatibility with other systems.
49In particular,
ecdf96eb 50a number of system call interfaces provided in previous releases of
4885e3a3
KM
514BSD have been included for source code compatibility.
52Use of these routines should, for the most part, be avoided.
53The manual page entry for each compatibility routine
54indicates the proper interface to use.
55.TP
56(3M)
57These functions constitute the math library,
58.IR libm .
ae01c4fa 59When functions in the math library (see
4885e3a3 60.IR math (3M))
ae01c4fa
KM
61are passed values that are undefined or would generate
62answers that are out of range,
63they call the \fIinfnan\fP routine.
64By default this routine returns the VAX reserved floating point value
65which causes the process to get a floating point exception (see
66.IR sigvec (2)).
67Programs that wish to take other action should define their own
68version of \fIinfnan\fP (see
69.IR infnan (3M)
70for details).
4885e3a3
KM
71The math library is loaded as needed by the Pascal compiler
72.IR pc (1).
ae01c4fa 73C programs that wish to use this library need to specify the ``\-lm'' option.
4885e3a3
KM
74.TP
75(3X)
76These functions constitute minor libraries and other miscellaneous
77run-time facilities. Most are available only when programming in C.
78These functions include libraries that provide
79device independent plotting functions,
80terminal independent screen management routines
81for two dimensional non-bitmap display terminals,
82and functions for managing data bases with inverted indexes.
83These functions are located in separate libraries
84indicated in each manual entry.
85.SH FILES
86.nf
ce2f92c4
KD
87/lib/libc.a the C library
88/usr/lib/libm.a the math library
89/usr/lib/libc_p.a the C library compiled for profiling
90/usr/lib/libm_p.a the math library compiled for profiling
4885e3a3
KM
91.fi
92.SH SEE ALSO
93stdio(3S),
94math(3M),
95intro(2),
96cc(1),
97ld(1),
98nm(1)
ecdf96eb
KM
99.SH "LIST OF FUNCTIONS"
100.sp 2
09056340 101.nf
ce2f92c4 102.ta \w'getprotobynumber'u+2n +\w'gethostbyname.3n'u+10n
ecdf96eb 103\fIName\fP \fIAppears on Page\fP \fIDescription\fP
ce2f92c4 104.ta \w'getprotobynumber'u+4n +\w'gethostbyname.3n'u+4n
ecdf96eb
KM
105.sp 5p
106abort abort.3 generate a fault
ecdf96eb 107abs abs.3 integer absolute value
4885e3a3
KM
108acos sin.3m inverse trigonometric function
109acosh asinh.3m inverse hyperbolic function
ecdf96eb 110alarm alarm.3c schedule signal after specified time
ecdf96eb
KM
111alloca malloc.3 memory allocator
112arc plot.3x graphics interface
113asctime ctime.3 convert date and time to ASCII
4885e3a3
KM
114asin sin.3m inverse trigonometric function
115asinh asinh.3m inverse hyperbolic function
ecdf96eb 116assert assert.3x program verification
4885e3a3
KM
117atan sin.3m inverse trigonometric function
118atanh asinh.3m inverse hyperbolic function
119atan2 sin.3m inverse trigonometric function
ecdf96eb
KM
120atof atof.3 convert ASCII to numbers
121atoi atof.3 convert ASCII to numbers
122atol atof.3 convert ASCII to numbers
123bcmp bstring.3 bit and byte string operations
124bcopy bstring.3 bit and byte string operations
ecdf96eb 125bzero bstring.3 bit and byte string operations
4885e3a3 126cabs hypot.3m complex absolute value
ecdf96eb 127calloc malloc.3 memory allocator
4885e3a3
KM
128cbrt sqrt.3m cube root
129ceil floor.3m integer no less than
ecdf96eb
KM
130circle plot.3x graphics interface
131clearerr ferror.3s stream status inquiries
132closedir directory.3 directory operations
133closelog syslog.3 control system log
134closepl plot.3x graphics interface
135cont plot.3x graphics interface
4885e3a3
KM
136copysign ieee.3m copy sign bit
137cos sin.3m trigonometric function
138cosh sinh.3m hyperbolic function
ecdf96eb
KM
139crypt crypt.3 DES encryption
140ctime ctime.3 convert date and time to ASCII
ecdf96eb
KM
141curses curses.3x screen functions with ``optimal'' cursor motion
142dbminit dbm.3x data base subroutines
143delete dbm.3x data base subroutines
4885e3a3 144drem ieee.3m remainder
ecdf96eb
KM
145ecvt ecvt.3 output conversion
146edata end.3 last locations in program
147encrypt crypt.3 DES encryption
148end end.3 last locations in program
149endfsent getfsent.3x get file system descriptor file entry
150endgrent getgrent.3 get group file entry
ae01c4fa 151endhostent gethostbyname.3n get network host entry
ecdf96eb
KM
152endnetent getnetent.3n get network entry
153endprotoent getprotoent.3n get protocol entry
154endpwent getpwent.3 get password file entry
155endservent getservent.3n get service entry
156environ execl.3 execute a file
157erase plot.3x graphics interface
4885e3a3
KM
158erf erf.3m error function
159erfc erf.3m complementary error function
ecdf96eb 160etext end.3 last locations in program
ecdf96eb
KM
161exec execl.3 execute a file
162exece execl.3 execute a file
163execl execl.3 execute a file
164execle execl.3 execute a file
165execlp execl.3 execute a file
166exect execl.3 execute a file
167execv execl.3 execute a file
168execvp execl.3 execute a file
169exit exit.3 terminate a process after flushing any pending output
4885e3a3
KM
170exp exp.3m exponential
171expm1 exp.3m exp(x)\-1
172fabs floor.3m absolute value
ecdf96eb
KM
173fclose fclose.3s close or flush a stream
174fcvt ecvt.3 output conversion
ecdf96eb
KM
175feof ferror.3s stream status inquiries
176ferror ferror.3s stream status inquiries
177fetch dbm.3x data base subroutines
178fflush fclose.3s close or flush a stream
ecdf96eb 179ffs bstring.3 bit and byte string operations
ecdf96eb
KM
180fgetc getc.3s get character or word from stream
181fgets gets.3s get a string from a stream
182fileno ferror.3s stream status inquiries
183firstkey dbm.3x data base subroutines
4885e3a3 184floor floor.3m integer no greater than
e45d659d 185fopen fopen.3s open a stream
ecdf96eb 186fprintf printf.3s formatted output conversion
ecdf96eb
KM
187fputc putc.3s put character or word on a stream
188fputs puts.3s put a string on a stream
189fread fread.3s buffered binary input/output
190free malloc.3 memory allocator
191frexp frexp.3 split into mantissa and exponent
192fscanf scanf.3s formatted input conversion
ecdf96eb 193fseek fseek.3s reposition a stream
ecdf96eb
KM
194ftell fseek.3s reposition a stream
195ftime time.3c get date and time
196fwrite fread.3s buffered binary input/output
ecdf96eb 197gcvt ecvt.3 output conversion
ecdf96eb
KM
198getc getc.3s get character or word from stream
199getchar getc.3s get character or word from stream
ecdf96eb
KM
200getdiskbyname getdisk.3x get disk description by its name
201getenv getenv.3 value for environment name
ecdf96eb
KM
202getfsent getfsent.3x get file system descriptor file entry
203getfsfile getfsent.3x get file system descriptor file entry
204getfsspec getfsent.3x get file system descriptor file entry
205getfstype getfsent.3x get file system descriptor file entry
ecdf96eb
KM
206getgrent getgrent.3 get group file entry
207getgrgid getgrent.3 get group file entry
208getgrnam getgrent.3 get group file entry
ae01c4fa
KM
209gethostbyaddr gethostbyname.3n get network host entry
210gethostbyname gethostbyname.3n get network host entry
211gethostent gethostbyname.3n get network host entry
ecdf96eb
KM
212getlogin getlogin.3 get login name
213getnetbyaddr getnetent.3n get network entry
214getnetbyname getnetent.3n get network entry
215getnetent getnetent.3n get network entry
216getpass getpass.3 read a password
ecdf96eb
KM
217getprotobyname getprotoent.3n get protocol entry
218getprotobynumber getprotoent.3n get protocol entry
219getprotoent getprotoent.3n get protocol entry
220getpw getpw.3 get name from uid
221getpwent getpwent.3 get password file entry
222getpwnam getpwent.3 get password file entry
223getpwuid getpwent.3 get password file entry
224gets gets.3s get a string from a stream
225getservbyname getservent.3n get service entry
226getservbyport getservent.3n get service entry
227getservent getservent.3n get service entry
ecdf96eb
KM
228getw getc.3s get character or word from stream
229getwd getwd.3 get current working directory pathname
230gmtime ctime.3 convert date and time to ASCII
ecdf96eb 231gtty stty.3c set and get terminal state (defunct)
ecdf96eb
KM
232htonl byteorder.3n convert values between host and network byte order
233htons byteorder.3n convert values between host and network byte order
234hypot hypot.3m Euclidean distance
ecdf96eb
KM
235index string.3 string operations
236inet_addr inet.3n Internet address manipulation routines
237inet_lnaof inet.3n Internet address manipulation routines
238inet_makeaddr inet.3n Internet address manipulation routines
239inet_netof inet.3n Internet address manipulation routines
240inet_network inet.3n Internet address manipulation routines
4885e3a3 241infnan infnan.3m signals exceptions
ecdf96eb
KM
242initgroups initgroups.3x initialize group access list
243initstate random.3 better random number generator
ecdf96eb 244insque insque.3 insert/remove element from a queue
ecdf96eb
KM
245isalnum ctype.3 character classification macros
246isalpha ctype.3 character classification macros
247isascii ctype.3 character classification macros
ecdf96eb
KM
248isatty ttyname.3 find name of a terminal
249iscntrl ctype.3 character classification macros
250isdigit ctype.3 character classification macros
251islower ctype.3 character classification macros
252isprint ctype.3 character classification macros
253ispunct ctype.3 character classification macros
254isspace ctype.3 character classification macros
255isupper ctype.3 character classification macros
4885e3a3
KM
256j0 j0.3m bessel function
257j1 j0.3m bessel function
258jn j0.3m bessel function
ecdf96eb
KM
259label plot.3x graphics interface
260ldexp frexp.3 split into mantissa and exponent
4885e3a3 261lgamma lgamma.3m log gamma function; (formerly gamma.3m)
ecdf96eb
KM
262lib2648 lib2648.3x subroutines for the HP 2648 graphics terminal
263line plot.3x graphics interface
264linemod plot.3x graphics interface
ecdf96eb 265localtime ctime.3 convert date and time to ASCII
4885e3a3
KM
266log exp.3m natural logarithm
267logb ieee.3m exponent extraction
268log10 exp.3m logarithm to base 10
269log1p exp.3m log(1+x)
ecdf96eb 270longjmp setjmp.3 non-local goto
ecdf96eb
KM
271malloc malloc.3 memory allocator
272mktemp mktemp.3 make a unique file name
273modf frexp.3 split into mantissa and exponent
274moncontrol monitor.3 prepare execution profile
275monitor monitor.3 prepare execution profile
276monstartup monitor.3 prepare execution profile
277move plot.3x graphics interface
278nextkey dbm.3x data base subroutines
279nice nice.3c set program priority
280nlist nlist.3 get entries from name list
281ntohl byteorder.3n convert values between host and network byte order
282ntohs byteorder.3n convert values between host and network byte order
283opendir directory.3 directory operations
284openlog syslog.3 control system log
e45d659d 285openpl plot.3x graphics interface
ecdf96eb
KM
286pause pause.3c stop until signal
287pclose popen.3 initiate I/O to/from a process
288perror perror.3 system error messages
ecdf96eb
KM
289point plot.3x graphics interface
290popen popen.3 initiate I/O to/from a process
4885e3a3 291pow exp.3m exponential x**y
ecdf96eb
KM
292printf printf.3s formatted output conversion
293psignal psignal.3 system signal messages
ecdf96eb
KM
294putc putc.3s put character or word on a stream
295putchar putc.3s put character or word on a stream
296puts puts.3s put a string on a stream
297putw putc.3s put character or word on a stream
298qsort qsort.3 quicker sort
ecdf96eb 299rand rand.3c random number generator
ecdf96eb
KM
300random random.3 better random number generator
301rcmd rcmd.3x routines for returning a stream to a remote command
302re_comp regex.3 regular expression handler
303re_exec regex.3 regular expression handler
304readdir directory.3 directory operations
305realloc malloc.3 memory allocator
306remque insque.3 insert/remove element from a queue
ecdf96eb
KM
307rewind fseek.3s reposition a stream
308rewinddir directory.3 directory operations
309rexec rexec.3x return stream to a remote command
ecdf96eb 310rindex string.3 string operations
4885e3a3 311rint floor.3m round to nearest integer
ecdf96eb
KM
312rresvport rcmd.3x routines for returning a stream to a remote command
313ruserok rcmd.3x routines for returning a stream to a remote command
4885e3a3 314scalb ieee.3m exponent adjustment
ecdf96eb
KM
315scandir scandir.3 scan a directory
316scanf scanf.3s formatted input conversion
317seekdir directory.3 directory operations
318setbuf setbuf.3s assign buffering to a stream
319setbuffer setbuf.3s assign buffering to a stream
320setegid setuid.3 set user and group ID
321seteuid setuid.3 set user and group ID
322setfsent getfsent.3x get file system descriptor file entry
323setgid setuid.3 set user and group ID
324setgrent getgrent.3 get group file entry
ae01c4fa 325sethostent gethostbyname.3n get network host entry
ecdf96eb
KM
326setjmp setjmp.3 non-local goto
327setkey crypt.3 DES encryption
328setlinebuf setbuf.3s assign buffering to a stream
329setnetent getnetent.3n get network entry
330setprotoent getprotoent.3n get protocol entry
331setpwent getpwent.3 get password file entry
332setrgid setuid.3 set user and group ID
333setruid setuid.3 set user and group ID
334setservent getservent.3n get service entry
335setstate random.3 better random number generator
336setuid setuid.3 set user and group ID
ecdf96eb 337signal signal.3 simplified software signal facilities
4885e3a3
KM
338sin sin.3m trigonometric function
339sinh sinh.3m hyperbolic function
ecdf96eb 340sleep sleep.3 suspend execution for interval
ecdf96eb
KM
341space plot.3x graphics interface
342sprintf printf.3s formatted output conversion
4885e3a3 343sqrt sqrt.3m square root
ecdf96eb
KM
344srand rand.3c random number generator
345srandom random.3 better random number generator
346sscanf scanf.3s formatted input conversion
ecdf96eb
KM
347stdio intro.3s standard buffered input/output package
348store dbm.3x data base subroutines
349strcat string.3 string operations
350strcmp string.3 string operations
351strcpy string.3 string operations
352strlen string.3 string operations
353strncat string.3 string operations
354strncmp string.3 string operations
355strncpy string.3 string operations
356stty stty.3c set and get terminal state (defunct)
357swab swab.3 swap bytes
358sys_errlist perror.3 system error messages
359sys_nerr perror.3 system error messages
360sys_siglist psignal.3 system signal messages
361syslog syslog.3 control system log
362system system.3 issue a shell command
4885e3a3
KM
363tan sin.3m trigonometric function
364tanh sinh.3m hyperbolic function
ecdf96eb
KM
365telldir directory.3 directory operations
366tgetent termcap.3x terminal independent operation routines
367tgetflag termcap.3x terminal independent operation routines
368tgetnum termcap.3x terminal independent operation routines
369tgetstr termcap.3x terminal independent operation routines
370tgoto termcap.3x terminal independent operation routines
371time time.3c get date and time
ecdf96eb
KM
372times times.3c get process times
373timezone ctime.3 convert date and time to ASCII
ecdf96eb 374tputs termcap.3x terminal independent operation routines
ecdf96eb
KM
375ttyname ttyname.3 find name of a terminal
376ttyslot ttyname.3 find name of a terminal
ecdf96eb 377ungetc ungetc.3s push character back into input stream
ecdf96eb
KM
378utime utime.3c set file times
379valloc valloc.3 aligned memory allocator
380varargs varargs.3 variable argument list
381vlimit vlimit.3c control maximum system resource consumption
382vtimes vtimes.3c get information about resource utilization
4885e3a3
KM
383y0 j0.3m bessel function
384y1 j0.3m bessel function
385yn j0.3m bessel function
09056340 386.fi