error
shall print a message to standard error.
error
shall build the message from the following
elements in their specified order:
the program name. If the application has provided a function named
error_print_progname
, error
shall call this to supply the program name;
otherwise, error
uses the content of the global variable program_name.
the colon and space characters, then the result of using the printf-style format and the optional arguments.
if errnum is nonzero,
error
shall add the colon and
space characters, then the result of
strerror(errnum)
.
a newline.
If exitstatus is nonzero,
error
shall call
exit(exitstatus)
.