Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / libcc.ansi / stdio / perror.c
1 /*
2  * perror.c - print an error message on the standard error output
3  */
4 /* $Id: perror.c,v 1.3 1994/06/24 11:50:46 ceriel Exp $ */
5
6 #include        <errno.h>
7 #include        <stdio.h>
8 #include        <string.h>
9
10 void
11 perror(const char *s)
12 {
13         if (s && *s) {
14                 (void) fputs(s, stderr);
15                 (void) fputs(": ", stderr);
16         }
17         (void) fputs(strerror(errno), stderr);
18         (void) fputs("\n", stderr);
19 }