summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarc <devnull@localhost>1995-12-13 21:40:59 +0000
committermarc <devnull@localhost>1995-12-13 21:40:59 +0000
commit934076d1c1a29f487dc9e544aacf9915888aa61d (patch)
tree3d9253cf5164ed603cbc7c993d5b9f8f06bd4344
parent2eec922f7e9728a8a6cc069ee248774d81b4be65 (diff)
downloadrpm-934076d1c1a29f487dc9e544aacf9915888aa61d.tar.gz
rpm-934076d1c1a29f487dc9e544aacf9915888aa61d.tar.bz2
rpm-934076d1c1a29f487dc9e544aacf9915888aa61d.zip
changed error() to use varargs/vfprintf()
CVS patchset: 33 CVS date: 1995/12/13 21:40:59
-rw-r--r--lib/rpmerr.c10
-rw-r--r--rpmio/rpmerr.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/lib/rpmerr.c b/lib/rpmerr.c
index f5c2cf268..17c22228c 100644
--- a/lib/rpmerr.c
+++ b/lib/rpmerr.c
@@ -1,8 +1,14 @@
+#include <stdarg.h>
#include <stdio.h>
#include "rpmerr.h"
-void error(int code, ...)
+void error(int code, char *format, ...)
{
- fprintf(stderr, "error, error, error %d\n", code);
+ va_list args;
+
+ va_start(args, format);
+
+ fprintf(stderr, "ERROR(%d): ", code);
+ vfprintf(stdout, format, args);
}
diff --git a/rpmio/rpmerr.c b/rpmio/rpmerr.c
index f5c2cf268..17c22228c 100644
--- a/rpmio/rpmerr.c
+++ b/rpmio/rpmerr.c
@@ -1,8 +1,14 @@
+#include <stdarg.h>
#include <stdio.h>
#include "rpmerr.h"
-void error(int code, ...)
+void error(int code, char *format, ...)
{
- fprintf(stderr, "error, error, error %d\n", code);
+ va_list args;
+
+ va_start(args, format);
+
+ fprintf(stderr, "ERROR(%d): ", code);
+ vfprintf(stdout, format, args);
}