diff options
author | Robert de Bath <rdebath@poboxes.com> | 2004-01-24 16:27:32 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:48:49 +0200 |
commit | beba34dc223aa0dcf3e5f696966c5e8408b022c3 (patch) | |
tree | ea0523ac242bd3e877338e9a771b975d4cd3839a /bcc/scan.c | |
parent | b5dac1e3bdd01a2ce105df747a9073ff0d6a94e2 (diff) | |
download | dev86-beba34dc223aa0dcf3e5f696966c5e8408b022c3.tar.gz |
Import Dev86src-0.16.15.tar.gzv0.16.15
Diffstat (limited to 'bcc/scan.c')
-rw-r--r-- | bcc/scan.c | 31 |
1 files changed, 31 insertions, 0 deletions
@@ -119,6 +119,7 @@ PUBLIC void blanks() continue; reglineptr = lineptr; } +#ifdef BUILTIN_CPP if (*reglineptr != '/') return; if (SYMOFCHAR(*(reglineptr + 1)) == SPECIALCHAR) @@ -131,6 +132,9 @@ PUBLIC void blanks() return; gch1(); skipcomment(); +#else + return; +#endif } } @@ -139,8 +143,10 @@ int asm_only; { int start_of_line = 1; #ifndef ASM_BARE +#ifdef BUILTIN_CPP virtual_nl = 1; #endif +#endif while (!asm_only || asmmode) { int sym = SYMOFCHAR(ch); @@ -172,6 +178,7 @@ int asm_only; outstr(constant.value.s); /* XXX - embedded null would kill it */ charptr = constant.value.s; break; +#ifdef BUILTIN_CPP case CONTROL: gch1(); if (maclevel != 0) @@ -196,6 +203,12 @@ int asm_only; } outbyte('/'); break; +#else /* !BUILTIN_CPP */ + case CONTROL: + gch1(); + docontrol(); + continue; +#endif case FLOATCONST: gch1(); if (SYMOFCHAR(ch) == INTCONST) @@ -211,6 +224,7 @@ int asm_only; break; case IDENT: getident(); +#ifdef BUILTIN_CPP if ((gsymptr = findlorg(gsname)) != NULL) { if (gsymptr->flags == DEFINITION) @@ -219,6 +233,7 @@ int asm_only; break; } } +#endif outstr(gsname); break; case INTCONST: @@ -253,7 +268,11 @@ int asm_only; /* must be '\\' */ default: /* Allow for multi-instruction lines in asm */ +#ifdef BUILTIN_CPP if( ch == '^' && !orig_cppmode && asmmode ) ch='\n'; +#else + if( ch == '^' && asmmode ) ch='\n'; +#endif OUTBYTE(ch); ch = *++lineptr; @@ -261,8 +280,10 @@ int asm_only; break; } #ifndef ASM_BARE +#ifdef BUILTIN_CPP virtual_nl = 0; #endif +#endif } } @@ -473,12 +494,14 @@ PUBLIC void nextsym() constant.type = itype; return; case CONTROL: +#ifdef BUILTIN_CPP if (maclevel != 0) { error("# in a macro: not preprocessed"); /* XXX? */ return; } else +#endif { int old_asmmode = asmmode; docontrol(); @@ -505,11 +528,13 @@ PUBLIC void nextsym() getident(); if ((gsymptr = findlorg(gsname)) != NULL) { +#ifdef BUILTIN_CPP if (gsymptr->flags == DEFINITION) { entermac(); break; } +#endif if (gsymptr->flags == KEYWORD) sym = gsymptr->offset.offsym; } @@ -609,11 +634,13 @@ PUBLIC void nextsym() } return; case SLASH: +#ifdef BUILTIN_CPP if (ch == '*') { skipcomment(); break; } +#endif if (ch == '=') { sym = DIVABOP; @@ -749,7 +776,9 @@ PUBLIC void stringorcharconst() gch1(); if (ch == EOL) { +#ifdef BUILTIN_CPP if (!orig_cppmode) +#endif eofin("escape sequence"); break; } @@ -758,7 +787,9 @@ PUBLIC void stringorcharconst() GCH1(); if (ch == EOL) { +#ifdef BUILTIN_CPP if (!orig_cppmode && ifcheck() ) +#endif error(terminator == '"' ? "end of line in string constant" : "end of line in character constant"); break; |