From 5b6aee2a90b337856aa23fd24a4637f488929ed0 Mon Sep 17 00:00:00 2001 From: Robert de Bath Date: Mon, 13 Aug 2012 22:10:14 +0200 Subject: Import Dev86src-0.16.19.tar.gz --- bcc/bcc.c | 14 ++++++++++++-- bcc/express.c | 8 ++++---- bcc/scan.c | 12 ++++++------ 3 files changed, 22 insertions(+), 12 deletions(-) (limited to 'bcc') diff --git a/bcc/bcc.c b/bcc/bcc.c index 9e5269f..574752c 100644 --- a/bcc/bcc.c +++ b/bcc/bcc.c @@ -17,6 +17,7 @@ */ #include #ifdef __STDC__ +#include #include #ifndef MSDOS #include @@ -129,7 +130,7 @@ char * tmpdir = "/tmp/"; #endif int main P((int argc, char **argv)); -void getargs P((int argc, char **argv)); + void add_prefix P((char * path)); void build_prefix P((char * path1, char * path2, char * path3)); void run_aspreproc P((struct file_list * file)); @@ -145,6 +146,7 @@ void command_arch P((void)); void command_opts P((int opykey)); void newfilename P((struct file_list * file, int last_stage, int new_extn, int use_o)); void run_unlink P((void)); +void validate_link_opt P((char * option)); void validate_link_opts P((void)); void append_file P((char * filename, int ftype)); void append_option P((char * option, int otype)); @@ -157,6 +159,7 @@ char * copystr P((char * str)); char * catstr P((char * str, char * str2)); void reset_prefix_path P((void)); void run_command P((struct file_list * file)); +void getargs P((int argc, char ** argv)); char * prefix_path = ""; @@ -528,7 +531,8 @@ run_link() } void -validate_link_opt(char * option) +validate_link_opt(option) +char * option; { int err = 0; if (option[0] != '-') return; @@ -1308,10 +1312,16 @@ void reset_prefix_path() for(d=s=ptr; d && *s; s=d) { +#ifndef __BCC__ +#ifdef PATH_MAX + char buf[PATH_MAX]; +#else #ifdef MAXPATHLEN char buf[MAXPATHLEN]; #else char buf[1024]; +#endif +#endif #endif free(temp); diff --git a/bcc/express.c b/bcc/express.c index 66298d3..9533d91 100644 --- a/bcc/express.c +++ b/bcc/express.c @@ -20,7 +20,7 @@ PRIVATE unsigned insizeof; /* nest level for getsizeof */ /* on p49 of K & R */ FORWARD struct nodestruct *cast_exp P((void)); -FORWARD struct nodestruct *exp2 P((void)); +FORWARD struct nodestruct *expr2 P((void)); FORWARD struct nodestruct *exp3to12 P((fastin_pt lprecedence)); FORWARD struct nodestruct *listargs P((void)); FORWARD struct nodestruct *postfix_exp P((bool_pt seenlp)); @@ -54,7 +54,7 @@ PUBLIC struct nodestruct *assignment_exp() struct nodestruct *lhs; op_pt op; - lhs = exp2(); + lhs = expr2(); if (sym >= ASSIGNOP && sym <= SUBABOP) /* assign-op syms in order! */ { op = sym; @@ -77,7 +77,7 @@ PUBLIC struct nodestruct *expression() return lhs; } -PRIVATE struct nodestruct *exp2() +PRIVATE struct nodestruct *expr2() { struct nodestruct *lhs; struct nodestruct *rhs; @@ -88,7 +88,7 @@ PRIVATE struct nodestruct *exp2() nextsym(); rhs = expression(); colon(); - lhs = node(CONDOP, lhs, node(COLONOP, rhs, exp2())); + lhs = node(CONDOP, lhs, node(COLONOP, rhs, expr2())); } return lhs; } diff --git a/bcc/scan.c b/bcc/scan.c index 7db7629..17f22f5 100644 --- a/bcc/scan.c +++ b/bcc/scan.c @@ -149,27 +149,27 @@ int asm_only; #endif while (!asm_only || asmmode) { - int sym = SYMOFCHAR(ch); + int cppsym = SYMOFCHAR(ch); - switch (sym) + switch (cppsym) { case CONTROL: - if( !start_of_line ) sym=BADCHAR; + if( !start_of_line ) cppsym=BADCHAR; break; case WHITESPACE: break; case SPECIALCHAR: - if( ch == '\\' ) sym=BADCHAR; + if( ch == '\\' ) cppsym=BADCHAR; start_of_line = 1; break; case CHARCONST: case STRINGCONST: - if( asmmode ) sym=BADCHAR; + if( asmmode ) cppsym=BADCHAR; default: start_of_line = 0; } - switch (sym) + switch (cppsym) { case CHARCONST: case STRINGCONST: -- cgit v1.2.1