| 1 |
From: Didier Raboud <[email protected]> |
| 2 |
Date: Sat, 1 Dec 2018 01:39:17 +0100 |
| 3 |
Subject: Mirror doc/developer/cleanwarnings.pl from upstream |
| 4 |
|
| 5 |
Taken from upstream's master; it is needed to rebuild the doc PDFs from source |
| 6 |
--- |
| 7 |
doc/developer/cleanwarnings.pl | 41 +++++++++++++++++++++++++++++++++++++++++ |
| 8 |
1 file changed, 41 insertions(+) |
| 9 |
create mode 100644 doc/developer/cleanwarnings.pl |
| 10 |
|
| 11 |
diff --git a/doc/developer/cleanwarnings.pl b/doc/developer/cleanwarnings.pl |
| 12 |
new file mode 100644 |
| 13 |
index 0000000..42df778 |
| 14 |
--- /dev/null |
| 15 |
+++ b/doc/developer/cleanwarnings.pl |
| 16 |
@@ -0,0 +1,41 @@ |
| 17 |
+# -*- Mode: Perl -*- |
| 18 |
+## Copyright (C) 2013 Robert Krawitz |
| 19 |
+## |
| 20 |
+## This program is free software; you can redistribute it and/or modify |
| 21 |
+## it under the terms of the GNU General Public License as published by |
| 22 |
+## the Free Software Foundation; either version 2, or (at your option) |
| 23 |
+## any later version. |
| 24 |
+## |
| 25 |
+## This program is distributed in the hope that it will be useful, |
| 26 |
+## but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 27 |
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 |
+## GNU General Public License for more details. |
| 29 |
+## |
| 30 |
+## You should have received a copy of the GNU General Public License |
| 31 |
+## along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 32 |
+ |
| 33 |
+# Remove annoying TeX warnings from db2pdf. |
| 34 |
+ |
| 35 |
+$nc=""; |
| 36 |
+while (<>) { |
| 37 |
+ next if /^$/; |
| 38 |
+ chomp; |
| 39 |
+ LINE: |
| 40 |
+ if (/^Overfull \\hbox|^LaTeX Font Warning:|^LaTeX Warning: Reference.*undefined on input line|^Package hyperref Warning:/) { |
| 41 |
+ $nc=" "; |
| 42 |
+ $_=<>; |
| 43 |
+ $_=<>; |
| 44 |
+ while (<>) { |
| 45 |
+ if (! /^ *$/) { |
| 46 |
+ chomp; |
| 47 |
+ goto LINE; |
| 48 |
+ } |
| 49 |
+ } |
| 50 |
+ } else { |
| 51 |
+ print "${nc}$_"; |
| 52 |
+ $nc="\n"; |
| 53 |
+ } |
| 54 |
+} |
| 55 |
+if ($nc ne "") { |
| 56 |
+ print "\n"; |
| 57 |
+} |