mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 15:40:16 +02:00
* fixed maxlen which was not correct after my read_string update
This commit is contained in:
parent
887c29f7a2
commit
0a51bba5f7
@ -754,7 +754,10 @@ Begin
|
|||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
p:=@f.Bufptr^[f.BufPos];
|
p:=@f.Bufptr^[f.BufPos];
|
||||||
maxp:=@f.Bufptr^[f.BufEnd];
|
if SPos+f.BufEnd-f.BufPos>MaxLen then
|
||||||
|
maxp:=@f.BufPtr^[f.BufPos+MaxLen-SPos]
|
||||||
|
else
|
||||||
|
maxp:=@f.Bufptr^[f.BufEnd];
|
||||||
startp:=p;
|
startp:=p;
|
||||||
{ search linefeed }
|
{ search linefeed }
|
||||||
while (p<maxp) and (P^<>#10) do
|
while (p<maxp) and (P^<>#10) do
|
||||||
@ -762,9 +765,6 @@ Begin
|
|||||||
{ calculate read bytes }
|
{ calculate read bytes }
|
||||||
len:=p-startp;
|
len:=p-startp;
|
||||||
inc(f.BufPos,Len);
|
inc(f.BufPos,Len);
|
||||||
{ update output string, take MaxLen into count }
|
|
||||||
if SPos+Len>MaxLen then
|
|
||||||
Len:=MaxLen-Spos;
|
|
||||||
Move(startp^,s[sPos+1],Len);
|
Move(startp^,s[sPos+1],Len);
|
||||||
inc(sPos,Len);
|
inc(sPos,Len);
|
||||||
{ was it a LF? then leave }
|
{ was it a LF? then leave }
|
||||||
@ -934,7 +934,10 @@ Begin
|
|||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
p:=@f.Bufptr^[f.BufPos];
|
p:=@f.Bufptr^[f.BufPos];
|
||||||
maxp:=@f.Bufptr^[f.BufEnd];
|
if SPos+f.BufEnd-f.BufPos>MaxLen then
|
||||||
|
maxp:=@f.BufPtr^[f.BufPos+MaxLen-SPos]
|
||||||
|
else
|
||||||
|
maxp:=@f.Bufptr^[f.BufEnd];
|
||||||
startp:=p;
|
startp:=p;
|
||||||
{ search linefeed }
|
{ search linefeed }
|
||||||
while (p<maxp) and (P^<>#10) do
|
while (p<maxp) and (P^<>#10) do
|
||||||
@ -942,9 +945,6 @@ Begin
|
|||||||
{ calculate read bytes }
|
{ calculate read bytes }
|
||||||
len:=p-startp;
|
len:=p-startp;
|
||||||
inc(f.BufPos,Len);
|
inc(f.BufPos,Len);
|
||||||
{ update output string, take MaxLen into count }
|
|
||||||
if SPos+Len>MaxLen then
|
|
||||||
Len:=MaxLen-Spos;
|
|
||||||
Move(startp^,sidx^,Len);
|
Move(startp^,sidx^,Len);
|
||||||
inc(sidx,len);
|
inc(sidx,len);
|
||||||
inc(spos,len);
|
inc(spos,len);
|
||||||
@ -1199,7 +1199,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.31 1998-10-10 15:28:48 peter
|
Revision 1.32 1998-10-20 14:37:45 peter
|
||||||
|
* fixed maxlen which was not correct after my read_string update
|
||||||
|
|
||||||
|
Revision 1.31 1998/10/10 15:28:48 peter
|
||||||
+ read single,fixed
|
+ read single,fixed
|
||||||
+ val with code:longint
|
+ val with code:longint
|
||||||
+ val for fixed
|
+ val for fixed
|
||||||
|
Loading…
Reference in New Issue
Block a user