Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ intro(3) — sys5 — Apollo Domain/OS SR10.4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ar(1)

cc(1)

f77(1)

ld(1)

lint(1)

nm(1)

intro(2)

stdio(3S)

math(5)

INTRO(3)                             SysV                             INTRO(3)



NAME
     intro - introduction to functions and libraries

DESCRIPTION
     This section describes functions found in various libraries, other than
     those functions that directly invoke UNIX system primitives, which are
     described in Section 2 of this volume.  Certain major collections are
     identified by a letter after the section number:

     (3C)   The C compiler, cc(1), loads the libraries containing these
            functions automatically.  Declarations for some of these functions
            may be obtained from #include files indicated on the appropriate
            pages.

     (3S)   These functions constitute the "standard I/O package" (see
            stdio(3S)).  These functions also are loaded automatically by the
            C compiler.  Declarations for these functions may be obtained from
            the #include file <stdio.h>.

     (3M)   Declarations for these functions may be obtained from the include
            file <math.h>.

            Domain C supports "built-in code" for the following math routines:
            abs(), sin(), cos(), tan(), log(), exp(), atan(), atan2(), and
            sqrt().  If you specify -D_BUILTINS on the cc(1) command line, or
            #include <apollo/builtins.h> in your source file, then the
            compiler will insert object code for these functions wherever they
            are invoked.  While this results in somewhat longer object files,
            it can produce much faster executable code, particularly when
            double-precision math functions are used heavily.

            However, do not use the built-in functions if your programs rely
            on matherr(3M) error handling.  They do not support it.

     (3N)   This contains sets of functions constituting the Network Services
            library.  These sets provide protocol independent interfaces to
            networking services based on the service definitions of the OSI
            (Open Systems Interconnection) reference model.  Application
            developers access the function sets that provide services at a
            particular level.

            At present, this library contains the Transport Interface (TI)
            function set.  It provides the services of the OSI Transport
            Layer.  These services provide reliable end-to-end data
            transmission using the services of an underlying network.
            Applications written using the TI functions are independent of the
            underlying protocols.  Declarations for these functions may be
            obtained from the #include file <tiuser.h>.  The link editor ld(1)
            searches this library under the -lnsl option.

     (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.

     (3X)   Various specialized libraries.  The files in which these libraries
            are found are given on the appropriate pages.

     (3F)   These functions constitute the FORTRAN intrinsic function library,
            libF77.  These functions are automatically available to the
            FORTRAN programmer and require no special invocation of the
            compiler.

DEFINITIONS
     A "character" is any bit pattern able to fit into a byte on the machine.
     The "null character" is a character with value 0, represented in the C
     language as "\0". A "character array" is a sequence of characters.  A
     "null-terminated character array" is a sequence of characters, the last
     of which is the null character.  A null terminated character array is
     also called a "string". The "null string" is a character array containing
     only the null character.  A NULL pointer is the value that is obtained by
     casting 0 into a pointer.  The C language guarantees that this value will
     not match that of any legitimate pointer, so many functions that return
     pointers return it to indicate an error.  NULL is defined as "0" in
     <stdio.h>; the user can include an appropriate definition if not using
     <stdio.h>.

     Many groups of FORTRAN intrinsic functions have generic function names
     that do not require explicit or implicit type declaration.  The type of
     the function will be determined by the type of its argument(s).  For
     example, the generic function max will return an integer value if given
     integer arguments (max0), a real value if given real arguments (amax1),
     or a double-precision value if given double-precision arguments (dmax1).


     netbuf.  In the Network Services library, netbuf is a structure used in
     various Transport Interface (TI) functions to send and receive data and
     information.  It contains the following members:

          unsigned int maxlen;
          unsigned int len;
          char *buf;

     buf points to a user input and/or output buffer.  len generally specifies
     the number of bytes contained in the buffer.  If the structure is used
     for both input and output, the function will replace the user value of
     len on return.

     maxlen generally has significance only when buf is used to receive output
     from the TI function.  In this case, it specifies the physical size of
     the buffer, the maximum value of len that can be set by the function.  If
     maxlen is not large enough to hold the returned information, an TBUFOVFLW
     error will generally result.  However, certain functions may return part
     of the data and not generate an error.

FILES
     LIBDIR              usually /lib
     LIBDIR/libc
     LIBDIR/clib         global libraries
     /usr/lib/libnsl.a   (3N)

SEE ALSO
     ar(1), cc(1), f77(1), ld(1), lint(1), nm(1), intro(2), stdio(3S),
     math(5).
     The DOMAIN C Language Reference.

DIAGNOSTICS
     C library and math functions (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.

WARNINGS
     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 ("System Calls").  If a program inadvertently 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.  Definitions for Sections 2, 3C, and 3S are
     checked automatically.  Other definitions can be included by using the -l
     option.  Use of lint is highly recommended.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026