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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
--- src/irsim/prints.c.orig Tue Dec 9 18:54:57 2003
+++ src/irsim/prints.c Tue Dec 9 18:55:15 2003
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <stdarg.h>
#else
-#include <varargs.h>
+#include <stdarg.h>
#endif /* OS2 */
#include "defs.h"
@@ -50,25 +50,15 @@
/* VARARGS */
-#ifndef OS2
-public void lprintf( va_alist )
- va_dcl
-#else
public void lprintf(FILE *max, ... )
-#endif /* OS2 */
{
va_list args;
char *fmt;
FILE *fp;
char buff[ 300 ];
-#ifndef OS2
- va_start( args );
- fp = va_arg( args, FILE * );
-#else
va_start(args, max);
fp = (FILE *)max;
-#endif /* OS2 */
fmt = va_arg( args, char * );
(void) vsprintf( buff, fmt, args );
va_end( args );
@@ -84,12 +74,7 @@
/* VARARGS */
-#ifndef OS2
-public void error( va_alist )
- va_dcl
-#else
public void error(int max, ...)
-#endif /* OS2 */
{
va_list args;
char *filename;
@@ -97,14 +82,9 @@
char *fmt;
char buf1[ 100 ], buf2[ 200 ];
-#ifndef OS2
- va_start( args );
- filename = va_arg( args, char * );
-#else
filename = (char *)max;
max = 12;
va_start(args, max);
-#endif /* OS2 */
lineno = va_arg( args, int );
fmt = va_arg( args, char * );
(void) sprintf( buf1, "(%s,%d): ", filename, lineno );
|