diff --git a/src/cpp.c b/src/cpp.c index 639798556d8b9df8b5c79f23f3bfec268d2fa75e..c644dbea268d741731b8becd529adbdb36614594 100644 --- a/src/cpp.c +++ b/src/cpp.c @@ -256,7 +256,6 @@ static void simple_add_define(struct cpp *this, fflush(stderr) #define FIND_EOL() do { \ - this->current_line++; \ while(pos < len && data[pos]!='\n') pos++; \ } while(0) @@ -753,6 +752,8 @@ static INT32 low_cpp(struct cpp *this, { char *foo=data+pos; this->current_line=STRTOL(foo, &foo, 10)-1; + low_my_putchar('#',&this->buf); + low_my_binary_strcat(data+pos, foo-(data+pos), &this->buf); pos=foo-data; SKIPSPACE(); @@ -765,6 +766,9 @@ static INT32 low_cpp(struct cpp *this, free_string(this->current_file); this->current_file=low_free_buf(&nf); + + low_my_putchar(' ',&this->buf); + PUSH_STRING(this->current_file->str,this->current_file->len,&this->buf); } FIND_EOL(); diff --git a/src/lex.c b/src/lex.c index 9f75ab5257da8f46ee63f486d850b5ed87e8eaa3..5ded11d4a5d4153bc0adaa32d521f72e0a2ca6eb 100644 --- a/src/lex.c +++ b/src/lex.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: lex.c,v 1.38 1998/01/16 22:33:04 grubba Exp $"); +RCSID("$Id: lex.c,v 1.39 1998/01/16 23:02:39 hubbe Exp $"); #include "language.h" #include "array.h" #include "lex.h" @@ -429,9 +429,9 @@ int yylex(YYSTYPE *yylval) t=yylex2(yylval); if(t<256) { - fprintf(stderr,"yylex() -> '%c' (%d)\n",t,t); + fprintf(stderr,"YYLEX: '%c' (%d) at %s:%d\n",t,t,lex.current_file->str,lex.current_line); }else{ - fprintf(stderr,"yylex() -> %s (%d)\n",get_f_name(t),t); + fprintf(stderr,"YYLEX: %s (%d) at %s:%d\n",low_get_f_name(t,0),t,lex.current_file->str,lex.current_line); } return t; } diff --git a/src/program.c b/src/program.c index 275188c71aef24ea35d3574ae021cbda628fae30..a89e74538594d7ee99c91cf86e0c25fbe99f2175 100644 --- a/src/program.c +++ b/src/program.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: program.c,v 1.49 1998/01/14 07:53:52 hubbe Exp $"); +RCSID("$Id: program.c,v 1.50 1998/01/16 23:02:40 hubbe Exp $"); #include "program.h" #include "object.h" #include "dynamic_buffer.h" @@ -1632,7 +1632,7 @@ static void insert_small_number(INT32 a) { add_to_linenumbers(a); }else if(a>=-32768 && a<32768){ - add_to_linenumbers(a); + add_to_linenumbers(-127); ins_short(a, add_to_linenumbers); }else{ add_to_linenumbers(-128);