summaryrefslogtreecommitdiff
path: root/cad/magic
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2004-01-23 11:43:33 +0000
committeragc <agc@pkgsrc.org>2004-01-23 11:43:33 +0000
commitf475db42cd60f003ac69a49c68995bef83b83363 (patch)
tree0740f624c719ab26cdc9b3e1843fe61e280c91e7 /cad/magic
parenta048c7525d5f1c904f618dfd0ebc5ee8276fc0b5 (diff)
downloadpkgsrc-f475db42cd60f003ac69a49c68995bef83b83363.tar.gz
Use stdarg rather than varargs.
This code is old - it's been ages since I've seen definitions for sunview and X10...
Diffstat (limited to 'cad/magic')
-rw-r--r--cad/magic/distinfo20
-rw-r--r--cad/magic/patches/patch-aa33
-rw-r--r--cad/magic/patches/patch-ab7
-rw-r--r--cad/magic/patches/patch-ac30
-rw-r--r--cad/magic/patches/patch-ad33
-rw-r--r--cad/magic/patches/patch-ae13
-rw-r--r--cad/magic/patches/patch-af39
-rw-r--r--cad/magic/patches/patch-ag12
-rw-r--r--cad/magic/patches/patch-ah12
-rw-r--r--cad/magic/patches/patch-ai30
-rw-r--r--cad/magic/patches/patch-aj74
-rw-r--r--cad/magic/patches/patch-ak95
-rw-r--r--cad/magic/patches/patch-al49
-rw-r--r--cad/magic/patches/patch-am17
-rw-r--r--cad/magic/patches/patch-an10
-rw-r--r--cad/magic/patches/patch-ao47
-rw-r--r--cad/magic/patches/patch-ap10
17 files changed, 513 insertions, 18 deletions
diff --git a/cad/magic/distinfo b/cad/magic/distinfo
index 49a03b7b99c..ff98b179f87 100644
--- a/cad/magic/distinfo
+++ b/cad/magic/distinfo
@@ -1,6 +1,20 @@
-$NetBSD: distinfo,v 1.2 2002/07/14 03:47:46 dmcmahill Exp $
+$NetBSD: distinfo,v 1.3 2004/01/23 11:43:33 agc Exp $
SHA1 (magic-7.1.tar.gz) = 176eb4c6a0ff33c6e265e61360c02da4f454f101
Size (magic-7.1.tar.gz) = 3860487 bytes
-SHA1 (patch-aa) = bb18e6672441e404b0969cd1f5cb387ef4f97386
-SHA1 (patch-ab) = c4b516d71ec012593f0559e8d0d1b5bad69d736a
+SHA1 (patch-aa) = bfd5101deed8e5626311798f7dd4e8c80c3d63e7
+SHA1 (patch-ab) = 4168f956b665672ec79e11875f7b948a5be715ba
+SHA1 (patch-ac) = 270cbb68cb3b1ff5e635490ac1dfe13e3dcfc0d0
+SHA1 (patch-ad) = e9db83580fc1b34906d9f5e151479e46f7da444a
+SHA1 (patch-ae) = 27555db8f06d1f8a7a6f002e7dfccf14a4db2765
+SHA1 (patch-af) = 415c0252b38dab9460697e2b3d87af83518ea980
+SHA1 (patch-ag) = b8dcf69daab42dfd24bdb2038733f88f269cc7dc
+SHA1 (patch-ah) = 31654bb19cf41bbd07d8ecd3d8b5c529684638a2
+SHA1 (patch-ai) = 14c2896f98b4dcf3fef08047c947b03cd589f643
+SHA1 (patch-aj) = 81a27ad988cdd6423040939c32abc329efeaa69b
+SHA1 (patch-ak) = 18c5a23f334c9878160c104d12be4f4e71da6d59
+SHA1 (patch-al) = 1ef7780a48da86d690b9cf8a31bd9dc416087a09
+SHA1 (patch-am) = c4e695c370db01775b321970a327ea0851fdf437
+SHA1 (patch-an) = 83e9e5242b483f398962a6237551b860749e70f0
+SHA1 (patch-ao) = 747c18b5e997d652054d17acbdb1fee0748d77a8
+SHA1 (patch-ap) = b2b9e1c45dbefd1d93205bcc15ea713c38181598
diff --git a/cad/magic/patches/patch-aa b/cad/magic/patches/patch-aa
index 67417c664ff..17f40460d15 100644
--- a/cad/magic/patches/patch-aa
+++ b/cad/magic/patches/patch-aa
@@ -1,19 +1,24 @@
-$NetBSD: patch-aa,v 1.1.1.1 2002/04/06 21:37:29 dmcmahill Exp $
+$NetBSD: patch-aa,v 1.2 2004/01/23 11:43:33 agc Exp $
--- misc/magic.h.orig Fri Sep 21 11:15:45 2001
+++ misc/magic.h Wed Mar 13 12:37:46 2002
-@@ -147,69 +147,11 @@
+@@ -99,7 +99,7 @@
+ : FALSE)
+ #else
+ #define ASSERT(p, where) (FALSE)
+-#endif PARANOID
++#endif /* PARANOID */
+
+
+ /* ------------------------ Malloc/free ------------------------------- */
+@@ -146,71 +146,13 @@
+ *
*/
-#ifdef i386
-#define IS_LITTLE_ENDIAN /* Intel x86 processors. */
-+#include <sys/endian.h>
-+#if BYTE_ORDER==BIG_ENDIAN
-+#define IS_BIG_ENDIAN
-+#else
-+#define IS_LITTLE_ENDIAN
- #endif
-
+-#endif
+-
-#ifdef linux
-#define IS_LITTLE_ENDIAN /* Intel x86 processors running Linux >=.99p7. */
-#endif
@@ -65,8 +70,13 @@ $NetBSD: patch-aa,v 1.1.1.1 2002/04/06 21:37:29 dmcmahill Exp $
-
-#ifdef ALPHA
-#define IS_LITTLE_ENDIAN /* Digital Alpha AXP */
--#endif
--
++#include <sys/endian.h>
++#if BYTE_ORDER==BIG_ENDIAN
++#define IS_BIG_ENDIAN
++#else
++#define IS_LITTLE_ENDIAN
+ #endif
+
-/* Well, how'd we do? */
-
-#if !defined(IS_BIG_ENDIAN) && !defined(IS_LITTLE_ENDIAN)
@@ -77,3 +87,4 @@ $NetBSD: patch-aa,v 1.1.1.1 2002/04/06 21:37:29 dmcmahill Exp $
-#endif
/* ------- Configuration: Handle Missing Routines/Definitions ------- */
+
diff --git a/cad/magic/patches/patch-ab b/cad/magic/patches/patch-ab
index 52a5c7b4022..17e6bab8207 100644
--- a/cad/magic/patches/patch-ab
+++ b/cad/magic/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.2 2002/07/14 03:47:46 dmcmahill Exp $
+$NetBSD: patch-ab,v 1.3 2004/01/23 11:43:33 agc Exp $
--- scripts/config.orig Sat Jul 13 23:25:57 2002
+++ scripts/config
-@@ -191,15 +191,22 @@
+@@ -191,15 +191,21 @@
breaksw
case "2":
echo "NetBSD 1.x selected"
@@ -12,8 +12,7 @@ $NetBSD: patch-ab,v 1.2 2002/07/14 03:47:46 dmcmahill Exp $
+ else if (-f /usr/libexec/cpp0) then
+ set cpp = "/usr/libexec/cpp0 -P -traditional"
+ else
-+ echo "I am not able to figure out where cpp is on your system"
-+ exit 1
++ set cpp = "cc -E -traditional"
+ endif
if ($?usingX11) then
echo "NOTE: Since you are running NetBSD using X11, we're assuming"
diff --git a/cad/magic/patches/patch-ac b/cad/magic/patches/patch-ac
new file mode 100644
index 00000000000..31283bf6273
--- /dev/null
+++ b/cad/magic/patches/patch-ac
@@ -0,0 +1,30 @@
+$NetBSD: patch-ac,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- database/database.h.in 2004/01/23 09:50:02 1.1
++++ database/database.h.in 2004/01/23 09:50:45
+@@ -26,13 +26,13 @@
+
+ #ifndef _MAGIC
+ int err0 = Need_to_include_misc/magic_header;
+-#endif _MAGIC
++#endif /* _MAGIC */
+ #ifndef _TILES
+ int err1 = Need_to_include_tiles/tile_header;
+-#endif _TILES
++#endif /* _TILES */
+ #ifndef _HASH
+ int err2 = Need_to_include_utils/hash_header;
+-#endif _HASH
++#endif /* _HASH */
+
+ /* ----------------------- Tunable constants -------------------------- */
+
+@@ -412,7 +412,7 @@
+ bool side;
+ } DiagInfo;
+
+-#endif NONMANHATTAN
++#endif /* NONMANHATTAN */
+
+ /*
+ * Structure to pass to dbcUnconnectFunc(), containing the overlap
diff --git a/cad/magic/patches/patch-ad b/cad/magic/patches/patch-ad
new file mode 100644
index 00000000000..6c4a6ff3086
--- /dev/null
+++ b/cad/magic/patches/patch-ad
@@ -0,0 +1,33 @@
+$NetBSD: patch-ad,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- tech/tech.c 2004/01/23 09:51:59 1.1
++++ tech/tech.c 2004/01/23 09:52:54
+@@ -31,8 +31,8 @@
+ #include "utils/malloc.h"
+
+ #ifndef NO_VARARGS
+-#include <varargs.h>
+-#endif NO_VARARGS
++#include <stdarg.h>
++#endif /* NO_VARARGS */
+
+ global char *TechDefault = NULL;
+
+@@ -415,15 +415,12 @@
+ /*VARARGS0*/
+
+ void
+-TechError(va_alist)
+-va_dcl
++TechError(char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+
+ TechPrintLine();
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(stderr, fmt, args);
+ va_end(args);
+ }
diff --git a/cad/magic/patches/patch-ae b/cad/magic/patches/patch-ae
new file mode 100644
index 00000000000..dfd1430ed27
--- /dev/null
+++ b/cad/magic/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- ext2sim/ext2sim.c 2004/01/23 09:53:44 1.1
++++ ext2sim/ext2sim.c 2004/01/23 09:54:02
+@@ -19,7 +19,7 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <stdlib.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "misc/magic.h"
+ #include "utils/geometry.h"
+ #include "utils/hash.h"
diff --git a/cad/magic/patches/patch-af b/cad/magic/patches/patch-af
new file mode 100644
index 00000000000..d1d44e611b3
--- /dev/null
+++ b/cad/magic/patches/patch-af
@@ -0,0 +1,39 @@
+$NetBSD: patch-af,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- ext2spice/ext2spice.c 2004/01/23 09:54:56 1.1
++++ ext2spice/ext2spice.c 2004/01/23 09:56:01
+@@ -18,7 +18,7 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "misc/magic.h"
+ #include "utils/malloc.h"
+ #include "utils/geometry.h"
+@@ -1586,22 +1586,19 @@
+ }
+
+ /* debugging stuff */
+-#include <varargs.h>
++#include <stdarg.h>
+
+ #define DBG 1
+
+-DBPRINT( va_alist )
+- va_dcl
++DBPRINT( char *fmt, ... )
+ {
+ va_list args;
+- char *fmt;
+ FILE *fp;
+ char buff[ 300 ];
+
+ if ( DBG ) {
+- va_start( args );
++ va_start( args, fmt );
+ fp = stderr ;
+- fmt = va_arg( args, char * );
+ (void) vsprintf( buff, fmt, args );
+ va_end( args );
+
diff --git a/cad/magic/patches/patch-ag b/cad/magic/patches/patch-ag
new file mode 100644
index 00000000000..1e825e9712a
--- /dev/null
+++ b/cad/magic/patches/patch-ag
@@ -0,0 +1,12 @@
+$NetBSD: patch-ag,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- extcheck/extcheck.c 2004/01/23 09:56:51 1.1
++++ extcheck/extcheck.c 2004/01/23 09:57:23
+@@ -28,7 +28,6 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
+-#include <varargs.h>
+ #include "misc/magic.h"
+ #include "misc/paths.h"
+ #include "utils/geometry.h"
diff --git a/cad/magic/patches/patch-ah b/cad/magic/patches/patch-ah
new file mode 100644
index 00000000000..ecdace8464b
--- /dev/null
+++ b/cad/magic/patches/patch-ah
@@ -0,0 +1,12 @@
+$NetBSD: patch-ah,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- extflat/EFargs.c 2004/01/23 09:58:12 1.1
++++ extflat/EFargs.c 2004/01/23 09:58:38
+@@ -24,7 +24,6 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <stdlib.h>
+-#include <varargs.h>
+ #ifdef SYSV
+ #include <string.h>
+ #endif
diff --git a/cad/magic/patches/patch-ai b/cad/magic/patches/patch-ai
new file mode 100644
index 00000000000..76da088a510
--- /dev/null
+++ b/cad/magic/patches/patch-ai
@@ -0,0 +1,30 @@
+$NetBSD: patch-ai,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- extflat/EFread.c 2004/01/23 09:58:12 1.1
++++ extflat/EFread.c 2004/01/23 09:59:29
+@@ -24,7 +24,7 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <stdlib.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include "misc/magic.h"
+ #include "utils/geometry.h"
+ #include "utils/hash.h"
+@@ -534,14 +534,12 @@
+ */
+
+ /*VARARGS1*/
+-efReadError(fmt, va_alist)
+- char *fmt;
+- va_dcl
++efReadError(char *fmt, ...)
+ {
+ va_list args;
+
+ (void) printf("%s, line %d: ", efReadFileName, efReadLineNum);
+- va_start(args);
++ va_start(args, fmt);
+ vfprintf(stdout, fmt, args);
+ va_end(args);
+ (void) fflush(stdout);
diff --git a/cad/magic/patches/patch-aj b/cad/magic/patches/patch-aj
new file mode 100644
index 00000000000..83055fd13de
--- /dev/null
+++ b/cad/magic/patches/patch-aj
@@ -0,0 +1,74 @@
+$NetBSD: patch-aj,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- graphics/grMain.c 2004/01/23 10:00:55 1.1
++++ graphics/grMain.c 2004/01/23 10:02:35
+@@ -117,11 +117,7 @@
+ #ifdef SUNVIEW
+ #include <pixrect/pixrect.h>
+ #endif
+-#endif sun
+-
+-#ifndef NO_VARARGS
+-#include <varargs.h>
+-#endif NO_VARARGS
++#endif /* sun */
+
+ extern char *getenv();
+ extern int errno;
+@@ -153,21 +149,21 @@
+ "SUN110",
+ "SUN160",
+ "SUNBW",
+-#endif SUNVIEW
++#endif /* SUNVIEW */
+ #ifdef SUN120
+ "SUN120",
+-#endif SUN120
++#endif /* SUN120 */
+ #ifdef AED
+ "UCB512",
+ "UCB512N",
+ "AED767",
+ "AED1024",
+ "UCB1024",
+-#endif AED
++#endif /* AED */
+ #ifdef X10
+ "XWIND",
+ "X10",
+-#endif X10
++#endif /* X10 */
+ #ifdef X11
+ "XWIND",
+ "X11",
+@@ -194,25 +190,25 @@
+ sunWSetDisplay,
+ sunWSetDisplay,
+ sunWSetDisplay,
+-#endif SUNVIEW
++#endif /* SUNVIEW */
+ #ifdef SUN120
+ sunSetDisplay,
+-#endif SUN120
++#endif /* SUN120 */
+ #ifdef AED
+ aedSetDisplay, /* Handles all AEDs (UCB512s, AED767s, and AED1024s) */
+ aedSetDisplay,
+ aedSetDisplay,
+ aedSetDisplay,
+ aedSetDisplay,
+-#endif AED
++#endif /* AED */
+ #ifdef X10
+ x10aSetDisplay,
+ x10aSetDisplay,
+-#endif X10
++#endif /* X10 */
+ #ifdef X11
+ x11suSetDisplay,
+ x11suSetDisplay,
+-#endif X11
++#endif /* X11 */
+ #ifdef OGL
+ oglSetDisplay,
+ oglSetDisplay,
diff --git a/cad/magic/patches/patch-ak b/cad/magic/patches/patch-ak
new file mode 100644
index 00000000000..324d5605990
--- /dev/null
+++ b/cad/magic/patches/patch-ak
@@ -0,0 +1,95 @@
+$NetBSD: patch-ak,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- textio/txOutput.c 2004/01/23 10:03:21 1.1
++++ textio/txOutput.c 2004/01/23 10:05:43
+@@ -42,7 +42,7 @@
+ #include "utils/malloc.h"
+
+ #ifndef NO_VARARGS
+-#include <varargs.h>
++#include <stdarg.h>
+ #endif NO_VARARGS
+
+ /* When a pipe has been opened to "more", the following variables
+@@ -82,16 +82,11 @@
+ /*VARARGS0*/
+
+ void
+-txFprintfBasic(va_alist)
+-va_dcl
++txFprintfBasic(FILE *f, char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+- FILE *f;
+
+- va_start(args);
+- f = va_arg(args, FILE *);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+ va_end(args);
+ }
+@@ -135,11 +130,9 @@
+ /*VARARGS0*/
+
+ void
+-TxPrintf(va_alist)
+-va_dcl
++TxPrintf(char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+ FILE *f;
+
+ if (txPrintFlag)
+@@ -156,16 +149,14 @@
+ if (txHavePrompt)
+ {
+ TxUnPrompt();
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+ va_end(args);
+ TxPrompt();
+ }
+ else
+ {
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+ va_end(args);
+ }
+@@ -306,11 +297,9 @@
+ #ifndef NO_VARARGS
+
+ void
+-TxError(va_alist)
+-va_dcl
++TxError(char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+ FILE *f;
+
+ (void) fflush(stdout);
+@@ -321,15 +310,13 @@
+ if (txHavePrompt)
+ {
+ TxUnPrompt();
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+ va_end(args);
+ TxPrompt();
+ }
+ else {
+- va_start(args);
+- fmt = va_arg(args, char *);
++ va_start(args, fmt);
+ (void) GrVfprintf(f, fmt, args);
+ va_end(args);
+ }
diff --git a/cad/magic/patches/patch-al b/cad/magic/patches/patch-al
new file mode 100644
index 00000000000..3c4f78e4a42
--- /dev/null
+++ b/cad/magic/patches/patch-al
@@ -0,0 +1,49 @@
+$NetBSD: patch-al,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- utils/LIBtextio.c 2004/01/23 10:06:25 1.1
++++ utils/LIBtextio.c 2004/01/23 10:07:23
+@@ -22,7 +22,7 @@
+ #endif not lint
+
+ #include <stdio.h>
+-#include <varargs.h>
++#include <stdarg.h>
+
+ /*
+ * ----------------------------------------------------------------------------
+@@ -65,15 +65,13 @@
+ */
+
+ /*VARARGS*/
+-TxError(fmt, va_alist)
+- char *fmt;
+- va_dcl
++TxError(char *fmt, ...)
+ {
+ va_list ap;
+
+ (void) fflush(stdout);
+ (void) fflush(stderr);
+- va_start(ap);
++ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ (void) fflush(stderr);
+@@ -96,15 +94,13 @@
+ */
+
+ /*VARARGS*/
+-TxPrintf(fmt, va_alist)
+- char *fmt;
+- va_dcl
++TxPrintf(char *fmt, ...)
+ {
+ va_list ap;
+
+ (void) fflush(stderr);
+ (void) fflush(stdout);
+- va_start(ap);
++ va_start(ap, fmt);
+ vfprintf(stdout, fmt, ap);
+ va_end(ap);
+ (void) fflush(stdout);
diff --git a/cad/magic/patches/patch-am b/cad/magic/patches/patch-am
new file mode 100644
index 00000000000..109bf68db9b
--- /dev/null
+++ b/cad/magic/patches/patch-am
@@ -0,0 +1,17 @@
+$NetBSD: patch-am,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- textio/textio.h 2004/01/23 10:23:44 1.1
++++ textio/textio.h 2004/01/23 10:25:00
+@@ -29,10 +29,10 @@
+ #endif
+
+ /* printing procedures */
+-extern void TxPrintf();
++extern void TxPrintf(char *, ...);
+ extern bool TxPrintOn(); /* enables TxPrintf output */
+ extern bool TxPrintOff(); /* disables TxPrintf output */
+-extern void TxError();
++extern void TxError(char *, ...);
+ extern void TxFlush();
+ extern void TxVisChar();
+ extern void TxUseMore();
diff --git a/cad/magic/patches/patch-an b/cad/magic/patches/patch-an
new file mode 100644
index 00000000000..0c6800b0798
--- /dev/null
+++ b/cad/magic/patches/patch-an
@@ -0,0 +1,10 @@
+$NetBSD: patch-an,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- textio/textioInt.h 2004/01/23 11:06:03 1.1
++++ textio/textioInt.h 2004/01/23 11:07:01
+@@ -56,4 +56,4 @@
+ #endif SYSV
+
+ extern int TxGetInputEvent();
+-extern void txFprintfBasic();
++extern void txFprintfBasic(FILE *, char *, ...);
diff --git a/cad/magic/patches/patch-ao b/cad/magic/patches/patch-ao
new file mode 100644
index 00000000000..ab68a618e8a
--- /dev/null
+++ b/cad/magic/patches/patch-ao
@@ -0,0 +1,47 @@
+$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
diff --git a/cad/magic/patches/patch-ap b/cad/magic/patches/patch-ap
new file mode 100644
index 00000000000..9cc3c7268c8
--- /dev/null
+++ b/cad/magic/patches/patch-ap
@@ -0,0 +1,10 @@
+$NetBSD: patch-ap,v 1.1 2004/01/23 11:43:33 agc Exp $
+
+--- tech/tech.h 2004/01/23 11:13:01 1.1
++++ tech/tech.h 2004/01/23 11:13:41
+@@ -23,4 +23,4 @@
+ /* ----------------- Exported variables and procedures ---------------- */
+
+ extern char *TechDefault; /* Name of default technology */
+-extern void TechError();
++extern void TechError(char *, ...);