HP C/iX Library Reference Manual (30026-90004)

Chapter 5 269
HP C/iX Library Function Descriptions
perror
perror
Prints an error message corresponding to errno.
Syntax
#include <stdio.h>
void perror (const char *
s
);
Parameters
s
A pointer to an optional string to be printed with the error message. If a
null pointer is passed, the parameter is ignored.
Return Values
None.
Description
The perror function prints an error message corresponding to the value of errno. First, if
the argument
s
is not a null pointer or a pointer to a null character, the string
s
is printed,
followed by a colon and a blank, then the message and a newline character are printed.
See Also
errno, strerror(), ANSI C 4.9.10.4, POSIX.1 8.1