Hi.
I extend my patch for suppressing compiler messages. Now it is possible
to remap compiler message verbosity by command parametr:
-vm5024_,5025w,5026e which means:
suppress message 5024, 5025 is warning and 5026 is error
-vq shows compiler message numbers
Is better to send extension patches here, or add it into bugtracker?
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: compiler/verbose.pas
===================================================================
--- compiler/verbose.pas (revision 13256)
+++ compiler/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: compiler/cmsgs.pas
===================================================================
--- compiler/cmsgs.pas (revision 13256)
+++ compiler/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: compiler/msg/errore.msg
===================================================================
--- compiler/msg/errore.msg (revision 13256)
+++ compiler/msg/errore.msg (working copy)
@@ -2888,7 +2888,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)
Index: packages/fcl-db/src/base/dataset.inc
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel