home *** CD-ROM | disk | FTP | other *** search
- /* originally from Dale Schumacher's dLibs */
-
- /*
- * standard "print error message" function
- */
-
- #include <stdio.h>
- #include <errno.h>
-
- extern char *strerror();
-
-
- void perror(msg)
- const char *msg;
- {
- if(msg && *msg)
- {
- fputs(msg, stderr);
- fputs(": ", stderr);
- }
- if(msg = strerror(errno))
- fputs(msg, stderr);
- fputs(".\n", stderr);
- }
-