summaryrefslogtreecommitdiff
path: root/libbb/error_msg.c
diff options
context:
space:
mode:
authorEric Andersen2001-03-19 19:24:06 +0000
committerEric Andersen2001-03-19 19:24:06 +0000
commitb183dfad2daea713e712470d206b0f0287331083 (patch)
tree26a1f1080be5f9f44c72b45b72aae743d74685dd /libbb/error_msg.c
parentcc165b9083e8e4fb01992a8e0d97ecf08cb6dcdd (diff)
downloadbusybox-b183dfad2daea713e712470d206b0f0287331083.zip
busybox-b183dfad2daea713e712470d206b0f0287331083.tar.gz
Split error messages into separate files.
Update libbb.h, per suggestion from Vladimir, to include __attribute__((format (printf ...))) stuff -Erik
Diffstat (limited to 'libbb/error_msg.c')
-rw-r--r--libbb/error_msg.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/libbb/error_msg.c b/libbb/error_msg.c
index 7773d32..c7d5fdb 100644
--- a/libbb/error_msg.c
+++ b/libbb/error_msg.c
@@ -31,15 +31,6 @@
#include <stdlib.h>
#include "libbb.h"
-extern const char *applet_name;
-
-static void verror_msg(const char *s, va_list p)
-{
- fflush(stdout);
- fprintf(stderr, "%s: ", applet_name);
- vfprintf(stderr, s, p);
-}
-
extern void error_msg(const char *s, ...)
{
va_list p;
@@ -50,45 +41,6 @@ extern void error_msg(const char *s, ...)
putc('\n', stderr);
}
-extern void error_msg_and_die(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- verror_msg(s, p);
- va_end(p);
- putc('\n', stderr);
- exit(EXIT_FAILURE);
-}
-
-static void vperror_msg(const char *s, va_list p)
-{
- int err=errno;
- if(s == 0) s = "";
- verror_msg(s, p);
- if (*s) s = ": ";
- fprintf(stderr, "%s%s\n", s, strerror(err));
-}
-
-extern void perror_msg(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- vperror_msg(s, p);
- va_end(p);
-}
-
-extern void perror_msg_and_die(const char *s, ...)
-{
- va_list p;
-
- va_start(p, s);
- vperror_msg(s, p);
- va_end(p);
- exit(EXIT_FAILURE);
-}
-
/* END CODE */
/*