Hi.

I little extend compiler parametr -m. Now we can remap message
verbosity. Parametr -m5024_,5025w,5026e means:
do not show message 5024, 5025 is warning and 5026 is error.

Petr

-- 
Ing. Petr Kristan
.
EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
tel: +420 466335223    Czech Republic (Eastern Europe) 
fax: +420 466510709
Index: verbose.pas
===================================================================
--- verbose.pas	(revision 11896)
+++ verbose.pas	(working copy)
@@ -177,11 +177,13 @@
       end;
 
 
-    function ClearMessageVerbosity(s: string; var i: integer): boolean;
+    function SetMessageVerbosity(s: string; var i: integer): boolean;
       var
         tok : string;
         code : longint;
         msgnr: longint;
+        len : longint;
+        ch : char;
       begin
         { delete everything up to and including 'm' }
         delete(s,1,i);
@@ -192,10 +194,13 @@
           tok:=GetToken(s,',');
           if (tok='') then
             break;
+          len := length(tok);
+          ch := tok[len];
+          delete(tok, len, 1);
           val(tok, msgnr, code);
           if (code<>0) then
             exit;
-          if not msg^.clearverbosity(msgnr) then
+          if not msg^.setverbosity(msgnr, ch) then
             exit;
         until false;
         result:=true;
@@ -247,7 +252,7 @@
                             status.print_source_path:=true;
                        end;
                  'M' : if inverse or
-                          not ClearMessageVerbosity(s, i) then
+                          not SetMessageVerbosity(s, i) then
                          begin
                            result:=false;
                            exit
Index: cmsgs.pas
===================================================================
--- cmsgs.pas	(revision 11896)
+++ cmsgs.pas	(working copy)
@@ -52,7 +52,7 @@
     procedure ClearIdx;
     procedure CreateIdx;
     function  GetPChar(nr:longint):pchar;
-    function  ClearVerbosity(nr:longint):boolean;
+    function SetVerbosity(nr:longint; ch:char):boolean;
     function  Get(nr:longint;const args:array of string):ansistring;
   end;
 
@@ -375,7 +375,7 @@
   GetPChar:=msgidx[nr div 1000]^[nr mod 1000];
 end;
 
-function TMessage.ClearVerbosity(nr:longint):boolean;
+function TMessage.SetVerbosity(nr:longint; ch:char):boolean;
 var
   hp: pchar;
   i, txtbegin: longint;
@@ -399,7 +399,7 @@
         end;
     end;
   for i:=0 to txtbegin-1 do
-    hp[i]:='_';
+    hp[i]:=ch;
   result:=true;
 end;
 
Index: msg/errore.msg
===================================================================
--- msg/errore.msg	(revision 11896)
+++ msg/errore.msg	(working copy)
@@ -2755,7 +2755,8 @@
 **2*_b : Write file names messages with full path
 **2*_v : Write fpcdebug.txt with     p : Write tree.log with parse tree
 **2*_    lots of debugging info      q : Show message numbers
-**2*_m<x>,<y> : Don't show messages numbered <x> and <y>
+**2*_m<x>_,<y>w : Messages verbosity remaping.
+**2*_    Don't show message numbered <x>, msg <y> treat as warning
 3*1W<x>_Target-specific options (targets)
 A*1W<x>_Target-specific options (targets)
 P*1W<x>_Target-specific options (targets)
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to