update dev300-m58
[ooovba.git] / solenv / bin / msg_filter
bloba7149c35a699190ad1ccab59a37dbd1d14ea9853
1 : # -*- perl -*-
2 eval 'exec perl -wS $0 ${1+"$@"}'
3         if 0;
4 # This is a script to get rid of bogus error messages that are spit out
5 # by the compiler - sub 30/11/1999
7 # Lines that contain `xxxx' where xxxx belongs to the list knownMessages
8 # and is surrounded by a backtick (`) and a forward tick (') 
9 # will not be seen in the compiler output
12 @knownMessages  = (
13 "__pure_virtual",
14 "__vt_9bad_alloc",
15 "__vt_9exception",
16 "_._9bad_alloc",
17 "__cp_push_exception",
18 "__uncatch_exception",
19 "__rtti_user",
20 "__rtti_si",
21 "__throw",
22 "terminate__Fv",
23 "__cp_pop_exception",
24 "__builtin_vec_new",
25 "__cmpdi2",
26 "__builtin_vec_delete",
27 "__cp_eh_info",
28 "__builtin_delete",
29 "__builtin_new",
30 "__eh_alloc",
31 "__check_eh_spec",
32 "_type_match_rtti",
33 "__rtti_class",
34 "set_new_handler_FPFv_v",
35 "__throw_type_match_rtti",
36 "__check_eh_spec",
37 "exception_type_info",
38 "exception type_info function",
39 "exception type_info node",
40 "exception virtual table",
41 "terminate(void)"
44 # Create a hash %msgHash from list @knownMessages
45 foreach $msg (@knownMessages) {
46         $msgHash {$msg}++;
48 while ( <STDIN> ) {
49         
50         if (/\`([\s\w]+)\'/) {
51                 $entry = $1;
52                 if (defined($entry)) {
53                         if (!exists $msgHash{$entry}) {
54                                 print $_;
55                         }
56                 }
57         }
58         else {
59                 print $_;
60         }