mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 22:06:40 +02:00
+ parsecmd supports "filename with spaces" for IDE
This commit is contained in:
parent
68e4d27435
commit
72cc83f234
@ -1079,8 +1079,8 @@ end;
|
|||||||
|
|
||||||
procedure toption.parsecmd(cmd:string);
|
procedure toption.parsecmd(cmd:string);
|
||||||
var
|
var
|
||||||
i : longint;
|
i,ps : longint;
|
||||||
opts : string;
|
opts : string;
|
||||||
begin
|
begin
|
||||||
while (cmd<>'') do
|
while (cmd<>'') do
|
||||||
begin
|
begin
|
||||||
@ -1088,7 +1088,7 @@ begin
|
|||||||
delete(cmd,1,1);
|
delete(cmd,1,1);
|
||||||
i:=pos(' ',cmd);
|
i:=pos(' ',cmd);
|
||||||
if i=0 then
|
if i=0 then
|
||||||
i:=255;
|
i:=256;
|
||||||
opts:=Copy(cmd,1,i-1);
|
opts:=Copy(cmd,1,i-1);
|
||||||
Delete(cmd,1,i);
|
Delete(cmd,1,i);
|
||||||
case opts[1] of
|
case opts[1] of
|
||||||
@ -1106,6 +1106,17 @@ begin
|
|||||||
Message1(option_reading_further_from,'(env) '+opts);
|
Message1(option_reading_further_from,'(env) '+opts);
|
||||||
interpret_envvar(opts);
|
interpret_envvar(opts);
|
||||||
end;
|
end;
|
||||||
|
'"' :
|
||||||
|
begin
|
||||||
|
Delete(opts,1,1);
|
||||||
|
ps:=pos('"',cmd);
|
||||||
|
if (i<>256) and (ps>0) then
|
||||||
|
begin
|
||||||
|
opts:=opts + ' '+ copy(cmd,1,ps-1);
|
||||||
|
cmd:=copy(cmd,ps+1,255);
|
||||||
|
end;
|
||||||
|
interpret_option(opts,true);
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
interpret_option(opts,true);
|
interpret_option(opts,true);
|
||||||
end;
|
end;
|
||||||
@ -1387,7 +1398,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.50 2000-01-14 14:33:54 pierre
|
Revision 1.51 2000-01-14 15:33:15 pierre
|
||||||
|
+ parsecmd supports "filename with spaces" for IDE
|
||||||
|
|
||||||
|
Revision 1.50 2000/01/14 14:33:54 pierre
|
||||||
+ some warnings for wrong lines inside config files
|
+ some warnings for wrong lines inside config files
|
||||||
|
|
||||||
Revision 1.49 2000/01/10 11:14:19 peter
|
Revision 1.49 2000/01/10 11:14:19 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user