* fixed line counter when the first line had #10 only. This was buggy

for both the main file as for include files
This commit is contained in:
peter 1999-10-30 12:32:30 +00:00
parent afe98da3e3
commit 0e7c4919c8
2 changed files with 30 additions and 3 deletions

View File

@ -664,6 +664,12 @@ const
Message1(scan_f_cannot_open_includefile,hs);
Message1(scan_t_start_include_file,current_scanner^.inputfile^.path^+current_scanner^.inputfile^.name^);
current_scanner^.reload;
{ process first read char }
case c of
#26 : current_scanner^.reload;
#10,
#13 : current_scanner^.linebreak;
end;
{ register for refs }
current_module^.sourcefiles^.register_file(hp);
end;
@ -1157,7 +1163,11 @@ const
{
$Log$
Revision 1.64 1999-09-27 23:38:17 peter
Revision 1.65 1999-10-30 12:32:30 peter
* fixed line counter when the first line had #10 only. This was buggy
for both the main file as for include files
Revision 1.64 1999/09/27 23:38:17 peter
* bracket support for macro define
Revision 1.63 1999/09/20 16:39:02 peter

View File

@ -216,6 +216,12 @@ implementation
if not openinputfile then
Message1(scan_f_cannot_open_input,fn);
reload;
{ process first read char }
case c of
#26 : reload;
#10,
#13 : linebreak;
end;
end;
@ -1107,7 +1113,14 @@ implementation
insertmacro(pattern,mac^.buftext,mac^.buflen);
{ handle empty macros }
if c=#0 then
reload;
begin
reload;
case c of
#26 : reload;
#10,
#13 : linebreak;
end;
end;
{ play it again ... }
inc(yylexcount);
if yylexcount>16 then
@ -1671,7 +1684,11 @@ exit_label:
end.
{
$Log$
Revision 1.96 1999-09-27 23:40:10 peter
Revision 1.97 1999-10-30 12:32:30 peter
* fixed line counter when the first line had #10 only. This was buggy
for both the main file as for include files
Revision 1.96 1999/09/27 23:40:10 peter
* fixed macro within macro endless-loop
Revision 1.95 1999/09/03 10:02:48 peter