Convert from varargs to stdarg.h. Fix two other warnings while here.

Now builds with gcc3.
This commit is contained in:
wiz 2004-07-10 21:13:31 +00:00
parent 5ffd04c910
commit 79702022b4
2 changed files with 62 additions and 1 deletions

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.1.1.1 2003/07/08 08:53:19 wiz Exp $
$NetBSD: distinfo,v 1.2 2004/07/10 21:13:31 wiz Exp $
SHA1 (brs.4.00.l1.tar.gz) = 12406ad5738caeb828e0773a45290ed5e098940a
SHA1 (patch-aa) = e56ae128d024387784921ab91a89400be825d304
SHA1 (patch-ab) = 392a451cea87ba91f9a4316dc07c278dc86635b9
SHA1 (patch-ac) = d00c82994c076dd7fc2eadbaf144fdd79a65152a

60
misc/brs/patches/patch-ac Normal file
View file

@ -0,0 +1,60 @@
$NetBSD: patch-ac,v 1.1 2004/07/10 21:13:31 wiz Exp $
--- tsl.c.orig 1994-12-12 04:55:31.000000000 +0100
+++ tsl.c
@@ -95,7 +95,7 @@
\*----------------------------------------------------------------------*/
#include <stdio.h>
-#include <varargs.h>
+#include <stdarg.h>
/* #include <search.h> */
#include "tsl.h"
@@ -145,7 +145,8 @@ int tsl_maxbuffusage=0x100000; /* Max bu
-tsl_error( fatal, va_alist )
+void
+tsl_error(int fatal, ...)
/*----------------------------------------------------------------------
| NAME:
| tsl_error
@@ -154,21 +155,16 @@ tsl_error( fatal, va_alist )
| Report an error specific to the TSL library.
|
| fatal TRUE if the error should cause an exit.
-| va_alist Variable argument list for printing the error
-| report.
|
| HISTORY:
| 890904 cc Created.
|
\*----------------------------------------------------------------------*/
-
-int fatal;
-va_dcl
{
va_list ap;
char *format;
- va_start(ap);
+ va_start(ap, fatal);
format = va_arg(ap, char *);
vfprintf(stderr, format, ap);
@@ -626,11 +622,11 @@ int memlimit;
if (tsl_maxbuffs < 1) tsl_maxbuffs = 1;
tsl_firstbuffer.next = &tsl_lastbuffer;
tsl_firstbuffer.prev = NULL;
- tsl_firstbuffer.win = NULL;
+ tsl_firstbuffer.win = 0;
tsl_firstbuffer.bufferp = NULL;
tsl_lastbuffer.prev = &tsl_firstbuffer;
tsl_lastbuffer.next = NULL;
- tsl_lastbuffer.win = NULL;
+ tsl_lastbuffer.win = 0;
tsl_lastbuffer.bufferp = NULL;
/* Global buffer for compressed text. Much bigger than needed. :-) */