summaryrefslogtreecommitdiff
path: root/lang/elk/patches/patch-av
blob: c9bb6344efb97b8b071543e2d387f1e97c101878 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
$NetBSD: patch-av,v 1.1 2004/03/28 15:51:25 uebayasi Exp $

--- src/error.c.orig	Sat Aug  5 19:33:48 1995
+++ src/error.c
@@ -1,5 +1,5 @@
 #include <ctype.h>
-#include <varargs.h>
+#include <stdarg.h>
 
 #include "kernel.h"
 
@@ -40,13 +40,11 @@ void Set_App_Name (name) char *name; {
 /*VARARGS1*/
 Fatal_Error (foo) char *foo; { foo = foo; }
 #else
-Fatal_Error (va_alist) va_dcl {
+Fatal_Error (char *fmt, ...) {
     va_list args;
-    char *fmt;
     
     Disable_Interrupts;
-    va_start (args);
-    fmt = va_arg (args, char *);
+    va_start (args, fmt);
     (void)fflush (stdout);
     if (appname)
 	fprintf (stderr, "\n%s: fatal error: ", appname);
@@ -89,15 +87,14 @@ Uncatchable_Error (errmsg) char *errmsg;
 /*VARARGS1*/
 Primitive_Error (foo) char *foo; { foo = foo; }
 #else
-Primitive_Error (va_alist) va_dcl {
+Primitive_Error (char *fmt, ...) {
     va_list args;
-    register char *p, *fmt;
+    register char *p;
     register i, n;
     Object msg, sym, argv[10];
     GC_Node; GCNODE gcv;
 
-    va_start (args);
-    fmt = va_arg (args, char *);
+    va_start (args, fmt);
     for (n = 0, p = fmt; *p; p++)
 	if (*p == '~' && p[1] != '~' && p[1] != '%'
 		&& p[1] != 'E' && p[1] != 'e')