mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 15:09:19 +02:00
* aopt386 compiles with TP
* correct line number is displayed, if a #0 is in the input
This commit is contained in:
parent
c681f66590
commit
8cb9f5ea5b
@ -1478,7 +1478,11 @@ end;
|
|||||||
End.
|
End.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1998-03-28 23:09:53 florian
|
Revision 1.3 1998-03-29 17:27:58 florian
|
||||||
|
* aopt386 compiles with TP
|
||||||
|
* correct line number is displayed, if a #0 is in the input
|
||||||
|
|
||||||
|
Revision 1.2 1998/03/28 23:09:53 florian
|
||||||
* secondin bugfix (m68k and i386)
|
* secondin bugfix (m68k and i386)
|
||||||
* overflow checking bugfix (m68k and i386) -- pretty useless in
|
* overflow checking bugfix (m68k and i386) -- pretty useless in
|
||||||
secondadd, since everything is done using 32-bit
|
secondadd, since everything is done using 32-bit
|
||||||
|
@ -199,7 +199,7 @@ for the last instruction of an include file !}
|
|||||||
|
|
||||||
var
|
var
|
||||||
readsize : word;
|
readsize : word;
|
||||||
i : longint;
|
i,saveline,count : longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if filehaschanged then
|
if filehaschanged then
|
||||||
@ -232,15 +232,29 @@ for the last instruction of an include file !}
|
|||||||
blockread(current_module^.current_inputfile^.f,inputbuffer^,
|
blockread(current_module^.current_inputfile^.f,inputbuffer^,
|
||||||
current_module^.current_inputfile^.bufsize-1,readsize);
|
current_module^.current_inputfile^.bufsize-1,readsize);
|
||||||
{ check if non-empty file }
|
{ check if non-empty file }
|
||||||
|
|
||||||
|
{ this is an aweful hack FK }
|
||||||
if readsize > 0 then
|
if readsize > 0 then
|
||||||
begin
|
begin
|
||||||
{ check if null character before readsize }
|
{ check if null character before readsize }
|
||||||
{ this mixed up the scanner.. }
|
{ this mixed up the scanner.. }
|
||||||
for i:=0 to (readsize-1) do
|
|
||||||
|
{ force proper line counting }
|
||||||
|
saveline:=current_module^.current_inputfile^.line_no;
|
||||||
|
i:=0;
|
||||||
|
while i<readsize do
|
||||||
begin
|
begin
|
||||||
|
if inputbuffer[i] in [#10,#13] then
|
||||||
|
begin
|
||||||
|
if (byte(inputbuffer[i+1])+byte(inputbuffer[i])=23) then
|
||||||
|
inc(i);
|
||||||
|
inc(current_module^.current_inputfile^.line_no);
|
||||||
|
end;
|
||||||
if inputbuffer[i] = #0 then
|
if inputbuffer[i] = #0 then
|
||||||
Message(scan_f_illegal_char);
|
Message(scan_f_illegal_char);
|
||||||
|
inc(i);
|
||||||
end;
|
end;
|
||||||
|
current_module^.current_inputfile^.line_no:=saveline;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
inputbuffer[readsize]:=#0;
|
inputbuffer[readsize]:=#0;
|
||||||
@ -2073,7 +2087,11 @@ for the last instruction of an include file !}
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.2 1998-03-28 23:09:57 florian
|
Revision 1.3 1998-03-29 17:27:59 florian
|
||||||
|
* aopt386 compiles with TP
|
||||||
|
* correct line number is displayed, if a #0 is in the input
|
||||||
|
|
||||||
|
Revision 1.2 1998/03/28 23:09:57 florian
|
||||||
* secondin bugfix (m68k and i386)
|
* secondin bugfix (m68k and i386)
|
||||||
* overflow checking bugfix (m68k and i386) -- pretty useless in
|
* overflow checking bugfix (m68k and i386) -- pretty useless in
|
||||||
secondadd, since everything is done using 32-bit
|
secondadd, since everything is done using 32-bit
|
||||||
|
Loading…
Reference in New Issue
Block a user