Debian Codegraph @

doc/developer/cleanwarnings.pl

raw ◀ ▶
1 Debian patch touch this file
•1 # -*- Mode: Perl -*-
2 ## Copyright (C) 2013 Robert Krawitz
3 ##
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
7 ## any later version.
8 ##
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
13 ##
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program. If not, see <https://www.gnu.org/licenses/>.
16
17 # Remove annoying TeX warnings from db2pdf.
18
19 $nc="";
20 while (<>) {
21 next if /^$/;
22 chomp;
23 LINE:
24 if (/^Overfull \\hbox|^LaTeX Font Warning:|^LaTeX Warning: Reference.*undefined on input line|^Package hyperref Warning:/) {
25 $nc=" ";
26 $_=<>;
27 $_=<>;
28 while (<>) {
29 if (! /^ *$/) {
30 chomp;
31 goto LINE;
32 }
33 }
34 } else {
35 print "${nc}$_";
36 $nc="\n";
37 }
38 }
39 if ($nc ne "") {
40 print "\n";
41 }