1.\" $NetBSD: intro.3,v 1.5 1995/05/10 22:46:24 jtc Exp $ 2.\" 3.\" Copyright (c) 1980, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)intro.3 8.1 (Berkeley) 6/5/93 35.\" 36.Dd June 5, 1993 37.Dt INTRO 3 38.Os BSD 4 39.Sh NAME 40.Nm intro 41.Nd introduction to the C libraries 42.Sh DESCRIPTION 43This section provides an overview of the C 44library functions, their error returns and other 45common definitions and concepts. 46Most of these functions are available from the C library, 47.Em libc . 48Other libraries, such as the math library, 49.Em libm , 50must be indicated at compile time with the 51.Fl l 52option of the compiler. 53.\" .Pp 54.\" A subset of the 55.\" .Xr libc functions 56.\" are available from Fortran; 57.\" they are described separately in 58.\" .Xr intro 3f . 59.Pp 60The various libraries (followed by the loader flag): 61.Bl -tag -width "libc (-lc)" 62.It Xr libc Pq Fl l Ns Ar c 63Standard C library functions. 64When using the C compiler 65.Xr cc 1 , 66it is not necessary 67to supply the loader flag 68.Fl l Ns Ar c 69for these functions. 70There are several `libraries' or groups of functions included inside of 71.Xr libc : the standard 72.Tn I/O 73routines, 74database routines, 75bit operators, 76string operators, 77character tests and character operators, 78des encryption routines, 79storage allocation, time functions, signal handling and more. 80.It Xr libc_r Pq Fl l Ns Ar c_r 81Reentrant C library. Contains POSIX 1003.1c 82.Xr pthreads 3 83API and thread scheduler, as well as all of the functions 84found in 85.Xr libc . 86.It Xo 87.Xr libcurses 88.Pf ( Fl l Ns Ar curses 89.Fl l Ns Ar termcap ) 90.Xc 91Terminal independent screen management routines 92for two dimensional non-bitmap display terminals. 93(See 94.Xr curses 3 . ) 95.It Xr libcompat Pq Fl l Ns Ar compat 96Functions which are obsolete but are available for compatibility with 97.Bx 4.3 . 98In particular, 99a number of system call interfaces provided in previous releases of 100.Bx 101have been included for source code compatibility. 102Use of these routines should, for the most part, be avoided. 103The manual page entry for each compatibility routine 104indicates the proper interface to use. 105.\" .It Xr libkvm 106.It Xr libl Pq Fl l Ns Ar l 107The library for 108.Xr lex 1 . 109.\" .It Xr libln 110.It Xr libm Pq Fl l Ns Ar m 111The math library, 112.Em libm . 113.\" The math library is loaded as needed by the Pascal compiler 114.\" .Xr pc 1 , 115.\" but not by the C compiler which requires the 116.\" .Fl l Ns Ar m 117.\" flag. 118.\" (See 119.\" .Xr math 3 . ) 120.\" .It Xr libmp Pq Fl l Ns Ar mp 121.\" .It Xr libom 122.\" Old math library. 123.\" .It Xr libplot Pq Fl l Ns Ar plot 124.\" Device independent plotting functions. 125.\" (See 126.\" .Xr plot 3 . ) 127.\" .It Xr libplotf77 Pq Fl l Ns Ar plotf77 128.\" The device independent plotting functions for fortran. 129.\" (See 130.\" .Xr plot 3 . ) 131.\" .It Xr libresolv Pq Fl l Ns Ar resolv 132.\" Routines for network address resolution. 133.It Xr libtermcap Pq Fl l Ns Ar termcap 134The terminal independent operation library package. (See 135.Xr termcap 3 . ) 136.\" .It libvt0.a 137.It Xr liby Pq Fl l Ns Ar y 138The library for 139.Xr yacc 1 . 140.El 141.Sh FILES 142.Bl -tag -width /usr/lib/libm_p.a -compact 143.It Pa /usr/lib/libc.a 144C library 145.It Pa /usr/lib/libm.a 146math library 147.It Pa /usr/lib/libc_p.a 148C library compiled for profiling 149.It Pa /usr/lib/libm_p.a 150math library compiled for profiling 151.El 152.Sh SEE ALSO 153.Xr cc 1 , 154.Xr ld 1 , 155.Xr nm 1 , 156.Xr intro 2 , 157.Xr math 3 , 158.Xr pthreads 3 , 159.Xr stdio 3 160.\" .Sh LIST OF FUNCTIONS 161.\" .Bl -column "strncasecmpxxx" "system" 162.\" .Sy Name Description 163.\" .El 164.Sh HISTORY 165An 166.Nm 167manual appeared in 168.At v7 . 169