switch to stdarg.h
This commit is contained in:
parent
cab5dd0746
commit
4ee0b3f291
93
cad/chipmunk/patches/patch-psys_src_newcrt_c
Normal file
93
cad/chipmunk/patches/patch-psys_src_newcrt_c
Normal file
@ -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 <stdio.h>
|
||||
-#ifdef OS2
|
||||
#include <stdarg.h>
|
||||
-#else
|
||||
-#include <varargs.h>
|
||||
-#endif
|
||||
#include <signal.h>
|
||||
|
||||
#include <p2c/p2c.h>
|
||||
@@ -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);
|
||||
*/
|
Loading…
Reference in New Issue
Block a user