From 4ee0b3f2913e21b6ef7739450682a2e760fba864 Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 29 Dec 2003 22:26:33 +0000 Subject: [PATCH] switch to stdarg.h --- cad/chipmunk/patches/patch-psys_src_newcrt_c | 93 ++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 cad/chipmunk/patches/patch-psys_src_newcrt_c diff --git a/cad/chipmunk/patches/patch-psys_src_newcrt_c b/cad/chipmunk/patches/patch-psys_src_newcrt_c new file mode 100644 index 00000000000..4900ff2588a --- /dev/null +++ b/cad/chipmunk/patches/patch-psys_src_newcrt_c @@ -0,0 +1,93 @@ +$OpenBSD: patch-psys_src_newcrt_c,v 1.1 2003/12/29 22:26:33 espie Exp $ +--- psys/src/newcrt.c.orig 2003-03-12 23:47:35.000000000 +0100 ++++ psys/src/newcrt.c 2003-12-29 23:15:44.000000000 +0100 +@@ -2,11 +2,7 @@ + #define HIRES + + #include +-#ifdef OS2 + #include +-#else +-#include +-#endif + #include + + #include +@@ -307,7 +303,7 @@ uchar c; + } + + +-extern void nc_fprintf(); ++extern void nc_fprintf(FILE *, Char *, ...); + + + static void show_string(str) +@@ -841,17 +837,16 @@ unsigned char *str, *buf; + + #ifndef OS2 + +-void nc_printf(va_alist) +-va_dcl ++void nc_printf(Char *fmt, ...) + { + va_list args; +- Char *fmt, fmt2[1024]; ++ ++ Char fmt2[1024]; + Char printbuffer[2000], printbuffer2[2000]; + Char *p1, *p2; + + /* fprintf(stderr, "nc_printf() called, cursor at (%d,%d)\n", XPOS, YPOS); */ +- va_start(args); +- fmt = va_arg(args, Char *); ++ va_start(args, fmt); + + if (! nc_text_in_window) { + fix_string(fmt, fmt2); +@@ -907,21 +902,17 @@ Char *fmt; + + #ifndef OS2 + +-void zfprintf(va_alist) +-va_dcl ++void zfprintf(FILE *outfile, Char *fmt, ...) + + { + va_list args; +- FILE *outfile; +- Char *fmt; + Char fmt2[1024]; + Char printbuffer[2000], printbuffer2[2000]; + Char *p1, *p2; + +- va_start(args); +- outfile = va_arg(args, FILE *); +- fmt = va_arg(args, Char *); ++ va_start(args, fmt); + vfprintf(outfile, fmt, args); ++ va_end(args); + } + + #else +@@ -944,18 +935,14 @@ Char *fmt; + + #ifndef OS2 + +-void nc_fprintf(va_alist) +-va_dcl ++void nc_fprintf(FILE *outfile, Char *fmt, ...) + { + va_list args; +- FILE *outfile; +- Char *fmt, fmt2[1024]; ++ Char fmt2[1024]; + Char printbuffer[2000], printbuffer2[2000]; + Char *p1, *p2; + +- va_start(args); +- outfile = va_arg(args, FILE *); +- fmt = va_arg(args, Char *); ++ va_start(args, fmt); + /* + vfprintf(outfile, fmt, args); + */