INTRO(3) BSD INTRO(3)
NAME
intro - introduction to C library functions
DESCRIPTION
This section describes functions that can be found in various libraries.
The library functions are those other than the functions that directly
invoke UNIX system primitives, described in Section 2. Most of these
functions are accessible from the C library, libc. The C library also
includes all the functions described in Section 2.
A subset of these functions is available from FORTRAN; they are described
separately in intro(3F).
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 can 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 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) Declarations for math functions may be obtained from the include
file <math.h>. When one of these functions detects an error, it
invokes matherr(3M).
(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.
(3P) These functions constitute facilities for thread management, thread
priority scheduling, synchronization primitives, thread
cancellation, process control and thread-specific data handling.
These functions are based on draft 4 of the IEEE P1003.4a-1990
standard.
(3T) These functions constitute facilities for additional thread
manipulation. The functions comprise a low level set of calls based
on the Mach thread interface. Domain/OS also supplies new calls to
add functionality that Mach does not provide.
BUILT-IN CODE
Domain C supports "built-in" code for the fabs, sin, cos, tan, log, exp,
atan, atan2, and sqrt math routines and for the strcpy, strncpy, strncat,
strcat, strcmp, strncmp, and strlen string handling routines. <math.h>
makes the defining of the built-in math routines conditional upon your
defining the _MATH_BUILTINS macro, which you can do either by adding the
line
#define _MATH_BUILTINS
to your program or by compiling it with the -D_MATH_BUILTINS option.
<string.h> makes the defining of the built-in string routines conditional
upon your defining the _STRING_BUILTINS macro, which you can do either by
adding the line
#define _STRING_BUILTINS
to your program or by compiling it with the -D_STRING_BUILTINS option.
Both _MATH_BUILTINS and _STRING_BUILTINS get defined if you define
_BUILTINS. <apollo/builtins.h> defines both the built-in math and string
routines unconditionally.
Using these built-in routines can result in much faster executables,
particularly when double-precision math functions are used heavily.
However, they create somewhat longer object files and do no error
checking. Therefore, do not use the built-in math functions if your
programs rely on matherr(3M) error handling.
FILES
/lib/clib
/lib/libc global libraries
SEE ALSO
cc(1), ld(1), nm(1) intro(2), matherr(3M), stdio(3S), math(7).
Domain C Language Reference.