summaryrefslogtreecommitdiff
path: root/libc/misc/error/error.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2004-03-11 10:10:53 +0000
committerManuel Novoa III <mjn3@codepoet.org>2004-03-11 10:10:53 +0000
commit93261cdf00778d5706a72bbbeb3a379bfaad948c (patch)
tree8d518dd6ca978884ebeddfccdbb802df4c8dcc13 /libc/misc/error/error.c
parent79248fe718689c31c3df3d24bfbc6f147bc345e7 (diff)
Rewrite the err/warn functions as they were broken (__noreturn__ funcs
were returning). Anyway, also make them threadsafe and smaller. The error.c file still needs work.
Diffstat (limited to 'libc/misc/error/error.c')
-rw-r--r--libc/misc/error/error.c75
1 files changed, 0 insertions, 75 deletions
diff --git a/libc/misc/error/error.c b/libc/misc/error/error.c
index 60a9d8af8..eddf24587 100644
--- a/libc/misc/error/error.c
+++ b/libc/misc/error/error.c
@@ -99,78 +99,3 @@ void __error_at_line (int status, int errnum, const char *file_name,
#undef error_at_line
weak_alias (__error, error)
weak_alias (__error_at_line, error_at_line)
-
-
-
-#include "err.h"
-#include "errno.h"
-
-/* NORETURN */
-void verr (int status, const char *message, va_list args)
-{
- fflush (stdout);
-
- vfprintf (stderr, message, args);
- if (errno) {
- fprintf (stderr, ": %s", strerror (errno));
- }
- putc ('\n', stderr);
- if (status)
- exit (status);
-}
-
-/* NORETURN */
-void verrx (int status, const char *message, va_list args)
-{
- fflush (stdout);
-
- vfprintf (stderr, message, args);
- if (status)
- exit (status);
-}
-
-void vwarn (const char *message, va_list args)
-{
- verr (0, message, args);
-}
-
-void vwarnx (const char *message, va_list args)
-{
- verrx (0, message, args);
-}
-
-void err (int status, const char *message, ...)
-{
- va_list args;
-
- va_start (args, message);
- verr (status, message, args);
- va_end (args);
-}
-
-void errx (int status, const char *message, ...)
-{
- va_list args;
-
- va_start (args, message);
- verrx (status, message, args);
- va_end (args);
-}
-
-void warn (const char *message, ...)
-{
- va_list args;
-
- va_start (args, message);
- verr (0, message, args);
- va_end (args);
-}
-
-void warnx (const char *message, ...)
-{
- va_list args;
-
- va_start (args, message);
- verrx (0, message, args);
- va_end (args);
-}