mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-06 01:09:36 +01:00
* patch from Pavel Ozerski to support +/- better
This commit is contained in:
parent
77a99eecdf
commit
05e12f6894
@ -47,7 +47,7 @@ type
|
|||||||
procedure WriteHelpPages;
|
procedure WriteHelpPages;
|
||||||
procedure WriteQuickInfo;
|
procedure WriteQuickInfo;
|
||||||
procedure IllegalPara(const opt:string);
|
procedure IllegalPara(const opt:string);
|
||||||
function Unsetbool(const opts:string; pos: Longint):boolean;
|
function Unsetbool(var Opts:string; Pos: Longint):boolean;
|
||||||
procedure interpret_proc_specific_options(const opt:string);virtual;
|
procedure interpret_proc_specific_options(const opt:string);virtual;
|
||||||
procedure interpret_option(const opt :string;ispara:boolean);
|
procedure interpret_option(const opt :string;ispara:boolean);
|
||||||
procedure Interpret_envvar(const envname : string);
|
procedure Interpret_envvar(const envname : string);
|
||||||
@ -305,11 +305,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function Toption.Unsetbool(const opts:string; pos: Longint):boolean;
|
function Toption.Unsetbool(var Opts:string; Pos: Longint):boolean;
|
||||||
{ checks if the character after pos in Opts is a + or a - and returns resp.
|
{ checks if the character after pos in Opts is a + or a - and returns resp.
|
||||||
false or true. If it is another character (or none), it also returns false }
|
false or true. If it is another character (or none), it also returns false }
|
||||||
begin
|
begin
|
||||||
UnsetBool := (Length(Opts) > Pos) And (Opts[Succ(Pos)] = '-');
|
UnsetBool := false;
|
||||||
|
if Length(Opts)>Pos then
|
||||||
|
begin
|
||||||
|
inc(Pos);
|
||||||
|
UnsetBool := Opts[Pos] = '-';
|
||||||
|
if Opts[Pos] in ['-','+']then
|
||||||
|
delete(Opts,Pos,1);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -403,39 +410,24 @@ begin
|
|||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
'i' : If UnsetBool(More, j) then
|
'i' : If UnsetBool(More, j) then
|
||||||
Begin
|
initlocalswitches:=initlocalswitches-[cs_check_io]
|
||||||
initlocalswitches:=initlocalswitches-[cs_check_io];
|
|
||||||
inc(j)
|
|
||||||
End
|
|
||||||
else initlocalswitches:=initlocalswitches+[cs_check_io];
|
else initlocalswitches:=initlocalswitches+[cs_check_io];
|
||||||
'n' : If UnsetBool(More, j) then
|
'n' : If UnsetBool(More, j) then
|
||||||
Begin
|
initglobalswitches:=initglobalswitches-[cs_link_extern]
|
||||||
initglobalswitches:=initglobalswitches-[cs_link_extern];
|
|
||||||
inc(j)
|
|
||||||
End
|
|
||||||
Else initglobalswitches:=initglobalswitches+[cs_link_extern];
|
Else initglobalswitches:=initglobalswitches+[cs_link_extern];
|
||||||
'o' :
|
'o' :
|
||||||
If UnsetBool(More, j) then
|
If UnsetBool(More, j) then
|
||||||
Begin
|
initlocalswitches:=initlocalswitches-[cs_check_overflow]
|
||||||
initlocalswitches:=initlocalswitches-[cs_check_overflow];
|
|
||||||
inc(j);
|
|
||||||
End
|
|
||||||
Else
|
Else
|
||||||
initlocalswitches:=initlocalswitches+[cs_check_overflow];
|
initlocalswitches:=initlocalswitches+[cs_check_overflow];
|
||||||
'r' :
|
'r' :
|
||||||
If UnsetBool(More, j) then
|
If UnsetBool(More, j) then
|
||||||
Begin
|
initlocalswitches:=initlocalswitches-[cs_check_range]
|
||||||
initlocalswitches:=initlocalswitches-[cs_check_range];
|
|
||||||
inc(j);
|
|
||||||
End
|
|
||||||
Else
|
Else
|
||||||
initlocalswitches:=initlocalswitches+[cs_check_range];
|
initlocalswitches:=initlocalswitches+[cs_check_range];
|
||||||
'R' :
|
'R' :
|
||||||
If UnsetBool(More, j) then
|
If UnsetBool(More, j) then
|
||||||
Begin
|
initlocalswitches:=initlocalswitches-[cs_check_object_ext]
|
||||||
initlocalswitches:=initlocalswitches-[cs_check_object_ext];
|
|
||||||
inc(j);
|
|
||||||
End
|
|
||||||
Else
|
Else
|
||||||
initlocalswitches:=initlocalswitches+[cs_check_object_ext];
|
initlocalswitches:=initlocalswitches+[cs_check_object_ext];
|
||||||
's' :
|
's' :
|
||||||
@ -447,26 +439,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
't' :
|
't' :
|
||||||
If UnsetBool(More, j) then
|
If UnsetBool(More, j) then
|
||||||
Begin
|
initlocalswitches:=initlocalswitches-[cs_check_stack]
|
||||||
initlocalswitches:=initlocalswitches-[cs_check_stack];
|
|
||||||
inc(j)
|
|
||||||
End
|
|
||||||
Else
|
Else
|
||||||
initlocalswitches:=initlocalswitches+[cs_check_stack];
|
initlocalswitches:=initlocalswitches+[cs_check_stack];
|
||||||
'D' :
|
'D' :
|
||||||
If UnsetBool(More, j) then
|
If UnsetBool(More, j) then
|
||||||
Begin
|
initmoduleswitches:=initmoduleswitches-[cs_create_dynamic]
|
||||||
initmoduleswitches:=initmoduleswitches-[cs_create_dynamic];
|
|
||||||
inc(j)
|
|
||||||
End
|
|
||||||
Else
|
Else
|
||||||
initmoduleswitches:=initmoduleswitches+[cs_create_dynamic];
|
initmoduleswitches:=initmoduleswitches+[cs_create_dynamic];
|
||||||
'X' :
|
'X' :
|
||||||
If UnsetBool(More, j) then
|
If UnsetBool(More, j) then
|
||||||
Begin
|
initmoduleswitches:=initmoduleswitches-[cs_create_smart]
|
||||||
initmoduleswitches:=initmoduleswitches-[cs_create_smart];
|
|
||||||
inc(j)
|
|
||||||
End
|
|
||||||
Else
|
Else
|
||||||
initmoduleswitches:=initmoduleswitches+[cs_create_smart];
|
initmoduleswitches:=initmoduleswitches+[cs_create_smart];
|
||||||
else
|
else
|
||||||
@ -756,7 +739,10 @@ begin
|
|||||||
'v' : if not setverbosity(More) then
|
'v' : if not setverbosity(More) then
|
||||||
IllegalPara(opt);
|
IllegalPara(opt);
|
||||||
'W' : begin
|
'W' : begin
|
||||||
for j:=1 to length(More) do
|
j:=0;
|
||||||
|
while j<length(More) do
|
||||||
|
begin
|
||||||
|
inc(j);
|
||||||
case More[j] of
|
case More[j] of
|
||||||
'B': {bind_win32_dll:=true}
|
'B': {bind_win32_dll:=true}
|
||||||
begin
|
begin
|
||||||
@ -777,10 +763,7 @@ begin
|
|||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
'C': apptype:=app_cui;
|
'C': apptype:=app_cui;
|
||||||
'D': if UnsetBool(More, j) then
|
'D': ForceDeffileForExport:=not UnsetBool(More, j);
|
||||||
ForceDeffileForExport:=false
|
|
||||||
else
|
|
||||||
ForceDeffileForExport:=true;
|
|
||||||
'F': apptype:=app_fs;
|
'F': apptype:=app_fs;
|
||||||
'G': apptype:=app_gui;
|
'G': apptype:=app_gui;
|
||||||
'N': begin
|
'N': begin
|
||||||
@ -788,12 +771,14 @@ begin
|
|||||||
RelocSectionSetExplicitly:=true;
|
RelocSectionSetExplicitly:=true;
|
||||||
end;
|
end;
|
||||||
'R': begin
|
'R': begin
|
||||||
RelocSection:=true;
|
{ support -WR+ / -WR- as synonims to -WR / -WN }
|
||||||
|
RelocSection:=not UnsetBool(More,j);
|
||||||
RelocSectionSetExplicitly:=true;
|
RelocSectionSetExplicitly:=true;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
IllegalPara(opt);
|
IllegalPara(opt);
|
||||||
end;
|
end;
|
||||||
|
end; {of while}
|
||||||
end;
|
end;
|
||||||
'X' : begin
|
'X' : begin
|
||||||
for j:=1 to length(More) do
|
for j:=1 to length(More) do
|
||||||
@ -1541,7 +1526,10 @@ finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.45 2001-06-19 14:55:45 jonas
|
Revision 1.46 2001-06-29 19:41:54 peter
|
||||||
|
* patch from Pavel Ozerski to support +/- better
|
||||||
|
|
||||||
|
Revision 1.45 2001/06/19 14:55:45 jonas
|
||||||
* fixed typo in NOBOUNDCHECK define
|
* fixed typo in NOBOUNDCHECK define
|
||||||
|
|
||||||
Revision 1.44 2001/06/18 20:36:24 peter
|
Revision 1.44 2001/06/18 20:36:24 peter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user