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
{ skip _ }
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 }
msgidx[numpart]^[numidx]:=hp1;
end;

View File

@ -227,13 +227,6 @@ implementation
result:=true;
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;
begin
result:=msg^.setverbosity(v,state);
@ -246,6 +239,8 @@ implementation
function SetVerbosity(const s:string):boolean;
const
message_verbosity:array[boolean] of tmsgstate=(ms_off_global,ms_on_global);
var
m : Longint;
i : Integer;
@ -283,8 +278,7 @@ implementation
else
status.print_source_path:=true;
end;
'M' : if inverse or
not ClearMessageVerbosity(s, i) then
'M' : if not ChangeMessageVerbosity(s,i,message_verbosity[inverse]) then
begin
result:=false;
exit