pkgsrc/cad/magic/patches/patch-ao
agc f475db42cd Use stdarg rather than varargs.
This code is old - it's been ages since I've seen definitions for
sunview and X10...
2004-01-23 11:43:33 +00:00

47 lines
1.2 KiB
Text

$NetBSD: patch-ao,v 1.1 2004/01/23 11:43:33 agc Exp $
--- mpack/magicStubs.c 2004/01/23 11:08:24 1.1
+++ mpack/magicStubs.c 2004/01/23 11:11:30
@@ -14,6 +14,7 @@
#endif not lint
#include <stdio.h>
+#include <stdarg.h>
#include "misc/magic.h"
#include "utils/hash.h"
#include "utils/geometry.h"
@@ -54,22 +55,26 @@
/* TEXTIO */
/*VARARGS1*/
void
-TxError(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
-char *format;
+TxError(char *format, ...)
{
+ va_list vp;
+
(void) fflush(stdout);
- (void) fprintf(stderr, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ va_start(vp, format);
+ (void) vfprintf(stderr, format, vp);
+ va_end(vp);
(void) fflush(stderr);
}
/*VARARGS1*/
void
-TxPrintf(format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
-char *format;
+TxPrintf(char *format, ...)
{
- (void) fprintf(stdout, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ va_list vp;
+
+ va_start(vp, format);
+ (void) vfprintf(stdout, format, vp);
+ va_end(vp);
}
void