1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

- Fix build on -current (varargs -> stdarg)

PR:		56156
Submitted by:	Michael Edenfield <kutulu@kutulu.org>
This commit is contained in:
Kirill Ponomarev 2003-08-29 22:06:15 +00:00
parent aac91557ee
commit ca72047013
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88009

View File

@ -1,5 +1,14 @@
--- blockade.c.orig Fri Aug 23 16:51:21 2002
+++ blockade.c Fri Aug 23 16:51:47 2002
--- blockade.c.orig Mon May 24 16:16:10 1999
+++ blockade.c Fri Aug 29 17:10:26 2003
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <varargs.h>
+#include <stdarg.h>
#include <sys/time.h>
#include <ctype.h>
@@ -22,7 +22,6 @@
#include <X11/keysym.h>
#include <X11/Xresource.h>
@ -8,12 +17,83 @@
#define NEW(t) ((t *)malloc(sizeof(t)))
#define OLD(v) free((char *)(v))
@@ -33,8 +32,6 @@
#include "blockade-snd.h"
@@ -34,8 +33,6 @@
char **argvec;
-
-char *getenv();
-char *getenv();
-
XrmDatabase db;
char *defaults = "\
*Background: black\n\
@@ -285,15 +282,12 @@
/********************************************************************/
/********************************************************************/
-void bugchk(va_alist)
-va_dcl
+void bugchk(char *fmt, ...)
{
va_list ap;
- char *fmt;
fprintf(stderr,"INTERNAL ERROR: ");
- va_start(ap);
- fmt = va_arg(ap,char *);
+ va_start(ap, fmt);
vfprintf(stderr,fmt,ap);
va_end(ap);
fprintf(stderr,"\n");
@@ -1060,24 +1054,22 @@
winshadow.font = None; /* ie, the default font */
}
-void setup_gc(va_alist)
-va_dcl
+void setup_gc(long int bit, ...)
{
va_list ap;
- long int bit;
int setdeffont;
unsigned long int gcmask;
GC gc;
XGCValues *shadow;
XGCValues gcval;
- va_start(ap);
+ va_start(ap, bit);
gc = wingc;
shadow = &winshadow;
setdeffont = 0;
gcmask = 0;
while (1)
- { bit = va_arg(ap,long int);
+ {
switch (bit)
{ default:
fprintf(stderr,"Bad bit 0x%lx to setup_gc\n",bit);
@@ -1125,6 +1117,7 @@
}
break;
}
+ bit = va_arg(ap,long int);
}
}
@@ -2831,14 +2824,11 @@
XMoveResizeWindow(disp,msgwin,(topw-msg_w)/2,gamey+(gameh-msg_h)/2,msg_w,msg_h);
}
-void popmsg(va_alist)
-va_dcl
+void popmsg(char *fmt, ...)
{
va_list ap;
- char *fmt;
- va_start(ap);
- fmt = va_arg(ap,char *);
+ va_start(ap, fmt);
vsprintf(&msg_buf[0],fmt,ap);
msg_len = strlen(&msg_buf[0]);
va_end(ap);