2.11BSD/man/cat3/syserrlst.0




SYSERRLST(3)	    UNIX Programmer's Manual	     SYSERRLST(3)



NAME
     syserrlst, __errlst - read system error messages from file

SYNOPSIS
     char *
     syserrlst(err)
     int err;

     char *
     __errlst(err, path);
     int err;
     char *path;

DESCRIPTION
     Syserrlst(3) reads the error message string corresponding to
     _e_r_r from the file /_e_t_c/_s_y_s_e_r_r_l_s_t.

     __errlst(3) reads the error message string corresponding to
     _e_r_r from the file _p_a_t_h.  The file _p_a_t_h must be in the format
     described in syserrlst(5).

     NULL is returned if _e_r_r is out of bounds (negative or
     greater than the highest message number in /_e_t_c/_s_y_s_e_r_r_l_s_t or
     _p_a_t_h) or if the error message file can not be opened.  It is
     the responsibility of the caller (strerror(3)) to check for
     and properly handle the _N_U_L_L return.

RETURN VALUE
     NULL if an error was encountered in opening the error mes-
     sage file, if the error was out of bounds, or if the file
     did not start with the correct magic number.  Otherwise a
     char * is returned pointing to a static buffer containing
     the text of the error message.

ERRORS
     syserrlst(3) and __errlst(3) can return any of the errors
     for the open(2), lseek(2), or read(2) system calls.

SEE ALSO
     perror(3), strerror(3), syserrlst(5)

HISTORY
     syserrlst(3), and __errlst(3) were created for 2.11BSD with
     the aim of saving 2kb of Data space in programs which called
     perror(3), or strerror(3).

BUGS
     The information is stored in a static buffer.







Printed 11/26/99	 March 26, 1996                         1