pkgsrc/lang/baci/patches/patch-af
2015-01-25 13:12:54 +00:00

47 lines
1.2 KiB
Text

$NetBSD: patch-af,v 1.3 2015/01/25 13:12:54 joerg Exp $
--- ccomp/bac.y.orig 1999-08-31 16:19:03.000000000 +0000
+++ ccomp/bac.y
@@ -3,6 +3,7 @@
/* based on the grammar for the BenAri Concurrent Pascal compiler */
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <assert.h>
@@ -24,9 +25,6 @@ extern char lasttoken[];
extern void global_init(int argc, char** argv);
extern char *lastident();
-extern int fprintf(FILE*,const char*,...);
-extern int printf(const char*,...);
-extern int free(void*);
extern void yyerror(char*);
extern int yylex(void);
@@ -799,7 +797,7 @@ unsigned_const : unsigned_num
;
unsigned_num : UNSIGNED_INT /* no reals */
- { $$ = strtoi(numbertext,numberbase); }
+ { $$ = my_strtoi(numbertext,numberbase); }
;
extern_decl : extern_func_decl
@@ -1013,6 +1011,7 @@ then_stmt : stmt
the_else : ELSE
{ emit(JUMP); $$ = lc; }
+ ;
switch_hdr : SWITCH '(' expr ')'
{
@@ -1272,6 +1271,7 @@ break_stmt : BREAK ';'
}
}
}
+ ;
return_stmt : the_return opt_expr ';'
{