mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 11:45:32 +02:00
Handle second argument to -Ch option, -Chx,y y is max heap size
git-svn-id: trunk@36260 -
This commit is contained in:
parent
5c18830aab
commit
ae349a3ccc
@ -1202,7 +1202,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
'h' :
|
'h' :
|
||||||
begin
|
begin
|
||||||
val(copy(more,j+1,length(more)-j),heapsize,code);
|
l:=pos(',',copy(more,j+1,length(more)-j));
|
||||||
|
if l=0 then
|
||||||
|
l:=length(more)-j+1;
|
||||||
|
val(copy(more,j+1,l-1),heapsize,code);
|
||||||
if (code<>0)
|
if (code<>0)
|
||||||
{$ifdef AVR}
|
{$ifdef AVR}
|
||||||
or (heapsize<32)
|
or (heapsize<32)
|
||||||
@ -1210,7 +1213,18 @@ begin
|
|||||||
or (heapsize<1024)
|
or (heapsize<1024)
|
||||||
{$endif AVR}
|
{$endif AVR}
|
||||||
then
|
then
|
||||||
IllegalPara(opt);
|
IllegalPara(opt)
|
||||||
|
else if l<=length(more)-j then
|
||||||
|
begin
|
||||||
|
val(copy(more,j+l+1,length(more)),maxheapsize,code);
|
||||||
|
if code<>0 then
|
||||||
|
IllegalPara(opt)
|
||||||
|
else if (maxheapsize<heapsize) then
|
||||||
|
begin
|
||||||
|
message(scan_w_heapmax_lessthan_heapmin);
|
||||||
|
maxheapsize:=heapsize;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
'i' :
|
'i' :
|
||||||
|
Loading…
Reference in New Issue
Block a user