diff options
-rw-r--r-- | compiler/cmsgs.pas | 6 | ||||
-rw-r--r-- | compiler/verbose.pas | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/compiler/cmsgs.pas b/compiler/cmsgs.pas index f88cd5f3db..eb550f5a94 100644 --- a/compiler/cmsgs.pas +++ b/compiler/cmsgs.pas @@ -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; diff --git a/compiler/verbose.pas b/compiler/verbose.pas index a049e4fbd3..f3de36ebd4 100644 --- a/compiler/verbose.pas +++ b/compiler/verbose.pas @@ -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 |