void perror(char *s);
char *strerror(int errnum);
extern int sys_nerr;
extern char *sys_errlist[];
To simplify variant formatting of messages, the vector of message strings can also be obtained by using the strerror function; errno can be used as the argument to this function to get the message string, without a trailing newline.
Although not specified by ANSI C or POSIX, for compatibility, this implementation also permits directly retrieving the vector of message strings from sys_errlist. Sys_nerr is the number of messages provided for in the table; it should be checked because new error codes may be added to the system before they are added to the table. The use of the strerror function is preferred over this mechanism.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97