From a99617fe8fdb56b3e877558bfd6572ce65ad39de Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 11 Oct 2000 23:54:37 +0000 Subject: Finish reorganizing things. At least I think I've finished. --- libc/stdio/perror.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 libc/stdio/perror.c (limited to 'libc/stdio/perror.c') diff --git a/libc/stdio/perror.c b/libc/stdio/perror.c new file mode 100644 index 000000000..d6274c056 --- /dev/null +++ b/libc/stdio/perror.c @@ -0,0 +1,19 @@ +#include +#include +#include + +void perror(str) +__const char *str; +{ + register char *ptr; + + if (str) { + write(2, str, strlen(str)); + write(2, ": ", 2); + } else + write(2, "perror: ", 8); + + ptr = strerror(errno); + write(2, ptr, strlen(ptr)); + write(2, "\n", 1); +} -- cgit v1.2.3