blob: 2aae8470eb6615555d80f4538cfd7f7dedd5e9b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <stdio.h>
#include "string.h"
#include "errno.h"
/** print an error message **/
void perror(const char *s)
{
if (s != NULL && *s != '\0') {
fprintf(stderr, "%s: ", s);
}
fprintf(stderr, "%s\n", strerror(errno));
}
/***
writes an error message to IDENTIFIER(stderr).
If ARGUMENT(s) is CONSTANT(NULL), the error message is a string representation of the
current value of IDENTIFIER(errno).
If ARGUMENT(s) is not CONSTANT(NULL), the error message will be preceded by the string
pointed to by ARGUMENT(s), a colon (CHAR(:)), and a space.
***/
/*
POSIX_(L_C_MESSAGES)
*/
/*
STDC(1)
*/
|