INTRO(3) DOMAIN/IX SYS5 INTRO(3)
NAME
intro - introduction to subroutines and libraries
USAGE
#include <stdio.h>
#include <math.h>
DESCRIPTION
This section describes a variety of functions and subrou-
tines. Certain major categories of subroutine are identi-
fied by a letter after the section number:
(3C) These functions, together with those of Section 2 and
those marked (3S), constitute the Standard C Library.
Declarations for some of these functions may be
obtained from #include files indicated on the appropri-
ate pages.
(3S) These functions constitute the "standard I/O package"
(see stdio(3S)). Declarations for these functions may
be obtained from the #include file <stdio.h>.
(3M) These functions constitute the Math Library, libm.
Declarations for these functions may be obtained from
the #include file <math.h>. Several generally useful
mathematical constants are also defined there.
(3X) Various specialized libraries. The files in which
these libraries are found are given on the appropriate
pages.
DEFINITIONS
character any bit pattern able to fit into a byte on
the machine. The null character is a charac-
ter with value zero, represented in the C
language as \0.
character array
a sequence of characters. A null-terminated
character array is a sequence of characters,
the last of which is the null character.
string in C, a null-terminated character array. The
null string is a character array containing
only the null character. A NULL pointer is
the value that is obtained by casting zero
into a pointer. The C language guarantees
that this value will not match that of any
legitimate pointer, so many functions that
Printed 12/4/86 INTRO-1
INTRO(3) DOMAIN/IX SYS5 INTRO(3)
return pointers return zero to indicate an
error. NULL is defined as zero in <stdio.h>;
the user can include an appropriate defini-
tion if not using <stdio.h>.
NOTE
The DOMAIN System uses dynamically-loaded global libraries
that are mapped into the machine's address space at boot
time and, therefore, don't have to be bound with the pro-
grams that use them. All references to routines in global
libraries are resolved at load time. The routines in this
section are in the libraries /lib/clib and /lib/unixlib.
DIAGNOSTICS
Functions in the C and Math Libraries (Sections 3C and 3M)
may return the conventional values 0 or +HUGE (the largest-
magnitude single-precision floating-point numbers; HUGE is
defined in the <math.h> header file) 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 or ERANGE.
WARNING
Many of the functions in the libraries call and/or refer to
other functions and external variables described in this
section and in Section 2 of this volume. If a program inad-
vertantly defines a function or external variable with the
same name, the presumed library version of the function or
external variable may not be loaded. The lint(1) program
checker reports name conflicts of this kind as "multiple
declarations" of the names in question. It checks defini-
tions for functions in sections 2, 3C, and 3S automatically.
To check other definitions, use the -l option to lint.
RELATED INFORMATION
intro(2), stdio(3S), ar(1), cc(1), ld(1), lint(1), nm(1)
INTRO-2 Printed 12/4/86