components/groff/patches/grotty-tty.cpp.patch
author pkidd <patrick.kidd@oracle.com>
Thu, 06 Oct 2016 15:40:32 -0700
branchs11u3-sru
changeset 7068 568b699564d4
parent 3706 bd45826ad92c
permissions -rw-r--r--
build metadata for S11.3SRU14.1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3706
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     1
Fix for disabling Unicode Box Drawing character (CR #18159500).
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     2
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     3
This fix is not integrated into the groff git repository upstream yet,
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     4
but has been passed upstream.
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     5
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     6
--- groff-1.22.2/src/devices/grotty/tty.cpp.orig	2014-02-03 05:20:27.696842116 -0800
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     7
+++ groff-1.22.2/src/devices/grotty/tty.cpp	2014-02-03 05:26:26.723872248 -0800
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     8
@@ -275,10 +275,17 @@
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
     9
 
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    10
 tty_printer::tty_printer() : cached_v(0)
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    11
 {
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    12
+#if 0
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    13
+  // Disable Unicode Box Drawing character because width definition
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    14
+  // of this area is ambiguous so some fonts has half width but some
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    15
+  // fonts has full width. See the following link for more details:
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    16
+  // http://unicode.org/reports/tr11/
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    17
+
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    18
   if (font::is_unicode) {
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    19
     hline_char = 0x2500;
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    20
     vline_char = 0x2502;
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    21
   }
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    22
+#endif
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    23
   schar dummy;
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    24
   // black, white
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    25
   (void)tty_color(0, 0, 0, &dummy, 0);
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    26
@@ -652,6 +659,9 @@
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    27
   }
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    28
 }
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    29
 
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    30
+#if 0
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    31
+// Disable Unicode Box Drawing character
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    32
+
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    33
 // The possible Unicode combinations for crossing characters.
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    34
 //
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    35
 // `  ' = 0, ` -' = 4, `- ' = 8, `--' = 12,
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    36
@@ -665,6 +675,7 @@
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    37
   0x2574, 0x2510, 0x2518, 0x2524,
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    38
   0x2500, 0x252C, 0x2534, 0x253C
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    39
 };
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    40
+#endif
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    41
 
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    42
 void tty_printer::end_page(int page_length)
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    43
 {
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    44
@@ -713,11 +724,15 @@
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    45
       if (nextp && p->hpos == nextp->hpos) {
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    46
 	if (p->draw_mode() == HDRAW_MODE &&
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    47
 	    nextp->draw_mode() == VDRAW_MODE) {
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    48
+
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    49
+#if 0
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    50
+          // Disable Unicode Box Drawing character
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    51
 	  if (font::is_unicode)
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    52
 	    nextp->code =
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    53
 	      crossings[((p->mode & (START_LINE|END_LINE)) >> 4)
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    54
 			+ ((nextp->mode & (START_LINE|END_LINE)) >> 6)];
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    55
 	  else
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    56
+#endif
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    57
 	    nextp->code = '+';
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    58
 	  continue;
bd45826ad92c PSARC 2013/394 groff version 1.22.2
osayama <osamu.sayama@oracle.com>
parents:
diff changeset
    59
 	}