components/groff/patches/gtroff_hang_mja.patch
author osayama <osamu.sayama@oracle.com>
Wed, 21 Jan 2015 20:57:59 -0800
changeset 3667 9281a3b8df2d
permissions -rw-r--r--
18934703 gtroff hangs in environment::possibly_break_line with -mja
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3667
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     1
This patch comes from in-house and has been submitted upstream:
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     2
http://savannah.gnu.org/bugs/?44018
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     3
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     4
--- groff-1.22.2/src/roff/troff/env.cpp.org	2013-02-07 21:06:06.000000000 +0900
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     5
+++ groff-1.22.2/src/roff/troff/env.cpp	2015-01-14 10:23:07.817142586 +0900
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     6
@@ -2110,6 +2110,9 @@
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     7
     }
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     8
     distribute_space(pre, bp->nspaces, extra_space_width);
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     9
     hunits output_width = bp->width + extra_space_width;
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    10
+    if (output_width <= 0)
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    11
+      return;
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    12
+
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    13
     input_line_start -= output_width;
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    14
     if (bp->hyphenated)
9281a3b8df2d 18934703 gtroff hangs in environment::possibly_break_line with -mja
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    15
       hyphen_line_count++;