Fixup fromcvs/togit conversion
[pkgsrcv2.git] / devel / as31 / patches / patch-as31.y
1 $NetBSD$
2
3 --- as31.y.orig 2012-07-03 10:49:15.000000000 +0000
4 +++ as31.y
5 @@ -28,6 +28,10 @@
6  
7  #define YYSTYPE union ystack
8  
9 +void genbyte(int);
10 +void emitbyte(int);
11 +void emitaddr(unsigned long);
12 +
13  extern int lineno;
14  extern int dashl;
15  extern char *asmfile;
16 @@ -948,6 +952,10 @@ relative   : expr
17  
18  %%
19  
20 +#include <stdarg.h>
21 +void error(const char *, ...);
22 +void warning(const char *, ...);
23 +
24  /* ---------------------------------------------------------------------- */
25  
26  yyerror(s)
27 @@ -963,11 +971,13 @@ char *s;
28   *     termination.
29   */
30  
31 -error(cs,a1,a2,a3,a4,a5,a6)
32 -char *cs,*a1,*a2,*a3,*a4,*a5,*a6;
33 +void error(const char *cs, ...)
34  {
35 +       va_list ap;
36 +       va_start(ap, cs);
37         fprintf(stderr,"File: %s, line: %d, ",asmfile,lineno);
38 -       fprintf(stderr,cs,a1,a2,a3,a4,a5,a6);
39 +       vfprintf(stderr,cs, ap);
40 +       va_end(ap);
41         fprintf(stderr,".\n");
42         longjmp(main_env,1);
43  }
44 @@ -979,12 +989,14 @@ char *cs,*a1,*a2,*a3,*a4,*a5,*a6;
45   *
46   */
47  
48 -warning(cs,a1,a2,a3,a4,a5,a6)
49 -char *cs,*a1,*a2,*a3,*a4,*a5,*a6;
50 +void warning(const char *cs, ...)
51  {
52 +       va_list ap;
53 +       va_start(ap, cs);
54         fatal++;
55         fprintf(stderr,"File: %s, line: %d, ",asmfile,lineno);
56 -       fprintf(stderr,cs,a1,a2,a3,a4,a5,a6);
57 +       vfprintf(stderr,cs, ap);
58 +       va_end(ap);
59         fprintf(stderr,".\n");
60  }
61  
62 @@ -1095,7 +1107,7 @@ char *txt;
63  {
64         int i,j;
65  
66 -       fprintf(listing,show?"%04X: ":"      ",lc);
67 +       fprintf(listing,show?"%04lX: ":"      ",lc);
68  
69         j=0;
70         for(i=0; i<bytecount; i++ ) {
71 @@ -1118,8 +1130,7 @@ char *txt;
72   *
73   */
74  
75 -genbyte(b)
76 -int b;
77 +void genbyte(int b)
78  {
79         if( bytecount < sizeof(bytebuf) )
80                 bytebuf[bytecount++] = b;