compiler:

- allow turning some messages off by default by prefixing verbosity type with '-' sign (in error.msg)
  - interpret -vm- as a switch which changes message verbosity to *on* by default
  * appropriate error.msg file changes will come later

git-svn-id: trunk@19570 -
This commit is contained in:
paul 2011-11-02 09:20:59 +00:00
parent 86c0b324fd
commit aba10cd184
2 changed files with 9 additions and 9 deletions

View File

@ -361,6 +361,12 @@ begin
begin begin
{ skip _ } { skip _ }
inc(hp1); inc(hp1);
{ set default verbosity to off is '-' is found just after the '_' }
if hp1^='-' then
begin
msgstates[numpart]^[numidx]:=ms_off_global;
inc(hp1);
end;
{ put the address in the idx, the numbers are already checked } { put the address in the idx, the numbers are already checked }
msgidx[numpart]^[numidx]:=hp1; msgidx[numpart]^[numidx]:=hp1;
end; end;

View File

@ -227,13 +227,6 @@ implementation
result:=true; result:=true;
end; end;
{ This function is only used for command line argument -vmXXX }
{ thus the message needs to be cleared globally }
function ClearMessageVerbosity(s: string; var i: integer): boolean;
begin
ClearMessageVerbosity:=ChangeMessageVerbosity(s,i,ms_off_global);
end;
function SetMessageVerbosity(v:longint;state:tmsgstate):boolean; function SetMessageVerbosity(v:longint;state:tmsgstate):boolean;
begin begin
result:=msg^.setverbosity(v,state); result:=msg^.setverbosity(v,state);
@ -246,6 +239,8 @@ implementation
function SetVerbosity(const s:string):boolean; function SetVerbosity(const s:string):boolean;
const
message_verbosity:array[boolean] of tmsgstate=(ms_off_global,ms_on_global);
var var
m : Longint; m : Longint;
i : Integer; i : Integer;
@ -283,8 +278,7 @@ implementation
else else
status.print_source_path:=true; status.print_source_path:=true;
end; end;
'M' : if inverse or 'M' : if not ChangeMessageVerbosity(s,i,message_verbosity[inverse]) then
not ClearMessageVerbosity(s, i) then
begin begin
result:=false; result:=false;
exit exit