strerror(3C) DG/UX 5.4.2 strerror(3C)
NAME
strerror - get error message string
SYNOPSIS
#include <string.h>
char *strerror (int errnum);
DESCRIPTION
strerror maps the error number in errnum to an error message string,
and returns a pointer to that string. strerror uses the same set of
error messages as perror. The returned string should not be
overwritten.
SEE ALSO
perror(3C).
EXAMPLE
The following program prints an error message corresponding to the
generic UNIX I/O message.
/* Program test for the strerror() function */
#include <errno.h>
#include <stdio.h>
char *strerror();
main() {
printf("Error message is: %s\n", strerror(EIO));
return 0;
}
A call to this program generates the output
Error message is: Error EIO(5) -- Error in input/ouput.
FILES
/usr/lib/locale/locale/LCMESSAGES/uxsyserr -- message catalog.
SEE ALSO
perror(3C).
Licensed material--property of copyright holder(s) 1