]> git.sur5r.net Git - cc65/blob - libsrc/common/perror.c
removed some duplicated GEOS conio stuff
[cc65] / libsrc / common / perror.c
1 /*
2  * perror.c
3  *
4  * Ullrich von Bassewitz, 01.10.1998
5  */
6
7
8
9 #include <stdio.h>
10 #include <string.h>
11 #include <errno.h>
12
13
14
15 void perror (const char* msg)
16 {
17     /* Fetch the message that corresponds to errno */
18     const char* errormsg = strerror (errno);
19
20     /* Different output depending on msg */
21     if (msg) {
22         fprintf (stderr, "%s: %s\n", msg, errormsg);
23     } else {
24         fprintf (stderr, "%s\n", errormsg);
25     }
26 }
27
28
29