diff options
author | Robert de Bath <rdebath@poboxes.com> | 2012-08-13 22:10:14 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:48:50 +0200 |
commit | 5b6aee2a90b337856aa23fd24a4637f488929ed0 (patch) | |
tree | 10d49ef991ff9fa563f71a9fd022614ddeea5fe6 /bcc | |
parent | dddc44a59e3e393d5440a06e2b0535aeb1304f77 (diff) | |
download | dev86-5b6aee2a90b337856aa23fd24a4637f488929ed0.tar.gz |
Import Dev86src-0.16.19.tar.gzv0.16.19
Diffstat (limited to 'bcc')
-rw-r--r-- | bcc/bcc.c | 14 | ||||
-rw-r--r-- | bcc/express.c | 8 | ||||
-rw-r--r-- | bcc/scan.c | 12 |
3 files changed, 22 insertions, 12 deletions
@@ -17,6 +17,7 @@ */ #include <stdio.h> #ifdef __STDC__ +#include <limits.h> #include <stdlib.h> #ifndef MSDOS #include <unistd.h> @@ -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,11 +1312,17 @@ 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); d=strchr(s, ':'); 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; } @@ -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: |