1 Submitted By: Matthew Burgess (matthew at linuxfromscratch dot org)
3 Initial Package Version: 1.18.1.4
4 Origin: http://ftp.debian.org/debian/pool/main/g/groff/groff_1.18.1.1-12.diff.gz
5 Upstream Status: This is a debian-specific patch
6 Description: Adds the ascii8 and nippon devices to groff for man-db.
8 diff -Naur groff-1.18.1.4.orig/ChangeLog.jp groff-1.18.1.4/ChangeLog.jp
9 --- groff-1.18.1.4.orig/ChangeLog.jp 1970-01-01 00:00:00.000000000 +0000
10 +++ groff-1.18.1.4/ChangeLog.jp 2006-10-18 18:54:44.000000000 +0000
12 +2002-11-04 Fumitoshi UKAI <ukai@debian.or.jp>
14 + * src/libs/libgroff/encoding.cc: for C or POSIX locale,
15 + use ascii8 encoding handler
16 + * font/devX*: new font desc for M, G
17 + * src/xditview: support ENABLE_MULTIBYTE (Japanese only?)
19 +2002-10-09 Fumitoshi UKAI <ukai@debian.or.jp>
21 + * update groff-1.18-7
23 +2002-09-23 Fumitoshi UKAI <ukai@debian.or.jp>
25 + * src/roff/troff/input.cc: fix bug in wchar_charinfo()
26 + check u<CODE> where <CODE> is 4- HEX chars
27 + * src/device/grohtml/post-html.cc: works ENABLE_MULTIBYTE
28 + * font/devhtml: add font M, G for Japanese
30 +2002-09-22 Fumitoshi UKAI <ukai@debian.or.jp>
32 + * new multibyte patch
34 +2001-08-16 Fumitoshi UKAI <ukai@debian.or.jp>
37 + fix disappearing `-' char
39 +2001-07-21 Fumitoshi UKAI <ukai@debian.or.jp>
41 + * add ENABLE_MULTIBYTE support to src/xditview
43 +2001-07-20 Fumitoshi UKAI <ukai@debian.or.jp>
45 + * introduce "fontset" in font/*/DESC
46 + obsoletes "ondemand"
48 +2001-07-19 Fumitoshi UKAI <ukai@debian.or.jp>
50 + * don't use input_encoding->is_wchar_code()
51 + * fix troffrc empty line
52 + * fix duplicate strcasecmp()
54 +2001-07-19 Fumitoshi UKAI <ukai@debian.or.jp>
56 + * sub font selection move into environment::add_char()
57 + it makes possible to use \[uni<code>]
59 +2001-07-19 Fumitoshi UKAI <ukai@debian.or.jp>
61 + * use generic iconv_handler instead of euc_handler
62 + * internal code now uses UCS-2
64 +2001-07-19 Fumitoshi UKAI <ukai@debian.or.jp
67 + - still no code conversion
68 + - font description is not accurate
69 + * change "fixed" to charset range
71 +2001-07-18 Fumitoshi UKAI <ukai@debian.or.jp>
73 + * Configuration Change:
74 + obsolete: --enable-japanese (#ifdef NIPPON)
75 + new: --enable-multibyte (#ifdef ENABLE_MULTIBYTE)
77 +2001-07-18 Fumitoshi UKAI <ukai@debian.or.jp>
79 + * create charinfo for wchar on demand (src/roff/troff/input.cc)
80 + * use "fixed" for font wchar metric (src/libs/libgroff/font.cc)
83 +2001-07-17 Fumitoshi UKAI <ukai@debian.or.jp>
85 + * add utf8 encoding handler to src/libs/libgroff/encoding.cc
86 + (this utf8 encodig handler is too slow!)
88 +2001-07-15 Fumitoshi UKAI <ukai@debian.or.jp>
90 + * based on groff 1.17.2-1
91 + * use src/include/encoding.h instead of eucmac.h
92 + * introduce src/libs/libgroff/encoding.cc
93 + * introduce tmac/euc-jp.tmac for EUC-JP documents
95 +2001-05-24 Fumitoshi UKAI <ukai@debian.or.jp>
97 + * Apply for groff-1.17
99 +2000-01-06 Yoshiaki Yanagihara <yochi@debian.or.jp>
101 + * Apply japanese patch "jgroff-0.101"
102 + (thanks hanataka@abyss.rim.or.jp).
103 + * Added japanese extention option at configure.in, aclocal.m4.
105 +Sat Jan 1 17:10:32 JST 2000 HANATAKA Shinya <hanataka@abyss.rim.or.jp>
107 + * jgroff-0.100 ¤ò¤½¤Î¤Þ¤Þ groff-1.14 ¤ËŬÍѤ·¤Æ jgroff-101
109 + * grohtml ¤òÆüËܸì¤ËÂбþ¤µ¤»¤ë¡£
110 + * ÆüËܸì¥Þ¥Ë¥å¥¢¥ëÍÑ¤Ë tmac.docj ¤È tmac.andocj ¥Þ¥¯¥í¤òÄɲá£
112 +Sun Mar 15 18:23:12 1998 Yoshiaki Yanagihara <yochi@debian.or.jp>
114 + * jgroff ¤Î¥Ù¡¼¥¹¤ò groff-1.11a ¤ËÊѹ¹¤·¡¢jgroff-0.99¥Ñ¥Ã¥Á¤ò
115 + ŬÍѤ·¤¿¤â¤Î¤ò jgroff-0.100 ¤È¤·¤¿¡£
116 + ´ðËÜŪ¤Ë jgroff-0.99 ¤Èµ¡Ç½¤ÏƱ¤¸ *¤Ï¤º*¡£
118 +Fri Dec 22 11:47:46 1995 Kitagawa Toshiyuki <tm-kita@kh.rim.or.jp>
122 +Mon Dec 18 18:28:37 1995 Kitagawa Toshiyuki <tm-kita@kh.rim.or.jp>
124 + * tmac/Makefile.sub: ¥¿¡¼¥²¥Ã¥È stamp-wrap¡¢uninstall_sub ¤¬°ìÉô
125 + OS¤Îsh¤Ç¹½Ê¸¥¨¥é¡¼¤È¤Ê¤ë¥ª¥ê¥¸¥Ê¥ë¥Ð¥°¤ò½¤Àµ¡£
127 +Wed Dec 13 15:09:26 1995 Kitagawa Toshiyuki <tm-kita@kh.rim.or.jp>
129 + * jgroff.sh: ¥ª¥ê¥¸¥Ê¥ë¤Ç¥¤¥ó¥¹¥È¡¼¥ë¥Ñ¥¹¤¬Êѹ¹¤µ¤ì¤¿¤Î¤Ë¹ç¤ï¤»¡¢
130 + GROFF_TMAC_PATH¡¢GROFF_FONT_PATH¤òshare/groffÇÛ²¼¤ËÊѹ¹¡£
132 +Sat Dec 9 15:28:36 1995 Kitagawa Toshiyuki <tm-kita@kh.rim.or.jp>
134 + * wchar.h¤«¤éeucmac.h¤Ë¥Õ¥¡¥¤¥ë̾¤òÊѹ¹¡£
136 +Fri Dec 8 12:15:47 1995 Yoshio Takaeda <shio@yinyan.bekkoame.or.jp>
138 + * troff/env.cc(add_char): ¡ØASCIIʸ»ú + ²þ¹Ô¥³¡¼¥É + EUCʸ»ú¡Ù¤È¤¤¤¦
139 + ¥Ñ¥¿¡¼¥ó¤Î»þ¡¢²þ¹Ô¥³¡¼¥É¤¬¥¹¥Ú¡¼¥¹¤ËÊÑ´¹¤µ¤ì¤Ê¤¤¥Ð¥°¤ò½¤Àµ¡£
141 +Thu Dec 7 21:35:06 1995 Yanagihara Yoshiaki <yosiaki@bsd2.kbnes.nec.co.jp>
143 + * troff/input.cc (process_input_stack): gcc-2.7.0¤ÇÊÑ¿ôÄêµÁ¤¬¥¹¥³¡¼¥×
144 + °ãÈ¿¤È¤Ê¤Ã¤Æ¤·¤Þ¤¦²Õ½ê¤ò½¤Àµ¡£
146 +Thu Dec 7 21:35:06 1995 Yanagihara Yoshiaki <yosiaki@bsd2.kbnes.nec.co.jp>
148 + * jgroff¤Î¥Ù¡¼¥¹¥½¡¼¥¹¤ògroff-1.10¤ËÊѹ¹¡£
150 +Thu Apr 6 16:56:32 1995 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
152 + * devdvi/M.proto-NTT: DNP¤Îpk¥Õ¥©¥ó¥È¤Î¥Á¥§¥Ã¥¯¥µ¥àÃͤ¬0¤Ê¤Î¤Ç¡¢¤³
153 + ¤ì¤Ë¹ç¤ï¤»¤Æchecksum¤ÎÃͤò0¤ËÊѹ¹¡£
155 +Mon Apr 3 20:36:37 1995 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
157 + * troff/env.cc (possibly_break_line):
158 + line¥ê¥¹¥ÈÃæ¤Îkword_space_node¤òÄ´À°¤¹¤ë½èÍý¤Ç¡¢lineÃæ¤Ë¤³¤Î¥Î¡¼¥É
159 + ¤¬´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï½èÍý¤ò¥¹¥¥Ã¥×¤¹¤ë¤è¤¦¤Ë¤·¤¿(EUC¥³¡¼¥É¤ò´Þ¤Þ
160 + ¤Ê¤¤roff¤ò½èÍý¤¹¤ë¾ì¹ç¤Ë¤Ïkword_space_node¤Ï¸½¤ì¤Ê¤¤¤Î¤Ç½èÍý¤¬¹â®
163 +Mon Apr 3 20:36:37 1995 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
165 + * troff/env.cc (add_char): hwkern¡¢vlower¤Î½é´ü²½¤Ïdevice½é´ü²½¸å
166 + ¤Ë°ìÅÙ¤À¤±¹Ô¤¨¤ÐÎɤ¤¤Î¤Çenvironment¥¯¥é¥¹¤Î¥³¥ó¥¹¥È¥é¥¯¥¿¤Ç¤³¤ì¤ò
169 +Sat Apr 1 17:57:23 1995 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
171 + * troff/input.cc (mount_on_demand): on demand¤Ç¥Þ¥¦¥ó¥È¤µ¤ì¤ë¥Õ¥©
172 + ¥ó¥È̾¤ò¥Ç¥Ð¥¤¥¹¤´¤È¤ÎDESC¥Õ¥¡¥¤¥ë¤Ç»ØÄê¤Ç¤¤ë¤è¤¦¤ËÊѹ¹¡£
173 + ¥Ç¥£¥ì¥¯¥Æ¥£¥Öondemand¤Ç»ØÄꤷ¤¿¥Õ¥©¥ó¥È¤¬on demand¤Ç¥Þ¥¦¥ó¥È¤µ¤ì¤ë¡£
175 +Fri Mar 31 20:23:43 1995 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
177 + * libgroff/font.cc (load): ´Á»ú¥Õ¥©¥ó¥È¥Õ¥¡¥¤¥ëÍѤ˥ǥ£¥ì¥¯¥Æ¥£¥Ö
178 + fixedkanji¤òÄɲᣤ³¤ì¤Ï³Æʸ»ú¤Î¥á¥È¥ê¥Ã¥¯¤¬Á´¤ÆƱ¤¸¤Ç¤¢¤ë»ö¤ò»ØÄê
179 + ¤¹¤ë¤â¤Î¤Ç¡¢fixedkanji¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ïcharset¤Ïɾ²Á¤µ¤ì¤Ê¤¤
180 + ¤¿¤á´Á»ú¥Õ¥©¥ó¥È¤Î¥í¡¼¥É¤¬Â®¤¤¡£
182 +Thu Mar 30 18:20:24 1995 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
184 + * troff: node¼±Ê̤òʸ»úÎóÈæ³Ó¤Ç¹Ô¤Ã¤Æ¤¤¤¿¤¬¹â®²½¤Î¤¿¤á¿ôÃÍÈæ³Ó¤Ë
187 +Wed Mar 29 20:20:49 1995 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
189 + * troff/input.cc: ´Á»ú¥Õ¥©¥ó¥È(M¤ÈG)¤òon demand¤Ç¥Þ¥¦¥ó¥È¤¹¤ë¤è¤¦
190 + ¤ËÊѹ¹¡£¤³¤ì¤Ë¤è¤Ã¤Æ´Á»ú¤ò´Þ¤Þ¤Ê¤¤roff¥Õ¥¡¥¤¥ë¤Î½èÍý»þ´Ö¤¬¹â®²½¤µ
193 +Fri Mar 10 15:34:26 1995 Shigeki Yoshida <shige@theta.iis.u-tokyo.ac.jp>
195 + * troff/input.cc (process): geqn¤Ç¡¢
201 + ¤ò½èÍý¤¹¤ë¤È¡¢"illegal token in argument to \Z"¤È¤Ê¤Ã¤Æ¤·¤Þ¤¦¥Ð¥°
202 + (\Z¥·¡¼¥±¥ó¥¹¤Î°ú¿ô¤ËEUCʸ»ú¤¬Í褿¾ì¹ç¤ÎÂбþϳ¤ì)¤ò½¤Àµ¡£
204 +Mon Feb 6 11:22:33 1995 Yoshio Takaeda <e50110@sakura.kudpc.kyoto-u.ac.jp>
206 + * troff/input.cc: ¹ÔƬ¶Ø§ʸ»ú¤ÎEUC¥³¡¼¥É¤Î°ìÉô¤¬ÉÔÀµ¡£
208 +Mon Jan 30 14:02:54 1995 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
212 +Fri Dec 10 14:26:14 1994 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
214 + * devdvi/M.proto: NTT JTeX¤ÈASCIIÆüËܸìTeXξÊý¤Îdvi¥Õ¥¡¥¤¥ë¤ò°·¤¨¤ë¤è¤¦
215 + M.proto¥Õ¥¡¥¤¥ë¤òÊѹ¹¡£
217 +Fri Dec 9 14:26:14 1994 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
219 + * troff/node.cc: boldfont_list[]¤Ë¥Õ¥©¥ó¥È̾ B ¤òÅÐÏ¿¤·¤Æ¤¤¤Ê¤«¤Ã
220 + ¤¿¤¿¤á¡¢dvi¥Õ¥¡¥¤¥ë¤Ë¥´¥·¥Ã¥¯ÂΤ¬½ÐÎϤµ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¡£
222 +Fri Dec 9 14:23:22 1994 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
224 + * grotty/tty.cc (add_char): EUCʸ»ú¤ËÂФ·¤ÆWCHAR_MODE¤òÀßÄꤷ¤Æ¤¤
225 + ¤Ê¤«¤Ã¤¿¤¿¤á¡¢tty½ÐÎϤǥ´¥·¥Ã¥¯ÂΤ¬Æó½ÅÂǤÁ¤µ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¡£
227 +Fri Dec 9 14:19:33 1994 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
229 + * devdvi/Makefile.sub: ¥Õ¥©¥ó¥È¥Õ¥¡¥¤¥ë G ¤Ç¡¢name¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤¬
230 + `name M'¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
232 +Wed Nov 30 13:24:54 1994 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
236 + * grodvi/dvi.cc: FreeBSD 1.1.5R¤Îstrcmp(3)¤Ç¤Ï°ú¿ô¤Ë¥Ì¥ë¥Ý¥¤¥ó¥¿¤ò
237 + ÅϤ¹¤È¥³¥¢¥À¥ó¥×¤·¤Æ¤·¤Þ¤¦¤Î¤Ç¡¢¤³¤ì¤ò²óÈò¤¹¤ë¥³¡¼¥É¤òÄɲä·¤¿¡£
239 +Tue Nov 29 13:52:54 1994 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
241 + * troff/input.cc: EUC¤Î¥¹¥Ú¡¼¥¹Ê¸»ú(0xa1a1)¤ÏASCII¤Î¥¹¥Ú¡¼¥¹Ê¸»ú¤È
242 + ¤·¤Æ½èÍý¤¹¤ë¤è¤¦½¤Àµ¡£
244 + * devnippon/createM: JISX0208¤Ë¤ª¤¤¤Æʸ»ú¤¬Ì¤ÄêµÁ¤ÎÉôʬ¤Ë¤Ä¤¤¤Æ¤Ï
245 + ¥Õ¥©¥ó¥È¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤ·¤Ê¤¤¤è¤¦½¤Àµ¡£
247 +Mon Nov 28 18:15:31 1994 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
249 + * grodvi/dvi.cc: grodvi¤òÆüËܸ첽¤·¤¿¡£
251 +Fri Nov 25 15:39:05 1994 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
253 + * troff/env.cc: EUCʸ»ú¤Ç»Ï¤Þ¤ë¹Ô¤ËÂФ·¤Æ¶ÑÅù³ä¤êÉÕ¤±¤¬¹Ô¤ï¤ì¤¿¾ì
254 + ¹ç¡¢¹ÔƬ¤Ë;ʬ¤Ê¶õÇò¤¬Æþ¤ë»ö¤¬¤¢¤Ã¤¿¤Î¤Ç¤³¤ì¤ò½¤Àµ¤·¤¿¡£
256 +Fri Nov 18 20:19:55 1994 Masubuchi Toshimichi <tmasu@st.rim.or.jp>
258 + * devnippon/createM.c: createM¤Î½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤¬ÉÔÄê¤Ë¤Ê¤ë¤¿¤á¡¢
259 + make¤¬½ªÎ»¤·¤Æ¤·¤Þ¤¦¡£createM¤Î½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤¬0¤Ë¤Ê¤ë¤è¤¦½¤Àµ¡£
261 + * devnippon/Makefile.sub: PATH´Ä¶ÊÑ¿ô¤Ë¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤¬´Þ¤Þ
262 + ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢devnippon/M¤òmake¤¹¤ë»þÅÀ¤ÇcreateM¤¬¸«¤Ä¤«¤é¤ºmake
263 + ¥¨¥é¡¼¤Ë¤Ê¤ë¥Ð¥°¤ò½¤Àµ¡£
265 +Thu Nov 17 17:11:26 1994 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
267 + * devnippon/createM.c: gets()¤òfgets()¤ËÊѹ¹¡£
269 +Sat Nov 12 13:38:19 1994 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
273 + * troff/env.cc: .stt ¥ê¥¯¥¨¥¹¥È¤òÄɲÃ(¥í¡¼¥«¥ë¤Ê¥Þ¥Ë¥å¥¢¥ë½ñ¼°¤Ë¹ç
274 + ¤ï¤»¤ë¤¿¤á -> ¤³¤Î¥ê¥¯¥¨¥¹¥È¤ÏÈó¸ø³«)¡£
276 + * troff/input.cc (init_charset_table): ASCII¤Î¹ÔƬ¶Ø§ʸ»ú¤È¤·¤Æ
279 + * EUC¥Õ¥©¥ó¥È¥Õ¥¡¥¤¥ë¤Ï¡¢make»þ¤Ë¥Ä¡¼¥ë¤Ë¤è¤Ã¤ÆÀ¸À®¤¹¤ë¤è¤¦Êѹ¹¡£
280 + ¤³¤ì¤Ë¤è¤êpatch¥µ¥¤¥º¤¬¤«¤Ê¤ê¾®¤µ¤¯¤Ê¤Ã¤¿¡£
282 +Fri Nov 11 20:53:00 1994 Kitagawa Toshiyuki <kitagawa@bsd2.kbnes.nec.co.jp>
284 + * troff/env.cc (add_char): <EUCʸ»ú> + <ASCIIʸ»ú>¤Î¾ì¹ç¡¢´Ö¤ËÆþ¤ì
285 + ¤ë¶õÇò¤Ï¶Ø§¤Ë°ãÈ¿¤·¤Ê¤¤¤«¤®¤ê¥Ö¥ì¡¼¥¯²Äǽ¤Ê¶õÇò¤¬Æþ¤ë¤è¤¦½¤Àµ¤·¤¿¡£
288 +Tue Oct 25 04:46:09 1994 Kitagawa Toshiyuki (kitagawa@bsd2.kbnes.nec.co.jp)
292 + * libdriver/input.cc (do_file): -Tlatin1¤ÇEUC¤Ç¤Ï¤Ê¤¤Ê¸»ú¥³¡¼¥É¤ò
293 + EUC¤ÈȽÃǤ·¤Æ¤·¤Þ¤¦¥Ð¥°¤ò½¤Àµ¡£
295 +Mon Oct 24 07:16:19 1994 Kitagawa Toshiyuki (kitagawa@bsd2.kbnes.nec.co.jp)
297 + * troff/node.cc (is_boldfont): FreeBSD 1.1.5¤Ç¡¢¥¼¥íÈÖÃÏ»²¾È¤Î¤¿¤á¥³
298 + ¥¢¥À¥ó¥×¤¹¤ë¥Ð¥°¤ò½¤Àµ¡£
300 + * indxbib/dirnamemax.c: FreeBSD 1.1.5¤Ïpathconf()¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç
301 + _POSIX_VERSION¤òundef¤·¤¿¡£
305 + * geqn¤òÆüËܸ첽¤·¤¿¡£
307 + * devps/DESC¤Îwcharkern¤òÀßÄꤹ¤ë¤È¹ÔƬ¤Ë¶õÇò¤¬Æþ¤Ã¤Æ¤·¤Þ¤¦¥Ð¥°¤Î
310 +Sat Oct 22 08:19:15 1994 Kitagawa Toshiyuki (kitagawa@bsd2.kbnes.nec.co.jp)
314 + * xtotroff¤òÆüËܸ첽¡£
316 +Fri Oct 21 05:33:02 1994 Kitagawa Toshiyuki (kitagawa@bsd2.kbnes.nec.co.jp)
318 + * devps/DESC¤Îwcharkern¤òÀßÄꤹ¤ë¤È¹ÔƬ¤Ë¶õÇò¤¬Æþ¤Ã¤Æ¤·¤Þ¤¦»ö¤¬¤¢
319 + ¤Ã¤¿¤Î¤Ç¡¢¤³¤ì¤ò½¤Àµ¡£
321 + * pre-release¥Ð¡¼¥¸¥ç¥ó¡£
323 + * gxditview¤òÆüËܸ첽¤·¤¿(¥Õ¥©¥ó¥È¥á¥È¥ê¥Ã¥¯¤Î¼è¤ê½Ð¤·¤¬¤¤¤¤²Ã¸º)¡£
325 +Thu Oct 20 05:23:09 1994 Kitagawa Toshiyuki (kitagawa@bsd2.kbnes.nec.co.jp)
327 + * ¥Õ¥©¥ó¥ÈÈÖ¹æ3¤Ë¥Ü¡¼¥ë¥ÉÂΰʳ°¤Î¥Õ¥©¥ó¥È¤ò¥Þ¥¦¥ó¥È¤·¤¿¾ì¹ç¡¢´Á»ú¥Õ¥©
328 + ¥ó¥È¤¬¥´¥·¥Ã¥¯ÂΤˤʤäƤ·¤Þ¤¦¥Ð¥°¤ò½¤Àµ¡£
330 +Wed Oct 19 06:48:55 1994 Kitagawa Toshiyuki (kitagawa@bsd2.kbnes.nec.co.jp)
334 +Tue Oct 18 05:02:59 1994 Kitagawa Toshiyuki (kitagawa@bsd2.kbnes.nec.co.jp)
337 + gpic¤òÆüËܸìÂбþ¤·¤¿¡£
340 + gtbl¤òÆüËܸìÂбþ¤·¤¿¡£
343 + Times-Bold°Ê³°¤Î¥Ü¡¼¥ë¥ÉÂΤ¬¥«¥ì¥ó¥È¥Õ¥©¥ó¥È¤Î»þ¡¢´Á»ú¥Õ¥©¥ó¥È¤¬¥´
344 + ¥·¥Ã¥¯¤ËÀÚ¤êÂؤï¤é¤Ê¤¤¥Ð¥°¤ò½¤Àµ¡£
347 + DESC¤Ë¥Ç¥£¥ì¥¯¥Æ¥£¥Öwcharkern¤òÄɲä·¡¢ASCIIʸ»ú¤ÈEUCʸ»ú¤Î´Ö¤Ë¡¢
348 + »ØÄꤷ¤¿unit¿ô¤À¤±breakÉÔ²Äǽ¤Ê¶õÇò¤òÆþ¤ì¤ë¤è¤¦¤Ë¤·¤¿¡£
351 + DESC¤Ë¥Ç¥£¥ì¥¯¥Æ¥£¥Ölowerwchar¤òÄɲä·¡¢ASCIIʸ»ú¤ËÂФ·¤ÆEUCʸ»ú¤ò¡¢
352 + »ØÄꤷ¤¿unit¿ô¤À¤±²¼¤²¤ë¤è¤¦¤Ë¤·¤¿(ASCIIʸ»ú¤¬Íî¤Á¹þ¤ó¤Ç¸«¤¨¤ë¤¿¤á)¡£
354 +Fri Oct 14 08:29:06 1994 Kitagawa Toshiyuki (kitagawa@bsd2.kbnes.nec.co.jp)
356 + * aplah¥Ð¡¼¥¸¥ç¥ó¡£
357 diff -Naur groff-1.18.1.4.orig/Makefile.in groff-1.18.1.4/Makefile.in
358 --- groff-1.18.1.4.orig/Makefile.in 2002-09-16 16:51:00.000000000 +0000
359 +++ groff-1.18.1.4/Makefile.in 2006-10-18 18:54:44.000000000 +0000
361 # directory will be always added.
362 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
363 # current nor in the home directory.
364 +ifeq (,$(extratmacdirs))
365 tmacpath=$(systemtmacdir):$(localtmacdir):$(tmacdir)
367 +tmacpath=$(systemtmacdir):$(localtmacdir):$(tmacdir):$(extratmacdirs)
370 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
371 sys_tmac_prefix=@sys_tmac_prefix@
374 man7dir=$(manroot)/man$(man7ext)
377 +DVIFORMAT=@DVIFORMAT@
379 # The configure script checks whether all necessary utility programs for
380 # grohtml are available -- only then we can build the HTML documentation.
381 make_html=@make_html@
383 # -DRETSIGTYPE=int if signal handlers return int not void
384 # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC
385 # -DPAGEA4 if the the printer's page size is A4
386 +# -DENABLE_MULTIBYTE enable multibyte extension
387 +# -DHAVE_LANGINFO_CODESET if you have nl_langinfo(CODESET)
392 "PERLPATH=$(PERLPATH)" \
393 "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
395 - "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
396 + "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \
397 + "DVIFORMAT=$(DVIFORMAT)"
416 -dodirs=$(ALLDIRS) dot
418 # Default target for subdir_Makefile
419 subdir=src/roff/troff
421 diff -Naur groff-1.18.1.4.orig/README.jp groff-1.18.1.4/README.jp
422 --- groff-1.18.1.4.orig/README.jp 1970-01-01 00:00:00.000000000 +0000
423 +++ groff-1.18.1.4/README.jp 2006-10-18 18:54:44.000000000 +0000
426 + ÆüËܸìÂбþÈÇ groff-1.12 (jgroff-0.101)
429 + ËÌÀî ¿®µü (Kitagawa Toshiyuki)
430 + tm-kita@kh.rim.or.jp
432 + Ìø¸¶ ÎÉμ (Yanagihara Yoshiaki)
435 + GNU¤Îroff¥Õ¥©¡¼¥Þ¥Ã¥¿groff(version 1.12)¤ÎÆüËܸìÂбþ¤ò¹Ô¤Ê¤¤¤Þ¤·¤¿¡£
436 + ¾å°Ì¸ß´¹¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢ÆüËܸì¤ò´Þ¤Þ¤Ê¤¤roff¥Ç¡¼¥¿¤Ï¥ª¥ê¥¸¥Ê¥ë¤É
437 +¤ª¤ê¤ÎÆ°ºî¤Ë¤Ê¤ê¤Þ¤¹¡£ÆüËܸ첽¤Ë´Ø¤¹¤ë½¤ÀµÉôʬ¤Ë¤Ä¤¤¤Æ¤ÎÃøºî¸¢¤ÏGNU
438 +General Public License Version 2 ¤Ë½¾¤¤¤Þ¤¹(¾ÜºÙ¤ÏCOPYING¤ò¸æÍ÷¤¯¤À¤µ¤¤)¡£
440 + ÆüËܸìgroff(jgroff)¤Î¸½¥Ð¡¼¥¸¥ç¥ó¤Ï0.101(ºÇ½ª¦ÂÈÇ)¤Ç¤¹¡£¤³¤Î¥Ð¡¼¥¸¥ç¥ó
441 +¤Ç¤Ï°Ê²¼¤Î¥â¥¸¥å¡¼¥ë¤¬ÆüËܸ첽¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
443 + groff ... groff¥É¥é¥¤¥Ð
444 + gtroff ... groffËÜÂÎ
445 + grotty ... üËöÍѥݥ¹¥È¥×¥í¥»¥Ã¥µ
446 + grops ... PostScriptÍѥݥ¹¥È¥×¥í¥»¥Ã¥µ
447 + grohtml ... HTMLÍѥݥ¹¥È¥×¥í¥»¥Ã¥µ(Thanks HANATAKA Shinya
448 + <hanataka@abyss.rim.or.jp>)
449 + grodvi ... DVIÍѥݥ¹¥È¥×¥í¥»¥Ã¥µ (NTT JTeX or ASCIIÆüËܸìTeX)
450 + gxditview ... X¥¦¥£¥ó¥É¥¦Íѥݥ¹¥È¥×¥í¥»¥Ã¥µ
451 + gtbl ... tbl¥Þ¥¯¥íÍÑ¥×¥ê¥×¥í¥»¥Ã¥µ
452 + gpic ... pic¥Þ¥¯¥íÍÑ¥×¥ê¥×¥í¥»¥Ã¥µ
453 + geqn ... eqn¥Þ¥¯¥íÍÑ¥×¥ê¥×¥í¥»¥Ã¥µ
454 + xtotroff ... X¤Î¥Õ¥©¥ó¥È¤«¤égroffÍÑ¥Õ¥©¥ó¥È¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹
457 +¡ô lj4¥Ý¥¹¥È¥×¥í¥»¥Ã¥µ¡¢bib´ØÏ¢¤Î¥³¥Þ¥ó¥É¤ÏÆüËܸì̤Âбþ¤Ç¤¹¡£
462 + °Ê²¼¤Î´Ä¶¤Çmake½ÐÍè¤ë¤³¤È¤ò³Îǧ¤·¤Æ¤¤¤Þ¤¹¡£
464 + ¡ù FreeBSD 2.1.0-RELEASE
465 + XFree86-3.1.2, gcc 2.6.3
467 + ¡ù Debian GNU/Linux 2.2
469 + ¡ù NEC EWS/4800/310
470 + SVR4.2 Release9.1 Rev.B, X11R5, gcc 2.6.0
472 + (1) ¥ª¥ê¥¸¥Ê¥ë¤ÈƱÍÍconfigure¤ò¼Â¹Ô¤·¤¿¸å¡¢make & install¤·¤Æ²¼¤µ¤¤¡£
473 + ¾Ü¤·¤¯¤ÏINSTALL¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
475 + *) grodvi¤ÏNTT JTeX·Á¼°¤Þ¤¿¤ÏASCIIÆüËܸìTeX·Á¼°¤ÎDVI¥Õ¥¡¥¤¥ë¤ò¥µ¥Ý¡¼
476 + ¥È¤·¤Æ¤¤¤Þ¤¹¡£groff¤¬½ÐÎϤ¹¤ëDVI¥Õ¥¡¥¤¥ë¤òASCIIÆüËܸìTeX·Á¼°¤Ë
477 + ¤·¤¿¤¤¾ì¹ç¤Ïconfigure --JTeX=ASCII¤È¤·¤Æ¤¯¤À¤µ¤¤¡£
478 + --JTeX¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¤ÏNTT JTeX·Á¼°¤Ë¤Ê¤ê¤Þ¤¹¡£
480 + (2) groff¤Îmake¤Î¸å¡¢gxditview(groff¤ÎX¥¦¥£¥ó¥É¥¦Íѥݥ¹¥È¥×¥í¥»¥Ã¥µ)
481 + ¤òmake¤·¤Þ¤¹¡£¥È¥Ã¥×¥Ç¥£¥ì¥¯¥È¥êľ²¼¤Îxditview¤Øcd¤·¤Æ¡¢
486 + % make install install.man
488 + ¤Ç¡¢¥¤¥ó¥¹¥È¡¼¥ë´°Î»¤Ç¤¹¡£
493 + groff¤Î-T¥ª¥×¥·¥ç¥ó¤Ë-Tnippon(üËöɽ¼¨)¤òÄɲä·¤¿°Ê³°¤Ï¥ª¥ê¥¸¥Ê¥ë¤Î¤Þ
497 + (£±) groff -Tnippon -man groff.jman
499 + ÆüËܸì¤ò´Þ¤àroff¥Õ¥¡¥¤¥ë(groff.jman)¤òman¥Þ¥¯¥í¤ò»È¤Ã¤Æ¥Õ¥©¡¼¥Þ¥Ã¥È¤·¡¢
502 + (£²) groff -Tps -man groff.jman
504 + ÆüËܸì¤ò´Þ¤àroff¥Õ¥¡¥¤¥ë¤ò¥Õ¥©¡¼¥Þ¥Ã¥È¤·¡¢PostScript¤ËÊÑ´¹¤·¤Þ¤¹¡£
506 + (£³) groff -TX100 -man groff.jman
508 + ÆüËܸì¤ò´Þ¤àroff¥Õ¥¡¥¤¥ë¤ò¥Õ¥©¡¼¥Þ¥Ã¥È¤·¡¢X¥¦¥£¥ó¥É¥¦¤Ëɽ¼¨¤·¤Þ¤¹¡£
510 + (£´) groff -Tdvi -man groff.jman
512 + ÆüËܸì¤ò´Þ¤àroff¥Õ¥¡¥¤¥ë¤ò¥Õ¥©¡¼¥Þ¥Ã¥È¤·¡¢DVI¥Õ¥¡¥¤¥ë¤ò½ÐÎϤ·¤Þ¤¹¡£
517 +¡¦ ÆüËܸìʸ»ú¥³¡¼¥É¤ÏÆüËܸìEUC(¤Î¥³¡¼¥É¥»¥Ã¥È1)¤Î¤ß¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£
519 +¡¦ ÆüËܸì¥Õ¥©¥ó¥È¤Ë¤Ä¤¤¤Æ¤Ï¡¢¥«¥ì¥ó¥È¥Õ¥©¥ó¥È¤¬¥Ü¡¼¥ë¥ÉÂΤλþ¤Ï¥´¥·¥Ã
520 + ¥¯ÂΤˡ¢¤½¤ì°Ê³°¤Î¥Õ¥©¥ó¥È(¥í¡¼¥Þ¥ó¡¢¥¤¥¿¥ê¥Ã¥¯¡¢¥¤¥¿¥ê¥Ã¥¯¥Ü¡¼¥ë¥É
521 + Åù)¤¬¥«¥ì¥ó¥È¥Õ¥©¥ó¥È¤Î»þ¤ÏÌÀÄ«ÂΤˡ¢¼«Æ°Åª¤ËÀÚ¤êÂؤï¤ê¤Þ¤¹¡£ÆüËܸì
522 + ¥Õ¥©¥ó¥È¤òľÀÜ»ØÄꤹ¤ë¤³¤È¤Ï½ÐÍè¤Þ¤»¤ó¡£
524 + (Ãí) ¥Õ¥©¥ó¥È¥Õ¥¡¥¤¥ë̾¤¬'B'¤Ç½ª¤Ã¤Æ¤¤¤ë¥Õ¥©¥ó¥È(B¡¢TB¡¢HNB¤Ê¤É)¤ò
525 + ¥Ü¡¼¥ë¥É¥Õ¥©¥ó¥È¤È¤·¤Æ¤¤¤Þ¤¹¡£
527 +¡¦ ¹ÔƬ¡¢¤ª¤è¤Ó¹ÔËö¶Ø§¤ËÂбþ¤·¤Æ¤¤¤Þ¤¹¡£¤½¤ì¤¾¤ì¤Î¶Ø§ʸ»ú¤Ï¡¢
529 + ¹ÔƬ¶Ø§ʸ»ú: ¡¢ ¡£¡¤¡¥¡¦¡§¡¨¡©¡ª¡Ë¡Í¡Ï¡Ñ¡×¡Ù¡Û
530 + ¤¡¤£¤¥¤§¤©¤Ã¤ã¤å¤ç¥¡¥£¥¥¥§¥©¥Ã¥ã¥å¥ç
531 + . ? ! " ' ) ] * , : ; > }
532 + ¹ÔËö¶Ø§ʸ»ú: ¡Ê ¡Ì¡Î¡Ð¡Ö¡Ø¡Ú
536 +¡¦ -Tps¤ò»ØÄꤷ¤¿¾ì¹ç¡¢EUCʸ»ú¤ÈASCIIʸ»ú¤Î´Ö¤Ë¤Ï¡¢Éý¤Î¶¹¤¤¶õÇò¤¬¼«Æ°
537 + Ū¤ËÁÞÆþ¤µ¤ì¤Þ¤¹¡£¤³¤Î¶õÇò¤ÎÉý¤Ïdevps/DESC¤Îwcharkern¤Ç»ØÄꤷ¤Þ¤¹¡£
538 + unitñ°Ì¤Ç¤¹¡£0¤ò»ØÄꤹ¤ë¤È¶õÇò¤ÏÁÞÆþ¤µ¤ì¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£
540 +¡¦ -Tps¤ò»ØÄꤷ¤¿¾ì¹ç¡¢EUCʸ»ú¤ÏASCIIʸ»ú¤ËÂФ·¤Æ¾¯¤·²¼¤²¤Æ½ÐÎϤµ¤ì¤Þ
541 + ¤¹(¤½¤Î¤Þ¤Þ¤À¤ÈASCIIʸ»ú¤¬Íî¤Á¹þ¤ó¤Ç¸«¤¨¤ë¤¿¤á)¡£¤³¤Î²¼¤²Éý¤Ï
542 + devps/DESC¤Îlowerwchar¤Ç»ØÄꤷ¤Þ¤¹¡£unitñ°Ì¤Ç¤¹¡£0¤ò»ØÄꤹ¤ë¤È»ú²¼
543 + ¤²¤Ï¹Ô¤Ê¤ï¤ì¤Þ¤»¤ó¡£
545 +¡¦ ¥ª¥ê¥¸¥Ê¥ë¤Ç¤Ï²þ¹Ô¥³¡¼¥É¤Ï̵¾ò·ï¤Ë¥¹¥Ú¡¼¥¹Ê¸»ú¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¤¬¡¢EUC
546 + ʸ»ú¤Ç°Ï¤Þ¤ì¤¿²þ¹Ô¥³¡¼¥É¤Ï¥¹¥Ú¡¼¥¹¤ËÊÑ´¹¤»¤ºÌµ»ë¤¹¤ë¤è¤¦¤Ë¤·¤Þ¤·¤¿¡£
548 +¡¦ EUC¤Î¥¹¥Ú¡¼¥¹Ê¸»ú(0xa1a1)¤ÏASCII¤Î¥¹¥Ú¡¼¥¹Ê¸»ú¤È¤·¤Æ½èÍý¤µ¤ì¤Þ¤¹¡£
553 +grodvi¤ÎASCIIÆüËܸìTeXÂбþ¤Ï¡¢±§ÅÔµÜÂç³Ø¤Î²£ÅĤµ¤ó¤¬¹Ô¤Ê¤Ã¤Æ¤¯¤À¤µ¤¤¤Þ
554 +¤·¤¿¡£grohtml¤ÎÆüËܸì(EUC)Âбþ¤Ï¡¢²Ö¿ó¿®ºÈ¤µ¤ó¤¬¹Ô¤Ã¤Æ¤¯¤ì¤Þ¤·¤¿¡£
555 +¤Þ¤¿¡¢Â¿¤¯¤ÎÊý¤«¤é¥Ð¥°¤Ë´Ø¤¹¤ëÊó¹ð¡¢½¤Àµ¥¤¥á¡¼¥¸¤òÁ÷¤Ã¤Æĺ¤¤Þ¤·¤¿¡£
556 +¸æ¶¨ÎϤ¯¤À¤µ¤Ã¤¿³§ÍͤˤϤȤƤⴶ¼Õ¤·¤Æ¤ª¤ê¤Þ¤¹¡£ÍÆñ¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£
561 +¸½¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ïlj4¥Ý¥¹¥È¥×¥í¥»¥Ã¥µ¡¢bib´ØÏ¢¤Î¥³¥Þ¥ó¥É·²¤¬ÆüËܸ첽¤µ¤ì
562 +¤Æ¤ª¤ê¤Þ¤»¤ó¡£¤³¤ì¤é¤ÎÆüËܸ첽¤ò¹Ô¤Ã¤Æ¤¯¤À¤µ¤ëÊý¤òÊ罸Ãפ·¤Æ¤ª¤ê¤Þ¤¹¡£
563 +¤¼¤Ò¸æ¶¨ÎϤ¯¤À¤µ¤¤¡£¤Þ¤¿¡¢ÆüËܸìÂбþgroff¤Ë´Ø¤·¤Æ¸æ°Õ¸«¡¢¸æ´õ˾Åù¤ò
564 +À§Èó¤ªÊ¹¤«¤»¤¯¤À¤µ¤¤¡£º£¸å¤Î»²¹Í¤Ë¤µ¤»¤Æĺ¤¤Þ¤¹(¤â¤Á¤í¤ó¥Ð¥°Êó¹ð¤â
566 +°Ê¾å¤ÏE-Mail¤Ë¤Æ¡¢tm-kita@kh.rim.or.jp°¸¤Ë¤ªÁ÷¤ê¤¯¤À¤µ¤¤¡£
567 diff -Naur groff-1.18.1.4.orig/TODO.jp groff-1.18.1.4/TODO.jp
568 --- groff-1.18.1.4.orig/TODO.jp 1970-01-01 00:00:00.000000000 +0000
569 +++ groff-1.18.1.4/TODO.jp 2006-10-18 18:54:44.000000000 +0000
578 + G,M -- NTT and/or ASCII
586 +- command line option to specify input/output encoding
588 + can we assume wchar code == font code?
589 + [to simplify indexing]
590 diff -Naur groff-1.18.1.4.orig/aclocal.m4 groff-1.18.1.4/aclocal.m4
591 --- groff-1.18.1.4.orig/aclocal.m4 2002-06-18 09:36:43.000000000 +0000
592 +++ groff-1.18.1.4/aclocal.m4 2006-10-18 18:54:44.000000000 +0000
594 AC_MSG_RESULT(no);AC_MSG_ERROR([header files do not support C++ (if you are using a version of gcc/g++ earlier than 2.5, you should install libg++)]))
595 AC_LANG_POP(C++)])dnl
597 +dnl Support Multibyte characters, such as Japanese Code (EUC-JP)
599 +AC_DEFUN(GROFF_MULTIBYTE,
600 +[AC_MSG_CHECKING([whether to enable multibyte extension])
601 +AC_ARG_ENABLE(multibyte, [ --enable-multibyte Enable multibyte extension],
602 + multibyte=$enableval, multibyte=no)
603 +if test "x$multibyte" != "xno"; then
604 + AC_DEFINE(ENABLE_MULTIBYTE, 1,
605 + [Define if you want to use multibyte extension.])
607 +AC_MSG_RESULT([$multibyte])
612 [AC_MSG_CHECKING([for prefix of system macro packages])
614 AC_MSG_RESULT([$tmac_wrap])
615 AC_SUBST(tmac_wrap)])dnl
617 +dnl codeset.m4 from gettext, by Bruno Haible.
619 +AC_DEFUN(GROFF_LANGINFO_CODESET,
620 +[AC_CACHE_CHECK([for nl_langinfo and CODESET], groff_cv_langinfo_codeset,
621 + [AC_TRY_LINK([#include <langinfo.h>],
622 + [char* cs = nl_langinfo(CODESET);],
623 + groff_cv_langinfo_codeset=yes,
624 + groff_cv_langinfo_codeset=no)
626 + if test $groff_cv_langinfo_codeset = yes; then
627 + AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
628 + [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
633 +AC_DEFUN(GROFF_DVIFORMAT,
634 +[AC_MSG_CHECKING([japanese dvi file format])
635 +if test "x$dvi_format" != "xASCII"; then
640 +AC_MSG_RESULT([$DVIFORMAT])
646 [AC_MSG_CHECKING([for existing troff installation])
648 AC_DEFINE(IS_EBCDIC_HOST, 1,
649 [Define if the host's encoding is EBCDIC.]),
651 - TTYDEVDIRS="font/devascii font/devlatin1"
652 + TTYDEVDIRS="font/devascii font/devlatin1 font/devascii8 font/devnippon"
653 OTHERDEVDIRS="font/devlj4 font/devlbp"
656 diff -Naur groff-1.18.1.4.orig/configure groff-1.18.1.4/configure
657 --- groff-1.18.1.4.orig/configure 2002-09-20 16:14:00.000000000 +0000
658 +++ groff-1.18.1.4/configure 2006-10-18 18:54:44.000000000 +0000
663 -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS groff_top_builddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS LPR LP LPQ PSPRINT DVIPRINT PERLPATH YACC RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD CPP EGREP LIBM LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap pnmcut pnmcrop pnmtopng gs psselect make_html make_install_html LTLIBOBJS'
664 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS groff_top_builddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS LPR LP LPQ PSPRINT DVIPRINT PERLPATH YACC RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD CPP EGREP LIBM LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap pnmcut pnmcrop pnmtopng gs psselect make_html make_install_html DVIFORMAT LTLIBOBJS'
667 # Initialize some variables set by options.
673 + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
674 + --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
675 + --enable-multibyte Enable multibyte extension
677 Some influential environment variables:
678 CC C compiler command
679 CFLAGS C compiler flags
680 @@ -2530,7 +2535,7 @@
681 echo "$as_me: failed program was:" >&5
682 cat conftest.$ac_ext >&5
684 - TTYDEVDIRS="font/devascii font/devlatin1"
685 + TTYDEVDIRS="font/devascii font/devlatin1 font/devascii8 font/devnippon"
686 OTHERDEVDIRS="font/devlj4 font/devlbp"
687 echo "$as_me:$LINENO: result: no" >&5
688 echo "${ECHO_T}no" >&6
689 @@ -5859,6 +5864,84 @@
693 +echo "$as_me:$LINENO: checking whether to enable multibyte extension" >&5
694 +echo $ECHO_N "checking whether to enable multibyte extension... $ECHO_C" >&6
695 +# Check whether --enable-multibyte or --disable-multibyte was given.
696 +if test "${enable_multibyte+set}" = set; then
697 + enableval="$enable_multibyte"
698 + multibyte=$enableval
702 +if test "x$multibyte" != "xno"; then
704 +cat >>confdefs.h <<\_ACEOF
705 +#define ENABLE_MULTIBYTE 1
709 +echo "$as_me:$LINENO: result: $multibyte" >&5
710 +echo "${ECHO_T}$multibyte" >&6
712 +echo "$as_me:$LINENO: checking japanese dvi file format" >&5
713 +echo $ECHO_N "checking japanese dvi file format... $ECHO_C" >&6
714 +if test "x$dvi_format" != "xASCII"; then
719 +echo "$as_me:$LINENO: result: $DVIFORMAT" >&5
720 +echo "${ECHO_T}$DVIFORMAT" >&6
723 +echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
724 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
725 +if test "${groff_cv_langinfo_codeset+set}" = set; then
726 + echo $ECHO_N "(cached) $ECHO_C" >&6
728 + cat >conftest.$ac_ext <<_ACEOF
729 +#line $LINENO "configure"
730 +#include "confdefs.h"
731 +#include <langinfo.h>
735 +char* cs = nl_langinfo(CODESET);
740 +rm -f conftest.$ac_objext conftest$ac_exeext
741 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
742 + (eval $ac_link) 2>&5
744 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
745 + (exit $ac_status); } &&
746 + { ac_try='test -s conftest$ac_exeext'
747 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
748 + (eval $ac_try) 2>&5
750 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
751 + (exit $ac_status); }; }; then
752 + groff_cv_langinfo_codeset=yes
754 + echo "$as_me: failed program was:" >&5
755 +cat conftest.$ac_ext >&5
756 +groff_cv_langinfo_codeset=no
758 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
761 +echo "$as_me:$LINENO: result: $groff_cv_langinfo_codeset" >&5
762 +echo "${ECHO_T}$groff_cv_langinfo_codeset" >&6
763 + if test $groff_cv_langinfo_codeset = yes; then
765 +cat >>confdefs.h <<\_ACEOF
766 +#define HAVE_LANGINFO_CODESET 1
771 ac_config_files="$ac_config_files stamp-h"
773 ac_config_files="$ac_config_files Makefile doc/Makefile src/xditview/Imakefile"
774 @@ -6497,6 +6580,7 @@
775 s,@psselect@,$psselect,;t t
776 s,@make_html@,$make_html,;t t
777 s,@make_install_html@,$make_install_html,;t t
778 +s,@DVIFORMAT@,$DVIFORMAT,;t t
779 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
782 diff -Naur groff-1.18.1.4.orig/configure.ac groff-1.18.1.4/configure.ac
783 --- groff-1.18.1.4.orig/configure.ac 2002-07-23 21:44:20.000000000 +0000
784 +++ groff-1.18.1.4/configure.ac 2006-10-18 18:54:44.000000000 +0000
791 +GROFF_LANGINFO_CODESET
792 AC_CONFIG_FILES(stamp-h, [echo timestamp > stamp-h])
793 AC_CONFIG_FILES([Makefile doc/Makefile src/xditview/Imakefile])
795 diff -Naur groff-1.18.1.4.orig/contrib/eqn2graph/eqn2graph.sh groff-1.18.1.4/contrib/eqn2graph/eqn2graph.sh
796 --- groff-1.18.1.4.orig/contrib/eqn2graph/eqn2graph.sh 2002-07-17 04:55:46.000000000 +0000
797 +++ groff-1.18.1.4/contrib/eqn2graph/eqn2graph.sh 2006-10-18 18:54:44.000000000 +0000
800 # Thus, we pass -U to groff(1), and everything else to convert(1).
802 -# $Id: eqn2graph.sh,v 1.2 2002/07/17 04:55:46 wlemb Exp $
803 +# $Id: eqn2graph.sh,v 1.3 2003/10/28 07:46:23 wlemb Exp $
811 +# create temporary directory
813 +for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do
814 + test -z "$d" && continue
816 + tmp=`(umask 077 && mktemp -d -q "$d/eqn2graph-XXXXXX") 2> /dev/null` \
817 + && test -n "$tmp" && test -d "$tmp" \
820 + tmp=$d/eqn2graph$$-$RANDOM
821 + (umask 077 && mkdir $tmp) 2> /dev/null && break
823 +if test -z "$tmp"; then
824 + echo "$0: cannot create temporary directory" >&2
825 + { (exit 1); exit 1; }
828 +trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15
832 # 2. Process through eqn(1) to emit troff markup.
833 # 3. Process through groff(1) to emit Postscript.
834 # 4. Use convert(1) to crop the Postscript and turn it into a bitmap.
835 -tmp=/usr/tmp/eqn2graph-$$
836 -trap "rm ${tmp}.*" 0 2 15
838 -(echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \
839 - groff -e $groff_opts -Tps >${tmp}.ps \
840 - && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
841 - && cat ${tmp}.${format}
842 +(echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"$equation"'$') | \
843 + groff -e $groff_opts -Tps -P-pletter > $tmp/eqn2graph.ps \
844 + && convert -crop 0x0 $convert_opts $tmp/eqn2graph.ps $tmp/eqn2graph.$format \
845 + && cat $tmp/eqn2graph.$format
848 diff -Naur groff-1.18.1.4.orig/contrib/mom/groff_mom.man groff-1.18.1.4/contrib/mom/groff_mom.man
849 --- groff-1.18.1.4.orig/contrib/mom/groff_mom.man 2002-09-04 21:44:16.000000000 +0000
850 +++ groff-1.18.1.4/contrib/mom/groff_mom.man 2006-10-18 18:54:44.000000000 +0000
852 A copy of the Free Documentation License is included as a file called
853 FDL in the main directory of the groff source package.
856 +A copy of the GNU Free Documentation License is also available in this
857 +Debian package as /usr/share/doc/groff/copyright.
862 diff -Naur groff-1.18.1.4.orig/contrib/pic2graph/pic2graph.sh groff-1.18.1.4/contrib/pic2graph/pic2graph.sh
863 --- groff-1.18.1.4.orig/contrib/pic2graph/pic2graph.sh 2002-07-17 04:55:46.000000000 +0000
864 +++ groff-1.18.1.4/contrib/pic2graph/pic2graph.sh 2006-10-18 18:54:44.000000000 +0000
866 # We don't have complete option coverage on eqn because this is primarily
867 # intended as a pic translator; we can live with eqn defaults.
869 -# $Id: pic2graph.sh,v 1.2 2002/07/17 04:55:46 wlemb Exp $
870 +# $Id: pic2graph.sh,v 1.5 2003/10/31 19:32:36 wlemb Exp $
879 + groffpic_opts="-U";;
884 eqndelim="delim $eqndelim"
887 +# create temporary directory
889 +for d in "$GROFF_TMPDIR" "$TMPDIR" "$TMP" "$TEMP" /tmp; do
890 + test -z "$d" && continue
892 + tmp=`(umask 077 && mktemp -d -q "$d/pic2graph-XXXXXX") 2> /dev/null` \
893 + && test -n "$tmp" && test -d "$tmp" \
896 + tmp=$d/pic2graph$$-$RANDOM
897 + (umask 077 && mkdir $tmp) 2> /dev/null \
900 +if test -z "$tmp"; then
901 + echo "$0: cannot create temporary directory" >&2
902 + { (exit 1); exit 1; }
905 +trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 2 15
908 # 1. Wrap the input in dummy .PS/PE macros (and add possibly null .EQ/.EN)
909 # 2. Process through eqn and pic to emit troff markup.
910 # 3. Process through groff to emit Postscript.
911 # 4. Use convert(1) to crop the PostScript and turn it into a bitmap.
912 -tmp=/usr/tmp/pic2graph-$$
913 -trap "rm ${tmp}.*" 0 2 15
914 (echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \
915 - groff -e -p $groffpic_opts -Tps >${tmp}.ps \
916 - && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
917 - && cat ${tmp}.${format}
918 + groff -e -p $groffpic_opts -Tps -P-pletter > $tmp/pic2graph.ps \
919 + && convert -crop 0x0 $convert_opts $tmp/pic2graph.ps $tmp/pic2graph.$format \
920 + && cat $tmp/pic2graph.$format
923 diff -Naur groff-1.18.1.4.orig/font/devX100/DESC groff-1.18.1.4/font/devX100/DESC
924 --- groff-1.18.1.4.orig/font/devX100/DESC 2000-02-06 09:35:04.000000000 +0000
925 +++ groff-1.18.1.4/font/devX100/DESC 2006-10-18 18:54:44.000000000 +0000
929 +fonts 8 0 0 0 0 0 S M G
930 +fontset B G 2E00..9FFF
931 +fontset CB G 2E00..9FFF
932 +fontset HB G 2E00..9FFF
933 +fontset NB G 2E00..9FFF
934 +fontset TB G 2E00..9FFF
935 +fontset - M 2E00..9FFF
936 +fontset B G FF00..FFEF
937 +fontset CB G FF00..FFEF
938 +fontset HB G FF00..FFEF
939 +fontset NB G FF00..FFEF
940 +fontset TB G FF00..FFEF
941 +fontset - M FF00..FFEF
942 sizes 8 10 12 14 18 24 0
945 diff -Naur groff-1.18.1.4.orig/font/devX100/M.proto groff-1.18.1.4/font/devX100/M.proto
946 --- groff-1.18.1.4.orig/font/devX100/M.proto 1970-01-01 00:00:00.000000000 +0000
947 +++ groff-1.18.1.4/font/devX100/M.proto 2006-10-18 18:54:44.000000000 +0000
954 diff -Naur groff-1.18.1.4.orig/font/devX100/Makefile.sub groff-1.18.1.4/font/devX100/Makefile.sub
955 --- groff-1.18.1.4.orig/font/devX100/Makefile.sub 2000-02-06 09:35:06.000000000 +0000
956 +++ groff-1.18.1.4/font/devX100/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
959 -DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
960 +DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S M G
966 + @cat $(srcdir)/M.proto > M
971 + @sed -e 's/name M/name G/' M > G
972 diff -Naur groff-1.18.1.4.orig/font/devX100-12/DESC groff-1.18.1.4/font/devX100-12/DESC
973 --- groff-1.18.1.4.orig/font/devX100-12/DESC 2000-02-06 09:35:07.000000000 +0000
974 +++ groff-1.18.1.4/font/devX100-12/DESC 2006-10-18 18:54:44.000000000 +0000
978 +fonts 8 0 0 0 0 0 S M G
979 +fontset B G 2E00..9FFF
980 +fontset CB G 2E00..9FFF
981 +fontset HB G 2E00..9FFF
982 +fontset NB G 2E00..9FFF
983 +fontset TB G 2E00..9FFF
984 +fontset - M 2E00..9FFF
985 +fontset B G FF00..FFEF
986 +fontset CB G FF00..FFEF
987 +fontset HB G FF00..FFEF
988 +fontset NB G FF00..FFEF
989 +fontset TB G FF00..FFEF
990 +fontset - M FF00..FFEF
991 sizes 8 10 12 14 18 24 0
994 diff -Naur groff-1.18.1.4.orig/font/devX100-12/M.proto groff-1.18.1.4/font/devX100-12/M.proto
995 --- groff-1.18.1.4.orig/font/devX100-12/M.proto 1970-01-01 00:00:00.000000000 +0000
996 +++ groff-1.18.1.4/font/devX100-12/M.proto 2006-10-18 18:54:44.000000000 +0000
1003 diff -Naur groff-1.18.1.4.orig/font/devX100-12/Makefile.sub groff-1.18.1.4/font/devX100-12/Makefile.sub
1004 --- groff-1.18.1.4.orig/font/devX100-12/Makefile.sub 2000-02-06 09:35:07.000000000 +0000
1005 +++ groff-1.18.1.4/font/devX100-12/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
1008 -DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
1009 +DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S M G
1015 + @cat $(srcdir)/M.proto > M
1020 + @sed -e 's/name M/name G/' M > G
1022 diff -Naur groff-1.18.1.4.orig/font/devX75/DESC groff-1.18.1.4/font/devX75/DESC
1023 --- groff-1.18.1.4.orig/font/devX75/DESC 2000-02-06 09:35:09.000000000 +0000
1024 +++ groff-1.18.1.4/font/devX75/DESC 2006-10-18 18:54:44.000000000 +0000
1027 -fonts 6 0 0 0 0 0 S
1028 +fonts 8 0 0 0 0 0 S M G
1029 +fontset B G 2E00..9FFF
1030 +fontset CB G 2E00..9FFF
1031 +fontset HB G 2E00..9FFF
1032 +fontset NB G 2E00..9FFF
1033 +fontset TB G 2E00..9FFF
1034 +fontset - M 2E00..9FFF
1035 +fontset B G FF00..FFEF
1036 +fontset CB G FF00..FFEF
1037 +fontset HB G FF00..FFEF
1038 +fontset NB G FF00..FFEF
1039 +fontset TB G FF00..FFEF
1040 +fontset - M FF00..FFEF
1041 sizes 8 10 12 14 18 24 0
1044 diff -Naur groff-1.18.1.4.orig/font/devX75/M.proto groff-1.18.1.4/font/devX75/M.proto
1045 --- groff-1.18.1.4.orig/font/devX75/M.proto 1970-01-01 00:00:00.000000000 +0000
1046 +++ groff-1.18.1.4/font/devX75/M.proto 2006-10-18 18:54:44.000000000 +0000
1054 diff -Naur groff-1.18.1.4.orig/font/devX75/Makefile.sub groff-1.18.1.4/font/devX75/Makefile.sub
1055 --- groff-1.18.1.4.orig/font/devX75/Makefile.sub 2000-02-06 09:35:10.000000000 +0000
1056 +++ groff-1.18.1.4/font/devX75/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
1059 -DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
1060 +DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S M G
1066 + @cat $(srcdir)/M.proto > M
1071 + @sed -e 's/name M/name G/' M > G
1072 diff -Naur groff-1.18.1.4.orig/font/devX75-12/DESC groff-1.18.1.4/font/devX75-12/DESC
1073 --- groff-1.18.1.4.orig/font/devX75-12/DESC 2000-02-06 09:35:11.000000000 +0000
1074 +++ groff-1.18.1.4/font/devX75-12/DESC 2006-10-18 18:54:44.000000000 +0000
1077 -fonts 6 0 0 0 0 0 S
1078 +fonts 8 0 0 0 0 0 S M G
1079 +fontset B G 2E00..9FFF
1080 +fontset CB G 2E00..9FFF
1081 +fontset HB G 2E00..9FFF
1082 +fontset NB G 2E00..9FFF
1083 +fontset TB G 2E00..9FFF
1084 +fontset - M 2E00..9FFF
1085 +fontset B G FF00..FFEF
1086 +fontset CB G FF00..FFEF
1087 +fontset HB G FF00..FFEF
1088 +fontset NB G FF00..FFEF
1089 +fontset TB G FF00..FFEF
1090 +fontset - M FF00..FFEF
1091 sizes 8 10 12 14 18 24 0
1094 diff -Naur groff-1.18.1.4.orig/font/devX75-12/M.proto groff-1.18.1.4/font/devX75-12/M.proto
1095 --- groff-1.18.1.4.orig/font/devX75-12/M.proto 1970-01-01 00:00:00.000000000 +0000
1096 +++ groff-1.18.1.4/font/devX75-12/M.proto 2006-10-18 18:54:44.000000000 +0000
1103 diff -Naur groff-1.18.1.4.orig/font/devX75-12/Makefile.sub groff-1.18.1.4/font/devX75-12/Makefile.sub
1104 --- groff-1.18.1.4.orig/font/devX75-12/Makefile.sub 2000-02-06 09:35:12.000000000 +0000
1105 +++ groff-1.18.1.4/font/devX75-12/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
1108 -DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
1109 +DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S M G
1115 + @cat $(srcdir)/M.proto > M
1120 + @sed -e 's/name M/name G/' M > G
1121 diff -Naur groff-1.18.1.4.orig/font/devascii/Makefile.sub groff-1.18.1.4/font/devascii/Makefile.sub
1122 --- groff-1.18.1.4.orig/font/devascii/Makefile.sub 2000-02-06 09:35:12.000000000 +0000
1123 +++ groff-1.18.1.4/font/devascii/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
1126 @(charwidth=`expr $(RES) / $(CPI)` ; \
1127 sed -e "s/^name [A-Z]*$$/name $@/" \
1128 - -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
1129 - -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
1130 + -e "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \
1131 + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
1132 -e "s/^internalname .*$$/internalname $@/" \
1133 -e "/^internalname/s/BI/3/" \
1134 -e "/^internalname/s/B/2/" \
1135 diff -Naur groff-1.18.1.4.orig/font/devascii8/DESC.proto groff-1.18.1.4/font/devascii8/DESC.proto
1136 --- groff-1.18.1.4.orig/font/devascii8/DESC.proto 1970-01-01 00:00:00.000000000 +0000
1137 +++ groff-1.18.1.4/font/devascii8/DESC.proto 2006-10-18 18:54:44.000000000 +0000
1147 diff -Naur groff-1.18.1.4.orig/font/devascii8/Makefile.sub groff-1.18.1.4/font/devascii8/Makefile.sub
1148 --- groff-1.18.1.4.orig/font/devascii8/Makefile.sub 1970-01-01 00:00:00.000000000 +0000
1149 +++ groff-1.18.1.4/font/devascii8/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
1153 +DEVFILES=$(FONTS) DESC
1154 +CLEANADD=$(FONTS) DESC
1163 + @(charwidth=`expr $(RES) / $(CPI)` ; \
1164 + sed -e "s/^name [A-Z]*$$/name $@/" \
1165 + -e "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \
1166 + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
1167 + -e "s/^internalname .*$$/internalname $@/" \
1168 + -e "/^internalname/s/BI/3/" \
1169 + -e "/^internalname/s/B/2/" \
1170 + -e "/^internalname/s/I/1/" \
1171 + -e "/^internalname .*[^ 0-9]/d" \
1172 + $(srcdir)/R.proto >$@)
1177 + @sed -e "s/^res .*$$/res $(RES)/" \
1178 + -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
1179 + -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
1180 + -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
1181 + $(srcdir)/DESC.proto >$@
1182 diff -Naur groff-1.18.1.4.orig/font/devascii8/R.proto groff-1.18.1.4/font/devascii8/R.proto
1183 --- groff-1.18.1.4.orig/font/devascii8/R.proto 1970-01-01 00:00:00.000000000 +0000
1184 +++ groff-1.18.1.4/font/devascii8/R.proto 2006-10-18 18:54:44.000000000 +0000
1448 diff -Naur groff-1.18.1.4.orig/font/devdvi/DESC.in groff-1.18.1.4/font/devdvi/DESC.in
1449 --- groff-1.18.1.4.orig/font/devdvi/DESC.in 2002-03-16 07:45:07.000000000 +0000
1450 +++ groff-1.18.1.4/font/devdvi/DESC.in 2006-10-18 18:54:44.000000000 +0000
1455 -fonts 13 0 0 0 0 0 0 0 0 0 MI S EX CW
1456 +fonts 15 0 0 0 0 0 0 0 0 0 MI S EX CW M G
1457 +fontset B G 100..FFFF
1458 +fontset HB G 100..FFFF
1459 +fontset SB G 100..FFFF
1460 +fontset - M 100..FFFF
1463 diff -Naur groff-1.18.1.4.orig/font/devdvi/FixMetric.sed groff-1.18.1.4/font/devdvi/FixMetric.sed
1464 --- groff-1.18.1.4.orig/font/devdvi/FixMetric.sed 1970-01-01 00:00:00.000000000 +0000
1465 +++ groff-1.18.1.4/font/devdvi/FixMetric.sed 2006-10-18 18:54:44.000000000 +0000
1467 +s/1006514,.*0x212b$/370845,815360,145600 1 0x212b/
1468 +s/1006514,.*0x212c$/370845,815360,145600 1 0x212c/
1469 +s/1006514,.*0x2126$/370845,815360,145600 1 0x2126/
1470 +s/1006514,.*0x2127$/370845,815360,145600 1 0x2127/
1471 +s/1006514,.*0x2128$/370845,815360,145600 1 0x2128/
1472 +s/1006514,.*0x212a$/370845,815360,145600 1 0x212a/
1473 +s/1006514,.*0x212d$/370845,815360,145600 1 0x212d/
1474 +s/1006514,.*0x212e$/370845,815360,145600 1 0x212e/
1475 +s/1006514,.*0x213e$/370845,815360,145600 1 0x213e/
1476 +s/1006514,.*0x2142$/370845,815360,145600 1 0x2142/
1477 +s/1006514,.*0x2143$/370845,815360,145600 1 0x2143/
1478 +s/1006514,.*0x2146$/370845,815360,145600 1 0x2146/
1479 +s/1006514,.*0x2147$/370845,815360,145600 1 0x2147/
1480 +s/1006514,.*0x2124$/370845,815360,145600 1 0x2124/
1481 +s/1006514,.*0x2125$/370845,815360,145600 1 0x2125/
1482 +s/1006514,.*0x214b$/528496,815360,145600 1 0x214b/
1483 +s/1006514,.*0x214d$/528496,815360,145600 1 0x214d/
1484 +s/1006514,.*0x214f$/528496,815360,145600 1 0x214f/
1485 +s/1006514,.*0x2151$/528496,815360,145600 1 0x2151/
1486 +s/1006514,.*0x2153$/528496,815360,145600 1 0x2153/
1487 +s/1006514,.*0x2155$/528496,815360,145600 1 0x2155/
1488 +s/1006514,.*0x2157$/528496,815360,145600 1 0x2157/
1489 +s/1006514,.*0x2159$/528496,815360,145600 1 0x2159/
1490 +s/1006514,.*0x215b$/528496,815360,145600 1 0x215b/
1491 +s/1006514,.*0x2129$/528496,815360,145600 1 0x2129/
1492 +s/1006514,.*0x212f$/528496,815360,145600 1 0x212f/
1493 +s/1006514,.*0x2130$/528496,815360,145600 1 0x2130/
1494 +s/1006514,.*0x2133$/528496,815360,145600 1 0x2133/
1495 +s/1006514,.*0x2135$/528496,815360,145600 1 0x2135/
1496 +s/1006514,.*0x2148$/528496,815360,145600 1 0x2148/
1497 +s/1006514,.*0x2149$/528496,815360,145600 1 0x2149/
1498 +s/1006514,.*0x216b$/528496,815360,145600 1 0x216b/
1499 +s/1006514,.*0x216c$/528496,815360,145600 1 0x216c/
1500 +s/1006514,.*0x216d$/528496,815360,145600 1 0x216d/
1501 +s/1006514,.*0x2178$/528496,815360,145600 1 0x2178/
1502 +s/1006514,.*0x214a$/528496,815360,145600 1 0x214a/
1503 +s/1006514,.*0x214c$/528496,815360,145600 1 0x214c/
1504 +s/1006514,.*0x214e$/528496,815360,145600 1 0x214e/
1505 +s/1006514,.*0x2150$/528496,815360,145600 1 0x2150/
1506 +s/1006514,.*0x2152$/528496,815360,145600 1 0x2152/
1507 +s/1006514,.*0x2154$/528496,815360,145600 1 0x2154/
1508 +s/1006514,.*0x2156$/528496,815360,145600 1 0x2156/
1509 +s/1006514,.*0x2158$/528496,815360,145600 1 0x2158/
1510 +s/1006514,.*0x215a$/528496,815360,145600 1 0x215a/
1511 +s/1006514,.*0x2122$/528496,815360,145600 1 0x2122/
1512 +s/1006514,.*0x2123$/528496,815360,145600 1 0x2123/
1513 +s/1006514,.*0x2136$/783741,815360,145600 1 0x2136/
1514 +s/1006514,.*0x2137$/783741,815360,145600 1 0x2137/
1515 +s/1006514,.*0x2139$/783741,815360,145600 1 0x2139/
1516 +s/1006514,.*0x2168$/783741,815360,145600 1 0x2168/
1517 +s/1006514,.*0x2169$/783741,815360,145600 1 0x2169/
1518 +s/1006514,.*0x216a$/783741,815360,145600 1 0x216a/
1519 +s/1006514,.*0x2170$/783741,815360,145600 1 0x2170/
1520 +s/1006514,.*0x2171$/783741,815360,145600 1 0x2171/
1521 +s/1006514,.*0x2172$/783741,815360,145600 1 0x2172/
1522 +s/1006514,.*0x2421$/783741,815360,145600 1 0x2421/
1523 +s/1006514,.*0x2423$/783741,815360,145600 1 0x2423/
1524 +s/1006514,.*0x2425$/783741,815360,145600 1 0x2425/
1525 +s/1006514,.*0x2427$/783741,815360,145600 1 0x2427/
1526 +s/1006514,.*0x2429$/783741,815360,145600 1 0x2429/
1527 +s/1006514,.*0x2443$/783741,815360,145600 1 0x2443/
1528 +s/1006514,.*0x2463$/783741,815360,145600 1 0x2463/
1529 +s/1006514,.*0x2465$/783741,815360,145600 1 0x2465/
1530 +s/1006514,.*0x2467$/783741,815360,145600 1 0x2467/
1531 +s/1006514,.*0x246e$/783741,815360,145600 1 0x246e/
1532 +s/1006514,.*0x2521$/783741,815360,145600 1 0x2521/
1533 +s/1006514,.*0x2523$/783741,815360,145600 1 0x2523/
1534 +s/1006514,.*0x2525$/783741,815360,145600 1 0x2525/
1535 +s/1006514,.*0x2527$/783741,815360,145600 1 0x2527/
1536 +s/1006514,.*0x2529$/783741,815360,145600 1 0x2529/
1537 +s/1006514,.*0x2543$/783741,815360,145600 1 0x2543/
1538 +s/1006514,.*0x2563$/783741,815360,145600 1 0x2563/
1539 +s/1006514,.*0x2565$/783741,815360,145600 1 0x2565/
1540 +s/1006514,.*0x2567$/783741,815360,145600 1 0x2567/
1541 +s/1006514,.*0x256e$/783741,815360,145600 1 0x256e/
1542 +s/1006514,.*0x2575$/783741,815360,145600 1 0x2575/
1543 +s/1006514,.*0x2576$/783741,815360,145600 1 0x2576/
1544 diff -Naur groff-1.18.1.4.orig/font/devdvi/M.proto-ASCII groff-1.18.1.4/font/devdvi/M.proto-ASCII
1545 --- groff-1.18.1.4.orig/font/devdvi/M.proto-ASCII 1970-01-01 00:00:00.000000000 +0000
1546 +++ groff-1.18.1.4/font/devdvi/M.proto-ASCII 2006-10-18 18:54:44.000000000 +0000
1550 +checksum -375402250
1551 +designsize 10485760
1552 diff -Naur groff-1.18.1.4.orig/font/devdvi/M.proto-NTT groff-1.18.1.4/font/devdvi/M.proto-NTT
1553 --- groff-1.18.1.4.orig/font/devdvi/M.proto-NTT 1970-01-01 00:00:00.000000000 +0000
1554 +++ groff-1.18.1.4/font/devdvi/M.proto-NTT 2006-10-18 18:54:44.000000000 +0000
1559 +designsize 10485760
8438 diff -Naur groff-1.18.1.4.orig/font/devdvi/Makefile.sub groff-1.18.1.4/font/devdvi/Makefile.sub
8439 --- groff-1.18.1.4.orig/font/devdvi/Makefile.sub 2002-02-27 02:23:12.000000000 +0000
8440 +++ groff-1.18.1.4/font/devdvi/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
8442 TR TI TB TBI CW CWI HR HI HB HBI \
8443 TREC TIEC TBEC TBIEC CWEC CWIEC HREC HIEC HBEC HBIEC \
8444 TRTC TITC TBTC TBITC CWTC CWITC HRTC HITC HBTC HBITC \
8446 + MI S EX SA SB M G \
8447 generate/CompileFonts generate/Makefile \
8448 generate/msam.map generate/msbm.map \
8449 generate/texb.map generate/texex.map generate/texi.map generate/texmi.map \
8450 generate/texr.map generate/texsy.map generate/textt.map \
8451 generate/ec.map generate/tc.map
8457 cat $(srcdir)/DESC.in >DESC
8458 test -z '$(DVIPRINT)' || echo print '$(DVIPRINT)' >>DESC
8460 +M: M.proto-$(DVIFORMAT)
8463 + cp M.proto-$(DVIFORMAT) M
8464 +# @if [ x$(DVIFORMAT) = xNTT ]; then \
8465 +# sed -e 's/ F / 959887,808326,151561 1 /' \
8466 +# -e 's/:0$$/:dmjsy10/' \
8467 +# -e 's/:1$$/:dmjroma10/' \
8468 +# -e 's/:2$$/:dmjhira10/' \
8469 +# -e 's/:3$$/:dmjkata10/' \
8470 +# -e 's/:4$$/:dmjgreek10/' \
8471 +# -e 's/:5$$/:dmjrussian10/' \
8472 +# -e 's/:6$$/:dmjkeisen10/' \
8473 +# -e 's/:a$$/:dmjka10/' \
8474 +# -e 's/:b$$/:dmjkb10/' \
8475 +# -e 's/:c$$/:dmjkc10/' \
8476 +# -e 's/:d$$/:dmjkd10/' \
8477 +# -e 's/:e$$/:dmjke10/' \
8478 +# -e 's/:f$$/:dmjkf10/' \
8479 +# -e 's/:g$$/:dmjkg10/' \
8480 +# -e 's/:h$$/:dmjkh10/' \
8481 +# -e 's/:i$$/:dmjki10/' \
8482 +# -e 's/:j$$/:dmjkj10/' \
8483 +# -e 's/:k$$/:dmjkk10/' \
8484 +# -e 's/:l$$/:dmjkl10/' \
8485 +# -e 's/:m$$/:dmjkm10/' \
8486 +# -e 's/:n$$/:dmjkn10/' \
8487 +# -e 's/:o$$/:dmjko10/' \
8488 +# -e 's/:p$$/:dmjkp10/' \
8489 +# -e 's/:q$$/:dmjkq10/' \
8490 +# -e 's/:r$$/:dmjkr10/' \
8491 +# -e 's/:s$$/:dmjks10/' \
8492 +# -e 's/:t$$/:dmjkt10/' \
8493 +# -e 's/:u$$/:dmjku10/' \
8494 +# -e 's/:v$$/:dmjkv10/' \
8495 +# -e 's/:w$$/:dmjkw10/' \
8496 +# -e 's/:x$$/:dmjkx10/' \
8497 +# -e 's/:y$$/:dmjky10/' \
8498 +# -e 's/:z$$/:dmjkz10/' \
8499 +# < M.proto-NTT > M ;\
8501 +# ../devnippon/createM -jis "1006514,815360,145600" 1 < M.proto-ASCII | \
8502 +# sed -f FixMetric.sed > M ;\
8508 + @sed -e 's/name M/name G/' \
8510 + -e 's/internalname min10/internalname goth10/' \
8512 diff -Naur groff-1.18.1.4.orig/font/devhtml/DESC.proto groff-1.18.1.4/font/devhtml/DESC.proto
8513 --- groff-1.18.1.4.orig/font/devhtml/DESC.proto 2002-08-07 12:52:23.000000000 +0000
8514 +++ groff-1.18.1.4/font/devhtml/DESC.proto 2006-10-18 18:54:44.000000000 +0000
8518 sizes 6 8 10 12 14 16 18 0
8519 -fonts 9 R I B BI CR CI CB CBI S
8520 +fonts 11 R I B BI CR CI CB CBI S M G
8521 +fontset B G 2E00..9FFF
8522 +fontset - M 2E00..9FFF
8523 +fontset B G FF00..FFEF
8524 +fontset - M FF00..FFEF
8527 postpro post-grohtml
8528 diff -Naur groff-1.18.1.4.orig/font/devhtml/M.proto groff-1.18.1.4/font/devhtml/M.proto
8529 --- groff-1.18.1.4.orig/font/devhtml/M.proto 1970-01-01 00:00:00.000000000 +0000
8530 +++ groff-1.18.1.4/font/devhtml/M.proto 2006-10-18 18:54:44.000000000 +0000
8535 +u2E00..u9FFF 16,14,2 0
8536 +uFF00..uFFEF 16,14,2 0
8537 diff -Naur groff-1.18.1.4.orig/font/devhtml/Makefile.sub groff-1.18.1.4/font/devhtml/Makefile.sub
8538 --- groff-1.18.1.4.orig/font/devhtml/Makefile.sub 2002-08-07 12:52:23.000000000 +0000
8539 +++ groff-1.18.1.4/font/devhtml/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
8542 PROTOFONTS=R I B BI CR CI CB CBI
8543 FONTS=$(PROTOFONTS) S
8544 -DEVFILES=$(FONTS) DESC
8545 -CLEANADD=$(FONTS) DESC
8547 +ALLFONTS=$(FONTS) $(WFONTS)
8548 +DEVFILES=$(ALLFONTS) DESC
8549 +CLEANADD=$(ALLFONTS) DESC
8555 @(charwidth=`expr $(RES) / $(CPI)` ; \
8556 sed -e "s/^name [A-Z]*$$/name $@/" \
8557 - -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
8558 - -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
8559 + -e "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \
8560 + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
8561 -e "s/^internalname .*$$/internalname $@/" \
8562 -e "/^internalname/s/CR/4/" \
8563 -e "/^internalname/s/BI/3/" \
8565 @sed -e "s/^res .*$$/res $(RES)/" \
8566 -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
8567 -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
8568 - -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
8569 + -e "s/^fonts .*$$/fonts `set $(ALLFONTS); echo $$#` $(ALLFONTS)/" \
8570 $(srcdir)/DESC.proto >$@
8575 + @(wcharwidth=`expr $(RES) / $(CPI) \* 2`; \
8576 + spacewidth=`expr $(RES) / $(CPI)`; \
8577 + sed -e "s/^u\\([0-9A-F]*\\)..u\\([0-9A-F]*\\) [0-9][0-9]*/u\\1..u\\2 $$wcharwidth/" \
8578 + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$spacewidth/" \
8579 + $(srcdir)/M.proto > $@)
8584 + @sed -e 's/name M/name G/' M > G
8585 diff -Naur groff-1.18.1.4.orig/font/devlbp/Makefile.sub groff-1.18.1.4/font/devlbp/Makefile.sub
8586 --- groff-1.18.1.4.orig/font/devlbp/Makefile.sub 2002-03-08 07:33:49.000000000 +0000
8587 +++ groff-1.18.1.4/font/devlbp/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
8590 cat $(srcdir)/DESC.in >>DESC
8591 if test "$(PAGE)" = A4; then \
8592 - echo "papersize a4" >>DESC; \
8593 + echo "papersize /etc/papersize a4" >>DESC; \
8595 - echo "papersize letter" >>DESC; \
8596 + echo "papersize /etc/papersize letter" >>DESC; \
8598 test -z '$(LBPPRINT)' || echo print '$(LBPPRINT)' >>DESC
8600 diff -Naur groff-1.18.1.4.orig/font/devlj4/Makefile.sub groff-1.18.1.4/font/devlj4/Makefile.sub
8601 --- groff-1.18.1.4.orig/font/devlj4/Makefile.sub 2000-02-06 09:35:37.000000000 +0000
8602 +++ groff-1.18.1.4/font/devlj4/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
8604 echo "unitwidth `expr 7620000 / $(LJ4RES)`" >>DESC
8605 cat $(srcdir)/DESC.in >>DESC
8606 if test "$(PAGE)" = A4; then \
8607 - echo "papersize a4" >>DESC; \
8608 + echo "papersize /etc/papersize a4" >>DESC; \
8610 - echo "papersize letter" >>DESC; \
8611 + echo "papersize /etc/papersize letter" >>DESC; \
8613 test -z '$(LJ4PRINT)' || echo print '$(LJ4PRINT)' >>DESC
8615 diff -Naur groff-1.18.1.4.orig/font/devnippon/DESC.proto groff-1.18.1.4/font/devnippon/DESC.proto
8616 --- groff-1.18.1.4.orig/font/devnippon/DESC.proto 1970-01-01 00:00:00.000000000 +0000
8617 +++ groff-1.18.1.4/font/devnippon/DESC.proto 2006-10-18 18:54:44.000000000 +0000
8624 +fonts 6 R I B BI M G
8625 +fontset B G 2E00..9FFF
8626 +fontset - M 2E00..9FFF
8627 +fontset B G FF00..FFEF
8628 +fontset - M FF00..FFEF
8631 diff -Naur groff-1.18.1.4.orig/font/devnippon/M.proto groff-1.18.1.4/font/devnippon/M.proto
8632 --- groff-1.18.1.4.orig/font/devnippon/M.proto 1970-01-01 00:00:00.000000000 +0000
8633 +++ groff-1.18.1.4/font/devnippon/M.proto 2006-10-18 18:54:44.000000000 +0000
8641 diff -Naur groff-1.18.1.4.orig/font/devnippon/Makefile.sub groff-1.18.1.4/font/devnippon/Makefile.sub
8642 --- groff-1.18.1.4.orig/font/devnippon/Makefile.sub 1970-01-01 00:00:00.000000000 +0000
8643 +++ groff-1.18.1.4/font/devnippon/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
8648 +ALLFONTS=$(FONTS) $(WFONTS)
8649 +DEVFILES=$(ALLFONTS) DESC
8650 +CLEANADD=$(ALLFONTS) DESC
8659 + @(charwidth=`expr $(RES) / $(CPI)` ; \
8660 + sed -e "s/^name [A-Z]*$$/name $@/" \
8661 + -e "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \
8662 + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
8663 + -e "s/^internalname .*$$/internalname $@/" \
8664 + -e "/^internalname/s/BI/3/" \
8665 + -e "/^internalname/s/B/2/" \
8666 + -e "/^internalname/s/I/1/" \
8667 + -e "/^internalname .*[^ 0-9]/d" \
8668 + $(srcdir)/R.proto >$@)
8673 + @(wcharwidth=`expr $(RES) / $(CPI) \* 2` ; \
8674 + spacewidth=`expr $(RES) / $(CPI)` ; \
8675 + sed -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$spacewidth/" \
8676 + -e "s/^u\\([0-9A-F]*\\)..u\\([0-9A-F]*\\) [0-9][0-9]*/u\\1..u\\2 $$wcharwidth/" \
8677 + $(srcdir)/M.proto > $@)
8682 + @sed -e 's/name M/name G/' \
8683 + -e 's/internalname 4/internalname 5/' M > G
8688 + @sed -e "s/^res .*$$/res $(RES)/" \
8689 + -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
8690 + -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
8691 + -e "s/^fonts .*$$/fonts `set $(ALLFONTS); echo $$#` $(ALLFONTS)/" \
8692 + $(srcdir)/DESC.proto >$@
8693 diff -Naur groff-1.18.1.4.orig/font/devnippon/R.proto groff-1.18.1.4/font/devnippon/R.proto
8694 --- groff-1.18.1.4.orig/font/devnippon/R.proto 1970-01-01 00:00:00.000000000 +0000
8695 +++ groff-1.18.1.4/font/devnippon/R.proto 2006-10-18 18:54:44.000000000 +0000
8864 diff -Naur groff-1.18.1.4.orig/font/devps/DESC.in groff-1.18.1.4/font/devps/DESC.in
8865 --- groff-1.18.1.4.orig/font/devps/DESC.in 2000-02-06 09:35:57.000000000 +0000
8866 +++ groff-1.18.1.4/font/devps/DESC.in 2006-10-18 18:54:44.000000000 +0000
8875 sizes 1000-10000000 0
8878 -fonts 9 0 0 0 0 0 SS S ZD ZDR
8879 +fonts 11 0 0 0 0 0 SS S ZD ZDR M G
8880 +fontset B G 2E00..9FFF
8881 +fontset AB G 2E00..9FFF
8882 +fontset BMB G 2E00..9FFF
8883 +fontset CB G 2E00..9FFF
8884 +fontset HB G 2E00..9FFF
8885 +fontset HNB G 2E00..9FFF
8886 +fontset NB G 2E00..9FFF
8887 +fontset PB G 2E00..9FFF
8888 +fontset TB G 2E00..9FFF
8889 +fontset - M 2E00..9FFF
8890 +fontset B G FF00..FFEF
8891 +fontset AB G FF00..FFEF
8892 +fontset BMB G FF00..FFEF
8893 +fontset CB G FF00..FFEF
8894 +fontset HB G FF00..FFEF
8895 +fontset HNB G FF00..FFEF
8896 +fontset NB G FF00..FFEF
8897 +fontset PB G FF00..FFEF
8898 +fontset TB G FF00..FFEF
8899 +fontset - M FF00..FFEF
8902 diff -Naur groff-1.18.1.4.orig/font/devps/M.proto groff-1.18.1.4/font/devps/M.proto
8903 --- groff-1.18.1.4.orig/font/devps/M.proto 1970-01-01 00:00:00.000000000 +0000
8904 +++ groff-1.18.1.4/font/devps/M.proto 2006-10-18 18:54:44.000000000 +0000
8907 +internalname Ryumin-Light-EUC-H
8909 +encodingname EUC-JP
8911 +u2E00..u9FFF 1000 3
8912 +uFF00..uFF5F 1000 3
8914 +uFFA0..uFFEF 1000 3
8915 diff -Naur groff-1.18.1.4.orig/font/devps/Makefile.sub groff-1.18.1.4/font/devps/Makefile.sub
8916 --- groff-1.18.1.4.orig/font/devps/Makefile.sub 2002-06-04 13:03:19.000000000 +0000
8917 +++ groff-1.18.1.4/font/devps/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
8919 DISTFILES=text.enc download \
8920 S ZD ZDR SS AB ABI AI AR BMB BMBI BMI BMR \
8921 CB CBI CI CR HB HBI HI HR HNB HNBI HNI HNR \
8922 - NB NBI NI NR PB PBI PI PR TB TBI TI TR ZCMI
8923 + NB NBI NI NR PB PBI PI PR TB TBI TI TR ZCMI M G
8924 PSFILES=prologue symbolsl.pfa zapfdr.pfa
8925 DEVGENFILES=generate/Makefile generate/afmname generate/dingbats.map \
8926 generate/dingbats.rmap generate/lgreekmap generate/symbol.sed \
8927 generate/symbolchars generate/symbolsl.afm generate/textmap
8928 DEVFILES=DESC $(PSFILES) $(DISTFILES) $(DEVGENFILES)
8930 -CLEANADD=DESC $(PSFILES)
8931 +CLEANADD=DESC $(PSFILES) M G
8935 cat $(srcdir)/DESC.in >DESC
8936 echo broken $(BROKEN_SPOOLER_FLAGS) >>DESC
8937 if test "$(PAGE)" = A4; then \
8938 - echo "papersize a4" >>DESC; \
8939 + echo "papersize /etc/papersize a4" >>DESC; \
8941 - echo "papersize letter" >>DESC; \
8942 + echo "papersize /etc/papersize letter" >>DESC; \
8944 test -z '$(PSPRINT)' || echo print '$(PSPRINT)' >>DESC
8949 sed -f $(srcdir)/psstrip.sed $? >$@
8959 + @sed -e 's/name M/name G/' \
8960 + -e 's/internalname Ryumin-Light-EUC-H/internalname GothicBBB-Medium-EUC-H/' M > G
8961 diff -Naur groff-1.18.1.4.orig/font/devutf8/DESC.proto groff-1.18.1.4/font/devutf8/DESC.proto
8962 --- groff-1.18.1.4.orig/font/devutf8/DESC.proto 2000-02-06 09:36:22.000000000 +0000
8963 +++ groff-1.18.1.4/font/devutf8/DESC.proto 2006-10-18 18:54:44.000000000 +0000
8969 +fonts 6 R I B BI M G
8970 +fontset B G 2E00..9FFF
8971 +fontset B G FF00..FFEF
8972 +fontset - M 2E00..9FFF
8973 +fontset - M FF00..FFEF
8976 diff -Naur groff-1.18.1.4.orig/font/devutf8/M.proto groff-1.18.1.4/font/devutf8/M.proto
8977 --- groff-1.18.1.4.orig/font/devutf8/M.proto 1970-01-01 00:00:00.000000000 +0000
8978 +++ groff-1.18.1.4/font/devutf8/M.proto 2006-10-18 18:54:44.000000000 +0000
8986 diff -Naur groff-1.18.1.4.orig/font/devutf8/Makefile.sub groff-1.18.1.4/font/devutf8/Makefile.sub
8987 --- groff-1.18.1.4.orig/font/devutf8/Makefile.sub 2000-02-06 09:36:22.000000000 +0000
8988 +++ groff-1.18.1.4/font/devutf8/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
8992 -DEVFILES=$(FONTS) DESC
8993 -CLEANADD=$(FONTS) DESC
8995 +DEVFILES=$(FONTS) $(WFONTS) DESC
8996 +CLEANADD=$(FONTS) $(WFONTS) DESC
9002 @(charwidth=`expr $(RES) / $(CPI)` ; \
9003 sed -e "s/^name [A-Z]*$$/name $@/" \
9004 - -e "s/^\\([^ ]*\\) [0-9]+ /\\1 $$charwidth /" \
9005 - -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
9006 + -e "s/^\\([^ ]*\\) [0-9][0-9]* /\\1 $$charwidth /" \
9007 + -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
9008 -e "s/^internalname .*$$/internalname $@/" \
9009 -e "/^internalname/s/BI/3/" \
9010 -e "/^internalname/s/B/2/" \
9012 -e "/^internalname .*[^ 0-9]/d" \
9013 $(srcdir)/R.proto >$@)
9018 + (wcharwidth=`expr $(RES) / $(CPI) \* 2` ; \
9019 + spacewidth=`expr $(RES) / $(CPI)` ; \
9020 + sed -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$spacewidth/" \
9021 + -e "s/^u\\([0-9A-F]*\\)..u\\([0-9A-F]*\\) [0-9][0-9]*/u\\1..u\\2 $$wcharwidth/" \
9022 + $(srcdir)/M.proto > $@)
9027 + @sed -e 's/name M/name G/' \
9028 + -e 's/internalname 4/internalname 5/' M > G
9033 @sed -e "s/^res .*$$/res $(RES)/" \
9034 -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
9035 -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
9036 - -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
9037 + -e "s/^fonts .*$$/fonts `set $(FONTS) $(WFONTS); echo $$#` $(FONTS) $(WFONTS)/" \
9038 $(srcdir)/DESC.proto >$@
9040 diff -Naur groff-1.18.1.4.orig/man/ditroff.man groff-1.18.1.4/man/ditroff.man
9041 --- groff-1.18.1.4.orig/man/ditroff.man 2002-02-19 16:28:30.000000000 +0000
9042 +++ groff-1.18.1.4/man/ditroff.man 2006-10-18 18:54:44.000000000 +0000
9044 A copy of the Free Documentation License is included as a file called
9045 FDL in the main directory of the groff source package.
9048 +A copy of the GNU Free Documentation License is also available in this
9049 +Debian package as /usr/share/doc/groff/copyright.
9052 .\" --------------------------------------------------------------------
9054 diff -Naur groff-1.18.1.4.orig/man/groff.man groff-1.18.1.4/man/groff.man
9055 --- groff-1.18.1.4.orig/man/groff.man 2002-06-29 20:46:03.000000000 +0000
9056 +++ groff-1.18.1.4/man/groff.man 2006-10-18 18:54:44.000000000 +0000
9058 A copy of the Free Documentation License is included as a file called
9059 FDL in the main directory of the groff source package.
9062 +A copy of the GNU Free Documentation License is also available in this
9063 +Debian package as /usr/share/doc/groff/copyright.
9066 .\" --------------------------------------------------------------------
9068 diff -Naur groff-1.18.1.4.orig/man/groff_char.man groff-1.18.1.4/man/groff_char.man
9069 --- groff-1.18.1.4.orig/man/groff_char.man 2002-07-20 03:54:14.000000000 +0000
9070 +++ groff-1.18.1.4/man/groff_char.man 2006-10-18 18:54:44.000000000 +0000
9072 A copy of the Free Documentation License is included as a file called
9073 FDL in the main directory of the groff source package.
9076 +A copy of the GNU Free Documentation License is also available in this
9077 +Debian package as /usr/share/doc/groff/copyright.
9080 .\" --------------------------------------------------------------------
9082 diff -Naur groff-1.18.1.4.orig/man/groff_diff.man groff-1.18.1.4/man/groff_diff.man
9083 --- groff-1.18.1.4.orig/man/groff_diff.man 2002-07-05 15:04:22.000000000 +0000
9084 +++ groff-1.18.1.4/man/groff_diff.man 2006-10-18 18:54:44.000000000 +0000
9086 A copy of the Free Documentation License is included as a file called
9087 FDL in the main directory of the groff source package.
9090 +A copy of the GNU Free Documentation License is also available in this
9091 +Debian package as /usr/share/doc/groff/copyright.
9094 .\" --------------------------------------------------------------------
9096 diff -Naur groff-1.18.1.4.orig/man/groff_out.man groff-1.18.1.4/man/groff_out.man
9097 --- groff-1.18.1.4.orig/man/groff_out.man 2002-09-12 10:00:17.000000000 +0000
9098 +++ groff-1.18.1.4/man/groff_out.man 2006-10-18 18:54:44.000000000 +0000
9100 A copy of the Free Documentation License is included as a file called
9101 FDL in the main directory of the groff source package.
9104 +A copy of the GNU Free Documentation License is also available in this
9105 +Debian package as /usr/share/doc/groff/copyright.
9108 .\" --------------------------------------------------------------------
9110 diff -Naur groff-1.18.1.4.orig/man/groff_tmac.man groff-1.18.1.4/man/groff_tmac.man
9111 --- groff-1.18.1.4.orig/man/groff_tmac.man 2002-08-21 07:37:10.000000000 +0000
9112 +++ groff-1.18.1.4/man/groff_tmac.man 2006-10-18 18:54:44.000000000 +0000
9114 A copy of the Free Documentation License is included as a file called
9115 FDL in the main directory of the groff source package.
9118 +A copy of the GNU Free Documentation License is also available in this
9119 +Debian package as /usr/share/doc/groff/copyright.
9122 .\" --------------------------------------------------------------------
9124 diff -Naur groff-1.18.1.4.orig/man/roff.man groff-1.18.1.4/man/roff.man
9125 --- groff-1.18.1.4.orig/man/roff.man 2002-04-23 04:28:59.000000000 +0000
9126 +++ groff-1.18.1.4/man/roff.man 2006-10-18 18:54:44.000000000 +0000
9128 A copy of the Free Documentation License is included as a file called
9129 FDL in the main directory of the groff source package.
9132 +A copy of the GNU Free Documentation License is also available in this
9133 +Debian package as /usr/share/doc/groff/copyright.
9136 .\" --------------------------------------------------------------------
9138 diff -Naur groff-1.18.1.4.orig/mdate.sh groff-1.18.1.4/mdate.sh
9139 --- groff-1.18.1.4.orig/mdate.sh 2001-03-09 15:26:30.000000000 +0000
9140 +++ groff-1.18.1.4/mdate.sh 2006-10-18 18:54:44.000000000 +0000
9143 # Print the modification date of $1 `nicely'.
9145 -# Don't want foreign dates.
9148 -LC_ALL=C; export LC_ALL
9152 -if ls -L /dev/null 1>/dev/null 2>&1; then ls -L -l $1; else ls -l $1; fi
9155 - full["Jan"] = "January"; number["Jan"] = 1;
9156 - full["Feb"] = "February"; number["Feb"] = 2;
9157 - full["Mar"] = "March"; number["Mar"] = 3;
9158 - full["Apr"] = "April"; number["Apr"] = 4;
9159 - full["May"] = "May"; number["May"] = 5;
9160 - full["Jun"] = "June"; number["Jun"] = 6;
9161 - full["Jul"] = "July"; number["Jul"] = 7;
9162 - full["Aug"] = "August"; number["Aug"] = 8;
9163 - full["Sep"] = "September"; number["Sep"] = 9;
9164 - full["Oct"] = "October"; number["Oct"] = 10;
9165 - full["Nov"] = "November"; number["Nov"] = 11;
9166 - full["Dec"] = "December"; number["Dec"] = 12;
9175 - if ($(NF-1) ~ /:/) {
9176 - if (number[$(NF-3)] > number[month])
9181 - print $(NF-2), full[$(NF-3)], year
9183 +perl -MPOSIX -le 'print strftime("%d %B %Y", localtime((stat $ARGV[0])[9]))' $1
9184 diff -Naur groff-1.18.1.4.orig/src/devices/grodvi/dvi.cc groff-1.18.1.4/src/devices/grodvi/dvi.cc
9185 --- groff-1.18.1.4.orig/src/devices/grodvi/dvi.cc 2002-03-01 01:15:36.000000000 +0000
9186 +++ groff-1.18.1.4/src/devices/grodvi/dvi.cc 2006-10-18 18:54:44.000000000 +0000
9190 #include "nonposix.h"
9191 +#include "encoding.h"
9193 extern "C" const char *Version_string;
9196 struct output_font {
9199 +#ifdef ENABLE_MULTIBYTE
9200 + const char *sf; // subfont name
9202 output_font() : f(0) { }
9206 output_font output_font_table[FONTS_MAX];
9209 +#ifdef ENABLE_MULTIBYTE
9210 + const char *cur_subfont;
9215 @@ -341,9 +348,18 @@
9216 if (*env->col != cur_color)
9217 set_color(env->col);
9218 int code = f->get_code(index);
9219 +#ifdef ENABLE_MULTIBYTE
9220 + const char *sf = f->get_subfont_name(index);
9221 + if (env->size != cur_point_size || f != cur_font ||
9222 + (sf != cur_subfont && strcmp(sf, cur_subfont))) {
9224 if (env->size != cur_point_size || f != cur_font) {
9227 cur_point_size = env->size;
9228 +#ifdef ENABLE_MULTIBYTE
9233 if (i >= FONTS_MAX) {
9234 @@ -352,9 +368,16 @@
9235 if (output_font_table[i].f == 0) {
9236 output_font_table[i].f = (dvi_font *)cur_font;
9237 output_font_table[i].point_size = cur_point_size;
9238 +#ifdef ENABLE_MULTIBYTE
9239 + output_font_table[i].sf = cur_subfont;
9243 if (output_font_table[i].f == cur_font
9244 +#ifdef ENABLE_MULTIBYTE
9245 + && (output_font_table[i].sf == cur_subfont ||
9246 + strcmp(output_font_table[i].sf, cur_subfont) == 0)
9248 && output_font_table[i].point_size == cur_point_size)
9251 @@ -398,7 +421,13 @@
9253 out4(output_font_table[i].point_size*RES_7227);
9254 out4(int((double(f->design_size)/(1<<20))*RES_7227*100 + .5));
9255 +#ifdef ENABLE_MULTIBYTE
9257 + if (!(nm = output_font_table[i].sf))
9258 + nm = f->get_internal_name();
9260 const char *nm = f->get_internal_name();
9266 program_name = argv[0];
9267 static char stderr_buf[BUFSIZ];
9268 setbuf(stderr, stderr_buf);
9269 + init_encoding_handler();
9271 static const struct option long_options[] = {
9272 { "help", no_argument, 0, CHAR_MAX + 1 },
9273 diff -Naur groff-1.18.1.4.orig/src/devices/grohtml/html.h groff-1.18.1.4/src/devices/grohtml/html.h
9274 --- groff-1.18.1.4.orig/src/devices/grohtml/html.h 2002-02-17 17:05:53.000000000 +0000
9275 +++ groff-1.18.1.4/src/devices/grohtml/html.h 2006-10-18 18:54:44.000000000 +0000
9277 class simple_output {
9279 simple_output(FILE *, int max_line_length);
9280 +#ifdef ENABLE_MULTIBYTE
9281 + simple_output &put_string(const wchar *, int);
9283 simple_output &put_string(const char *, int);
9284 simple_output &put_string(const char *s);
9285 simple_output &put_string(const string &s);
9286 diff -Naur groff-1.18.1.4.orig/src/devices/grohtml/post-html.cc groff-1.18.1.4/src/devices/grohtml/post-html.cc
9287 --- groff-1.18.1.4.orig/src/devices/grohtml/post-html.cc 2006-10-14 12:32:59.000000000 +0000
9288 +++ groff-1.18.1.4/src/devices/grohtml/post-html.cc 2006-10-18 18:54:44.000000000 +0000
9291 #include "html-text.h"
9292 #include "html-table.h"
9293 +#include "encoding.h" // XXX: ukai
9301 +#ifdef ENABLE_MULTIBYTE
9302 + char *add_string(const wchar *, unsigned int);
9304 char *add_string(const char *, unsigned int);
9305 char *add_string(const string &);
9307 @@ -301,6 +305,43 @@
9311 +#ifdef ENABLE_MULTIBYTE
9312 +char *char_buffer::add_string (const wchar *s, unsigned int length)
9315 + unsigned int old_used;
9318 + tail = new char_block;
9321 + if (tail->used + length*2 + 1 > char_block::SIZE) {
9322 + tail->next = new char_block;
9323 + tail = tail->next;
9326 + // at this point we have a tail which is ready for the string.
9327 + if (tail->used + length*2 + 1 > char_block::SIZE) {
9328 + fatal("need to increase char_block::SIZE");
9331 + old_used = tail->used;
9333 + length -= output_encoding->put_wchar(s[i], (unsigned char *)tail->buffer, &tail->used, length*2);
9335 + } while (length>0);
9337 + // add terminating nul character
9339 + tail->buffer[tail->used] = '\0';
9342 + // and return start of new string
9344 + return( &tail->buffer[old_used] );
9348 char *char_buffer::add_string (const char *s, unsigned int length)
9354 old_used = tail->used;
9355 + /* XXX: encoding - ukai */
9357 tail->buffer[tail->used] = s[i];
9359 @@ -1917,6 +1959,15 @@
9361 current_paragraph->do_para(&html, "", indentation, pageoffset, linelength);
9363 +#if 0 // def ENABLE_MULTIBYTE /* XXX */
9364 + else if (strcmp(fontname, "M") == 0) {
9365 + current_paragraph->done_bold();
9366 + current_paragraph->done_italic();
9367 + current_paragraph->done_tt();
9368 + } else if (strcmp(fontname, "G") == 0) {
9369 + current_paragraph->do_bold();
9374 void html_printer::determine_header_level (int level)
9375 @@ -2948,6 +2999,11 @@
9376 current_paragraph->done_italic();
9377 current_paragraph->done_tt();
9379 +#ifdef ENABLE_MULTIBYTE
9380 + else if (strcmp(fontname, "G") == 0) {
9381 + current_paragraph->done_bold();
9387 @@ -2992,6 +3048,15 @@
9388 current_paragraph->do_italic();
9389 current_paragraph->do_bold();
9391 +#ifdef ENABLE_MULTIBYTE
9392 + else if (strcmp(fontname, "M") == 0) {
9393 + current_paragraph->done_bold();
9394 + current_paragraph->done_italic();
9395 + current_paragraph->done_tt();
9396 + } else if (strcmp(fontname, "G") == 0) {
9397 + current_paragraph->do_bold();
9403 @@ -3331,7 +3396,23 @@
9405 last_sbuf_length = sbuf.length();
9406 if (html_glyph == NULL)
9407 +#ifdef ENABLE_MULTIBYTE
9409 + if (is_wchar_code(code)) {
9410 + int mblen = output_encoding->max_wchar_len();
9411 + unsigned char *wbuf = new unsigned char[mblen];
9413 + output_encoding->put_wchar(code, wbuf, &j, mblen);
9414 + for (i = 0; i < j; i++) {
9419 + sbuf += ((char)code);
9422 sbuf += ((char)code);
9427 @@ -3445,12 +3526,12 @@
9431 + sbuf_style = sty; /* XXX? */
9432 add_to_sbuf(i, name);
9433 sbuf_end_hpos = env->hpos + w;
9434 sbuf_start_hpos = env->hpos;
9435 sbuf_prev_hpos = env->hpos;
9436 sbuf_vpos = env->vpos;
9441 @@ -3659,6 +3740,7 @@
9442 program_name = argv[0];
9443 static char stderr_buf[BUFSIZ];
9444 setbuf(stderr, stderr_buf);
9445 + init_encoding_handler();
9447 static const struct option long_options[] = {
9448 { "help", no_argument, 0, CHAR_MAX + 1 },
9449 diff -Naur groff-1.18.1.4.orig/src/devices/grops/ps.cc groff-1.18.1.4/src/devices/grops/ps.cc
9450 --- groff-1.18.1.4.orig/src/devices/grops/ps.cc 2002-06-19 21:07:33.000000000 +0000
9451 +++ groff-1.18.1.4/src/devices/grops/ps.cc 2006-10-18 18:54:44.000000000 +0000
9454 #include "nonposix.h"
9456 +#include "encoding.h"
9460 @@ -193,12 +194,23 @@
9464 +#ifdef ENABLE_MULTIBYTE
9465 +ps_output &ps_output::put_string(const wchar *s, int n)
9467 ps_output &ps_output::put_string(const char *s, int n)
9472 for (i = 0; i < n; i++) {
9473 +#ifdef ENABLE_MULTIBYTE
9476 + if (is_wchar_singlebyte(wc))
9477 + c = wchar_singlebyte(wc);
9481 if (is_ascii(c) && csprint(c)) {
9482 if (c == '(' || c == ')' || c == '\\')
9484 @@ -224,8 +236,13 @@
9488 +#ifdef ENABLE_MULTIBYTE
9489 + int nb = output_encoding->put_wchar(s[i], fp, "%02x");
9492 fprintf(fp, "%02x", s[i] & 0377);
9501 char *reencoded_name;
9502 +#ifdef ENABLE_MULTIBYTE
9503 + char *encodingname;
9506 void handle_unknown_font_command(const char *command, const char *arg,
9507 const char *filename, int lineno);
9510 ps_font::ps_font(const char *nm)
9511 : font(nm), encoding_index(-1), encoding(0), reencoded_name(0)
9512 +#ifdef ENABLE_MULTIBYTE
9521 a_delete reencoded_name;
9522 +#ifdef ENABLE_MULTIBYTE
9523 + a_delete encodingname;
9527 void ps_font::handle_unknown_font_command(const char *command, const char *arg,
9528 @@ -433,6 +459,15 @@
9530 encoding = strsave(arg);
9532 +#ifdef ENABLE_MULTIBYTE
9533 + if (strcmp(command, "encodingname") == 0) {
9535 + error_with_file_and_line(filename, lineno,
9536 + "`encodingname' command requires an argument");
9538 + encodingname = strsave(arg);
9543 static void handle_unknown_desc_command(const char *command, const char *arg,
9544 @@ -487,7 +522,11 @@
9546 int equalise_spaces;
9547 enum { SBUF_SIZE = 256 };
9548 +#ifdef ENABLE_MULTIBYTE
9549 + wchar sbuf[SBUF_SIZE];
9551 char sbuf[SBUF_SIZE];
9554 int sbuf_start_hpos;
9556 @@ -606,7 +645,11 @@
9558 if (i == space_char_index || invis_count > 0)
9560 +#ifdef ENABLE_MULTIBYTE
9561 + wchar code = f->get_code(i);
9563 unsigned char code = f->get_code(i);
9565 style sty(f, env->size, env->height, env->slant);
9566 if (sty.slant != 0) {
9567 if (sty.slant > 80 || sty.slant < -80) {
9568 @@ -763,6 +806,14 @@
9569 if (sty == defined_styles[i]) {
9570 sprintf(buf, "F%d", i);
9571 out.put_symbol(buf);
9572 +#ifdef ENABLE_MULTIBYTE
9573 + char *encodingname = ((ps_font *)sty.f)->encodingname;
9574 + if (encodingname != 0) {
9575 + select_output_encoding_handler(encodingname);
9577 + select_output_encoding_handler("LATIN1");
9582 if (ndefined_styles >= MAX_DEFINED_STYLES)
9583 @@ -772,6 +823,14 @@
9584 const char *psname = sty.f->get_internal_name();
9586 fatal("no internalname specified for font `%1'", sty.f->get_name());
9587 +#ifdef ENABLE_MULTIBYTE
9588 + char *encodingname = ((ps_font *)sty.f)->encodingname;
9589 + if (encodingname != 0) {
9590 + select_output_encoding_handler(encodingname);
9592 + select_output_encoding_handler("LATIN1");
9595 char *encoding = ((ps_font *)sty.f)->encoding;
9596 if (encoding != 0) {
9597 char *s = ((ps_font *)sty.f)->reencoded_name;
9598 @@ -1555,6 +1614,7 @@
9600 static char stderr_buf[BUFSIZ];
9601 setbuf(stderr, stderr_buf);
9602 + init_encoding_handler();
9604 static const struct option long_options[] = {
9605 { "help", no_argument, 0, CHAR_MAX + 1 },
9606 diff -Naur groff-1.18.1.4.orig/src/devices/grops/ps.h groff-1.18.1.4/src/devices/grops/ps.h
9607 --- groff-1.18.1.4.orig/src/devices/grops/ps.h 2002-01-24 22:37:32.000000000 +0000
9608 +++ groff-1.18.1.4/src/devices/grops/ps.h 2006-10-18 18:54:44.000000000 +0000
9610 with groff; see the file COPYING. If not, write to the Free Software
9611 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
9613 +#include "encoding.h" // XXX
9617 ps_output(FILE *, int max_line_length);
9618 +#ifdef ENABLE_MULTIBYTE
9619 + ps_output &put_string(const wchar *, int);
9621 ps_output &put_string(const char *, int);
9623 ps_output &put_number(int);
9624 ps_output &put_fix_number(int);
9625 ps_output &put_float(double);
9626 diff -Naur groff-1.18.1.4.orig/src/devices/grotty/grotty.man groff-1.18.1.4/src/devices/grotty/grotty.man
9627 --- groff-1.18.1.4.orig/src/devices/grotty/grotty.man 2002-10-01 19:01:45.000000000 +0000
9628 +++ groff-1.18.1.4/src/devices/grotty/grotty.man 2006-10-18 18:54:44.000000000 +0000
9639 option on ASCII based systems, and with
9640 @@ -235,8 +237,10 @@
9642 is the name of the device, usually
9651 @@ -315,10 +319,20 @@
9655 +.B @FONTDIR@/devascii8/DESC
9656 +Device description file for
9660 .B @FONTDIR@/devlatin1/DESC
9661 Device description file for
9665 +.B @FONTDIR@/devnippon/DESC
9666 +Device description file for
9671 .BI @FONTDIR@/devlatin1/ F
9672 diff -Naur groff-1.18.1.4.orig/src/devices/grotty/tty.cc groff-1.18.1.4/src/devices/grotty/tty.cc
9673 --- groff-1.18.1.4.orig/src/devices/grotty/tty.cc 2002-06-19 21:31:15.000000000 +0000
9674 +++ groff-1.18.1.4/src/devices/grotty/tty.cc 2006-10-18 18:54:44.000000000 +0000
9679 +#include "encoding.h"
9681 extern "C" const char *Version_string;
9687 +#ifdef ENABLE_MULTIBYTE
9688 + , WCHAR_MODE = 0x100
9692 +#ifdef ENABLE_MULTIBYTE
9696 +#define putchar(wc) output_encoding->put_wchar((wc), stdout)
9699 // Mode to use for bold-underlining.
9700 static unsigned char bold_underline_mode = BOLD_MODE|UNDERLINE_MODE;
9703 static tty_font *load_tty_font(const char *);
9707 tty_font *tty_font::load_tty_font(const char *s)
9709 tty_font *f = new tty_font(s);
9712 const char *num = f->get_internal_name();
9714 +#ifdef ENABLE_MULTIBYTE
9716 + n = strtol(num, 0, 0);
9719 + f->mode = int(UNDERLINE_MODE);
9723 + f->mode = int(BOLD_MODE);
9726 + f->mode = int(BOLD_MODE|UNDERLINE_MODE);
9731 if (num != 0 && (n = strtol(num, 0, 0)) != 0)
9732 f->mode = int(n & (BOLD_MODE|UNDERLINE_MODE));
9734 if (!underline_flag)
9735 f->mode &= ~UNDERLINE_MODE;
9741 +#ifdef ENABLE_MULTIBYTE
9744 unsigned char back_color_idx;
9745 unsigned char fore_color_idx;
9746 void *operator new(size_t);
9748 void make_underline();
9749 void make_bold(unsigned int);
9750 unsigned char color_to_idx(color *col);
9751 - void add_char(unsigned int, int, int, color *, color *, unsigned char);
9752 + void add_char(unsigned int, int, int, color *, color *, font *, unsigned char);
9754 tty_printer(const char *device);
9757 void special(char *arg, const environment *env, char type);
9758 void change_color(const environment *env);
9759 void change_fill_color(const environment *env);
9760 - void put_char(unsigned int);
9761 + int put_char(unsigned int);
9762 void put_color(unsigned char, int);
9763 void begin_page(int) { }
9764 void end_page(int page_length);
9765 @@ -203,6 +236,10 @@
9766 tty_printer::tty_printer(const char *device) : cached_v(0)
9768 is_utf8 = !strcmp(device, "utf8");
9769 +#ifdef ENABLE_MULTIBYTE
9771 + select_output_encoding_handler("UTF-8");
9773 tty_colors[0].set_rgb(0, // black
9776 @@ -242,8 +279,18 @@
9777 void tty_printer::make_underline()
9779 if (old_drawing_scheme) {
9780 +#if 0 /* def ENABLE_MULTIBYTE XXX: not necessary? */
9781 + if ((p->mode & WCHAR_MODE)) {
9782 + putchar('_'); putchar('_');
9783 + putchar('\b'); putchar('\b');
9794 if (!is_underline) {
9795 @@ -285,17 +332,25 @@
9796 void tty_printer::set_char(int i, font *f, const environment *env,
9797 int w, const char *name)
9799 +#ifdef ENABLE_MULTIBYTE
9800 + if (is_wchar_code(i)) {
9801 + add_char(wchar_code(i), env->hpos, env->vpos, env->col, env->fill,
9802 + f, ((tty_font *)f)->get_mode());
9807 fatal("width of character not equal to horizontal resolution");
9808 add_char(f->get_code(i),
9809 env->hpos, env->vpos,
9810 env->col, env->fill,
9811 - ((tty_font *)f)->get_mode());
9812 + f, ((tty_font *)f)->get_mode());
9815 void tty_printer::add_char(unsigned int c,
9817 color *fore, color *back,
9822 @@ -338,6 +393,16 @@
9824 g->fore_color_idx = color_to_idx(fore);
9825 g->back_color_idx = color_to_idx(back);
9826 +#ifdef ENABLE_MULTIBYTE
9827 + if (is_wchar_code(c))
9828 + mode |= WCHAR_MODE;
9829 + if (curfont && curfont->contains(c)) {
9830 + int gw0 = curfont->get_space_width(font::unitwidth);
9831 + int gw = curfont->get_width(c, font::unitwidth);
9834 + g->cols = 1; /* XXX */
9838 // The list will be reversed later. After reversal, it must be in
9840 void tty_printer::special(char *arg, const environment *env, char type)
9843 - add_char(*arg - '0', env->hpos, env->vpos, env->col, env->fill, CU_MODE);
9844 + add_char(*arg - '0', env->hpos, env->vpos, env->col, env->fill, get_font_from_index(env->fontno), CU_MODE);
9848 @@ -395,12 +460,12 @@
9850 void tty_printer::change_color(const environment *env)
9852 - add_char(0, env->hpos, env->vpos, env->col, env->fill, COLOR_CHANGE);
9853 + add_char(0, env->hpos, env->vpos, env->col, env->fill, get_font_from_index(env->fontno), COLOR_CHANGE);
9856 void tty_printer::change_fill_color(const environment *env)
9858 - add_char(0, env->hpos, env->vpos, env->col, env->fill, COLOR_CHANGE);
9859 + add_char(0, env->hpos, env->vpos, env->col, env->fill, get_font_from_index(env->fontno), COLOR_CHANGE);
9862 void tty_printer::draw(int code, int *p, int np, const environment *env)
9867 - add_char('|', env->hpos, v, env->col, env->fill, VDRAW_MODE);
9868 + add_char('|', env->hpos, v, env->col, env->fill, get_font_from_index(env->fontno), VDRAW_MODE);
9872 @@ -434,18 +499,24 @@
9876 - add_char('-', h, env->vpos, env->col, env->fill, HDRAW_MODE);
9877 + add_char('-', h, env->vpos, env->col, env->fill, get_font_from_index(env->fontno), HDRAW_MODE);
9884 -void tty_printer::put_char(unsigned int wc)
9885 +int tty_printer::put_char(unsigned int wc)
9887 +#ifdef ENABLE_MULTIBYTE
9889 + return output_encoding->put_wchar(make_wchar(wc), stdout);
9892 if (is_utf8 && wc >= 0x80) {
9898 count = 1, *p = (unsigned char)((wc >> 6) | 0xc0);
9899 @@ -458,14 +529,18 @@
9900 else if (wc <= 0x7fffffff)
9901 count = 5, *p = (unsigned char)((wc >> 30) | 0xfC);
9906 do *++p = (unsigned char)(((wc >> (6 * --count)) & 0x3f) | 0x80);
9918 void tty_printer::put_color(unsigned char color_index, int back)
9919 @@ -629,7 +704,11 @@
9923 +#ifdef ENABLE_MULTIBYTE
9929 if (!old_drawing_scheme
9930 && (is_bold || is_underline
9932 if (getenv("GROFF_NO_SGR"))
9933 old_drawing_scheme = 1;
9934 setbuf(stderr, stderr_buf);
9935 + init_encoding_handler();
9937 static const struct option long_options[] = {
9938 { "help", no_argument, 0, CHAR_MAX + 1 },
9939 diff -Naur groff-1.18.1.4.orig/src/include/config.h groff-1.18.1.4/src/include/config.h
9940 --- groff-1.18.1.4.orig/src/include/config.h 1970-01-01 00:00:00.000000000 +0000
9941 +++ groff-1.18.1.4/src/include/config.h 2006-10-18 18:54:44.000000000 +0000
9943 +/* src/include/config.h. Generated by configure. */
9944 +/* src/include/config.hin. Generated from configure.ac by autoheader. */
9946 +/* Define if your C++ doesn't understand `delete []'. */
9947 +/* #undef ARRAY_DELETE_NEEDS_SIZE */
9949 +/* Define if you want to use multibyte extension. */
9950 +#define ENABLE_MULTIBYTE 1
9952 +/* Define if you have a C++ <limits.h>. */
9953 +#define HAVE_CC_LIMITS_H 1
9955 +/* Define if you have a C++ <osfcn.h>. */
9956 +/* #undef HAVE_CC_OSFCN_H */
9958 +/* Define to 1 if you have the <dirent.h> header file. */
9959 +#define HAVE_DIRENT_H 1
9961 +/* Define to 1 if you have the `fmod' function. */
9962 +#define HAVE_FMOD 1
9964 +/* Define to 1 if you have the `getcwd' function. */
9965 +#define HAVE_GETCWD 1
9967 +/* Define to 1 if you have the `getpagesize' function. */
9968 +#define HAVE_GETPAGESIZE 1
9970 +/* Define to 1 if you have the `gettimeofday' function. */
9971 +#define HAVE_GETTIMEOFDAY 1
9973 +/* Define to 1 if you have the <inttypes.h> header file. */
9974 +#define HAVE_INTTYPES_H 1
9976 +/* Define to 1 if you have the `isatty' function. */
9977 +#define HAVE_ISATTY 1
9979 +/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
9980 +#define HAVE_LANGINFO_CODESET 1
9982 +/* Define to 1 if you have the <limits.h> header file. */
9983 +#define HAVE_LIMITS_H 1
9985 +/* Define to 1 if you have the <math.h> header file. */
9986 +#define HAVE_MATH_H 1
9988 +/* Define to 1 if you have the <memory.h> header file. */
9989 +#define HAVE_MEMORY_H 1
9991 +/* Define if you have mkstemp(). */
9992 +#define HAVE_MKSTEMP 1
9994 +/* Define to 1 if you have a working `mmap' system call. */
9995 +#define HAVE_MMAP 1
9997 +/* Define to 1 if you have the `putenv' function. */
9998 +#define HAVE_PUTENV 1
10000 +/* Define to 1 if you have the `rename' function. */
10001 +#define HAVE_RENAME 1
10003 +/* Define to 1 if you have the `snprintf' function. */
10004 +#define HAVE_SNPRINTF 1
10006 +/* Define to 1 if you have the <stdint.h> header file. */
10007 +#define HAVE_STDINT_H 1
10009 +/* Define to 1 if you have the <stdlib.h> header file. */
10010 +#define HAVE_STDLIB_H 1
10012 +/* Define to 1 if you have the `strcasecmp' function. */
10013 +#define HAVE_STRCASECMP 1
10015 +/* Define to 1 if you have the `strerror' function. */
10016 +#define HAVE_STRERROR 1
10018 +/* Define to 1 if you have the <strings.h> header file. */
10019 +#define HAVE_STRINGS_H 1
10021 +/* Define to 1 if you have the <string.h> header file. */
10022 +#define HAVE_STRING_H 1
10024 +/* Define to 1 if you have the `strncasecmp' function. */
10025 +#define HAVE_STRNCASECMP 1
10027 +/* Define to 1 if you have the `strsep' function. */
10028 +#define HAVE_STRSEP 1
10030 +/* Define to 1 if you have the `strtol' function. */
10031 +#define HAVE_STRTOL 1
10033 +/* Define if <math.h> defines struct exception. */
10034 +#define HAVE_STRUCT_EXCEPTION 1
10036 +/* Define to 1 if you have the <sys/dir.h> header file. */
10037 +#define HAVE_SYS_DIR_H 1
10039 +/* Define if you have sys_errlist in <errno.h> or in <stdio.h>. */
10040 +#define HAVE_SYS_ERRLIST 1
10042 +/* Define if you have sysnerr in <errno.h> or <stdio.h>. */
10043 +#define HAVE_SYS_NERR 1
10045 +/* Define to 1 if you have the <sys/stat.h> header file. */
10046 +#define HAVE_SYS_STAT_H 1
10048 +/* Define to 1 if you have the <sys/time.h> header file. */
10049 +#define HAVE_SYS_TIME_H 1
10051 +/* Define to 1 if you have the <sys/types.h> header file. */
10052 +#define HAVE_SYS_TYPES_H 1
10054 +/* Define to 1 if you have the <unistd.h> header file. */
10055 +#define HAVE_UNISTD_H 1
10057 +/* Define if the host's encoding is EBCDIC. */
10058 +/* #undef IS_EBCDIC_HOST */
10060 +/* Define if localtime() takes a long * not a time_t *. */
10061 +/* #undef LONG_FOR_TIME_T */
10063 +/* Define if your C++ doesn't declare gettimeofday(). */
10064 +/* #undef NEED_DECLARATION_GETTIMEOFDAY */
10066 +/* Define if your C++ doesn't declare hypot(). */
10067 +/* #undef NEED_DECLARATION_HYPOT */
10069 +/* Define if your C++ doesn't declare pclose(). */
10070 +/* #undef NEED_DECLARATION_PCLOSE */
10072 +/* Define if your C++ doesn't declare popen(). */
10073 +/* #undef NEED_DECLARATION_POPEN */
10075 +/* Define if your C++ doesn't declare putenv(). */
10076 +/* #undef NEED_DECLARATION_PUTENV */
10078 +/* Define if your C++ doesn't declare strcasecmp(). */
10079 +/* #undef NEED_DECLARATION_STRCASECMP */
10081 +/* Define if your C++ doesn't declare strncasecmp(). */
10082 +/* #undef NEED_DECLARATION_STRNCASECMP */
10084 +/* Define to the address where bug reports for this package should be sent. */
10085 +#define PACKAGE_BUGREPORT ""
10087 +/* Define to the full name of this package. */
10088 +#define PACKAGE_NAME ""
10090 +/* Define to the full name and version of this package. */
10091 +#define PACKAGE_STRING ""
10093 +/* Define to the one symbol short name of this package. */
10094 +#define PACKAGE_TARNAME ""
10096 +/* Define to the version of this package. */
10097 +#define PACKAGE_VERSION ""
10099 +/* Define if the printer's page size is A4. */
10102 +/* Define as the return type of signal handlers (`int' or `void'). */
10103 +#define RETSIGTYPE void
10105 +/* Define if srand() returns void not int. */
10106 +#define RET_TYPE_SRAND_IS_VOID 1
10108 +/* Define to 1 if you have the ANSI C header files. */
10109 +#define STDC_HEADERS 1
10111 +/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
10112 +#define SYS_SIGLIST_DECLARED 1
10114 +/* Define if your C++ compiler uses a traditional (Reiser) preprocessor. */
10115 +/* #undef TRADITIONAL_CPP */
10117 +/* Define if the 0200 bit of the status returned by wait() indicates whether a
10118 + core image was produced for a process that was terminated by a signal. */
10119 +/* #undef WCOREFLAG */
10121 +/* Define if -D_POSIX_SOURCE is necessary. */
10122 +/* #undef _POSIX_SOURCE */
10124 +/* Define if you have ISC 3.x or 4.x. */
10125 +/* #undef _SYSV3 */
10127 +/* Define uintmax_t to `unsigned long' or `unsigned long long' if <inttypes.h>
10128 + does not exist. */
10129 +/* #undef uintmax_t */
10130 diff -Naur groff-1.18.1.4.orig/src/include/config.hin groff-1.18.1.4/src/include/config.hin
10131 --- groff-1.18.1.4.orig/src/include/config.hin 2002-09-06 07:32:26.000000000 +0000
10132 +++ groff-1.18.1.4/src/include/config.hin 2006-10-18 18:54:44.000000000 +0000
10134 -/* src/include/config.hin. Generated automatically from configure.ac by autoheader. */
10135 +/* src/include/config.hin. Generated from configure.ac by autoheader. */
10137 /* Define if your C++ doesn't understand `delete []'. */
10138 #undef ARRAY_DELETE_NEEDS_SIZE
10140 +/* Define if you want to use multibyte extension. */
10141 +#undef ENABLE_MULTIBYTE
10143 /* Define if you have a C++ <limits.h>. */
10144 #undef HAVE_CC_LIMITS_H
10146 /* Define if you have a C++ <osfcn.h>. */
10147 #undef HAVE_CC_OSFCN_H
10149 -/* Define if you have the <dirent.h> header file. */
10150 +/* Define to 1 if you have the <dirent.h> header file. */
10151 #undef HAVE_DIRENT_H
10153 -/* Define if you have the `fmod' function. */
10154 +/* Define to 1 if you have the `fmod' function. */
10157 -/* Define if you have the `getcwd' function. */
10158 +/* Define to 1 if you have the `getcwd' function. */
10161 -/* Define if you have the `getpagesize' function. */
10162 +/* Define to 1 if you have the `getpagesize' function. */
10163 #undef HAVE_GETPAGESIZE
10165 -/* Define if you have the `gettimeofday' function. */
10166 +/* Define to 1 if you have the `gettimeofday' function. */
10167 #undef HAVE_GETTIMEOFDAY
10169 -/* Define if you have the <limits.h> header file. */
10170 +/* Define to 1 if you have the <inttypes.h> header file. */
10171 +#undef HAVE_INTTYPES_H
10173 +/* Define to 1 if you have the `isatty' function. */
10174 +#undef HAVE_ISATTY
10176 +/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
10177 +#undef HAVE_LANGINFO_CODESET
10179 +/* Define to 1 if you have the <limits.h> header file. */
10180 #undef HAVE_LIMITS_H
10182 -/* Define if you have the <math.h> header file. */
10183 +/* Define to 1 if you have the <math.h> header file. */
10186 +/* Define to 1 if you have the <memory.h> header file. */
10187 +#undef HAVE_MEMORY_H
10189 /* Define if you have mkstemp(). */
10190 #undef HAVE_MKSTEMP
10192 -/* Define if you have a working `mmap' system call. */
10193 +/* Define to 1 if you have a working `mmap' system call. */
10196 -/* Define if you have the `putenv' function. */
10197 +/* Define to 1 if you have the `putenv' function. */
10200 -/* Define if you have the `rename' function. */
10201 +/* Define to 1 if you have the `rename' function. */
10204 -/* Define if you have the `snprintf' function. */
10205 +/* Define to 1 if you have the `snprintf' function. */
10206 #undef HAVE_SNPRINTF
10208 -/* Define if you have the `isatty' function. */
10209 -#undef HAVE_ISATTY
10211 -/* Define if you have the <stdint.h> header file. */
10212 +/* Define to 1 if you have the <stdint.h> header file. */
10213 #undef HAVE_STDINT_H
10215 -/* Define if you have the <stdlib.h> header file. */
10216 +/* Define to 1 if you have the <stdlib.h> header file. */
10217 #undef HAVE_STDLIB_H
10219 -/* Define if you have the `strcasecmp' function. */
10220 +/* Define to 1 if you have the `strcasecmp' function. */
10221 #undef HAVE_STRCASECMP
10223 -/* Define if you have the `strerror' function. */
10224 +/* Define to 1 if you have the `strerror' function. */
10225 #undef HAVE_STRERROR
10227 -/* Define if you have the <strings.h> header file. */
10228 +/* Define to 1 if you have the <strings.h> header file. */
10229 #undef HAVE_STRINGS_H
10231 -/* Define if you have the <string.h> header file. */
10232 +/* Define to 1 if you have the <string.h> header file. */
10233 #undef HAVE_STRING_H
10235 -/* Define if you have the `strncasecmp' function. */
10236 +/* Define to 1 if you have the `strncasecmp' function. */
10237 #undef HAVE_STRNCASECMP
10239 -/* Define if you have the `strsep' function. */
10240 +/* Define to 1 if you have the `strsep' function. */
10243 -/* Define if you have the `strtol' function. */
10244 +/* Define to 1 if you have the `strtol' function. */
10247 /* Define if <math.h> defines struct exception. */
10248 #undef HAVE_STRUCT_EXCEPTION
10250 -/* Define if you have the <sys/dir.h> header file. */
10251 +/* Define to 1 if you have the <sys/dir.h> header file. */
10252 #undef HAVE_SYS_DIR_H
10254 /* Define if you have sys_errlist in <errno.h> or in <stdio.h>. */
10255 @@ -87,10 +99,16 @@
10256 /* Define if you have sysnerr in <errno.h> or <stdio.h>. */
10257 #undef HAVE_SYS_NERR
10259 -/* Define if you have the <sys/time.h> header file. */
10260 +/* Define to 1 if you have the <sys/stat.h> header file. */
10261 +#undef HAVE_SYS_STAT_H
10263 +/* Define to 1 if you have the <sys/time.h> header file. */
10264 #undef HAVE_SYS_TIME_H
10266 -/* Define if you have the <unistd.h> header file. */
10267 +/* Define to 1 if you have the <sys/types.h> header file. */
10268 +#undef HAVE_SYS_TYPES_H
10270 +/* Define to 1 if you have the <unistd.h> header file. */
10271 #undef HAVE_UNISTD_H
10273 /* Define if the host's encoding is EBCDIC. */
10274 @@ -120,6 +138,21 @@
10275 /* Define if your C++ doesn't declare strncasecmp(). */
10276 #undef NEED_DECLARATION_STRNCASECMP
10278 +/* Define to the address where bug reports for this package should be sent. */
10279 +#undef PACKAGE_BUGREPORT
10281 +/* Define to the full name of this package. */
10282 +#undef PACKAGE_NAME
10284 +/* Define to the full name and version of this package. */
10285 +#undef PACKAGE_STRING
10287 +/* Define to the one symbol short name of this package. */
10288 +#undef PACKAGE_TARNAME
10290 +/* Define to the version of this package. */
10291 +#undef PACKAGE_VERSION
10293 /* Define if the printer's page size is A4. */
10296 @@ -129,7 +162,10 @@
10297 /* Define if srand() returns void not int. */
10298 #undef RET_TYPE_SRAND_IS_VOID
10300 -/* Define if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
10301 +/* Define to 1 if you have the ANSI C header files. */
10302 +#undef STDC_HEADERS
10304 +/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
10305 #undef SYS_SIGLIST_DECLARED
10307 /* Define if your C++ compiler uses a traditional (Reiser) preprocessor. */
10308 diff -Naur groff-1.18.1.4.orig/src/include/device.h groff-1.18.1.4/src/include/device.h
10309 --- groff-1.18.1.4.orig/src/include/device.h 2000-02-06 09:36:30.000000000 +0000
10310 +++ groff-1.18.1.4/src/include/device.h 2006-10-18 18:54:44.000000000 +0000
10312 with groff; see the file COPYING. If not, write to the Free Software
10313 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
10318 extern const char *device;
10320 +#endif /* _DEVICE_H */
10321 diff -Naur groff-1.18.1.4.orig/src/include/driver.h groff-1.18.1.4/src/include/driver.h
10322 --- groff-1.18.1.4.orig/src/include/driver.h 2002-02-17 17:05:53.000000000 +0000
10323 +++ groff-1.18.1.4/src/include/driver.h 2006-10-18 18:54:44.000000000 +0000
10326 #include <assert.h>
10328 +#include "encoding.h" // XXX: ukai
10329 #include "errarg.h"
10332 diff -Naur groff-1.18.1.4.orig/src/include/encoding.h groff-1.18.1.4/src/include/encoding.h
10333 --- groff-1.18.1.4.orig/src/include/encoding.h 1970-01-01 00:00:00.000000000 +0000
10334 +++ groff-1.18.1.4/src/include/encoding.h 2006-10-18 18:54:44.000000000 +0000
10337 +/* Copyright (c) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
10339 +This file is part of groff.
10341 +groff is free software; you can redistribute it and/or modify it under
10342 +the terms of the GNU General Public License as published by the Free
10343 +Software Foundation; either version 2, or (at your option) any later
10346 +groff is distributed in the hope that it will be useful, but WITHOUT ANY
10347 +WARRANTY; without even the implied warranty of MERCHANTABILITY or
10348 +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
10351 +You should have received a copy of the GNU General Public License
10352 +along with this program; if not, write to the Free Software
10353 +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
10355 +#ifndef ENCODING_H
10356 +#define ENCODING_H
10358 +#include <config.h>
10360 +#ifdef ENABLE_MULTIBYTE
10361 +typedef int wchar; // negative is used for charcode & index
10363 +typedef char wchar;
10366 +#include <stdio.h>
10368 +#ifdef __cplusplus
10369 +class encoding_istream {
10371 + encoding_istream() {};
10372 + virtual ~encoding_istream() {};
10373 + virtual int getbyte() = 0;
10374 + virtual int peekbyte() = 0;
10375 + virtual void ungetbyte(int ch) = 0;
10378 +class encoding_istream_str: public encoding_istream {
10380 + const unsigned char *s;
10382 + encoding_istream_str() {};
10384 + encoding_istream_str(const unsigned char *s0, int *i0) : s(s0), i(i0) {};
10385 + ~encoding_istream_str() {};
10386 + inline int getbyte() { return s[(*i)++]; };
10387 + inline int peekbyte() { return s[(*i)]; };
10388 + inline void ungetbyte(int ch) { --(*i); };
10391 +class encoding_istream_fp: public encoding_istream {
10395 + encoding_istream_fp(FILE *fp0) : fp(fp0) {};
10396 + ~encoding_istream_fp() {};
10397 + inline int getbyte() { return fgetc(fp); };
10398 + inline int peekbyte() { int ch = fgetc(fp); ungetc(ch, fp); return ch; };
10399 + inline void ungetbyte(int ch) { ungetc(ch, fp); };
10402 +class encoding_ostream {
10404 + encoding_ostream() {};
10405 + virtual ~encoding_ostream() {};
10406 + virtual void putbyte(unsigned char ch) = 0;
10409 +class encoding_ostream_str: public encoding_ostream {
10411 + unsigned char *s;
10414 + encoding_ostream_str() {};
10416 + encoding_ostream_str(unsigned char *s0, int *i0, int max) : s(s0), i(i0), len(max) {};
10417 + ~encoding_ostream_str() {};
10418 + inline void putbyte(unsigned char ch) {
10424 +class encoding_ostream_fp: public encoding_ostream {
10427 + const char *format;
10429 + encoding_ostream_fp(FILE *ofp, const char *fmt = "%c") : fp(ofp), format(fmt) {};
10430 + ~encoding_ostream_fp() {};
10431 + inline void putbyte(unsigned char ch) {
10432 + fprintf(fp, format, ch);
10436 +class encoding_handler {
10438 + encoding_handler() {};
10439 + virtual ~encoding_handler() {};
10441 + // name of this encoding_handler
10442 + virtual const char *name() { return ""; };
10444 + // check if this byte is byte in multibyte character in this encoding?
10445 + virtual int is_wchar_byte(unsigned char c) { return 0; };
10447 + // make new wchar from c0 (beginning of multibytes) and rest from `in'
10448 + virtual wchar make_wchar(unsigned char c0, encoding_istream& in) {
10449 + return wchar(c0);
10451 + // make new wchar from c0 (beginning of multibytes) and rest from `fp'
10452 + virtual wchar make_wchar(unsigned char c0, FILE *fp) {
10453 + encoding_istream_fp in(fp);
10454 + return make_wchar(c0, in);
10456 + // make new wchar from c0 (beginning of multibtyes) and rest from
10457 + // s[*i], *i will be changed to point the byte of next character.
10458 + virtual wchar make_wchar(unsigned char c0, const unsigned char *s, int *i) {
10459 + encoding_istream_str in(s, i);
10460 + return make_wchar(c0, in);
10463 + // put wchar to outputstream
10464 + // returns number of bytes written
10465 + virtual int put_wchar(wchar wc, encoding_ostream& eos) {
10466 + eos.putbyte((unsigned char)wc);
10469 + // put wchar to `fp' using `fmt'
10470 + // returns number of bytes written
10471 + virtual int put_wchar(wchar wc, FILE *fp, const char *fmt = "%c") {
10472 + encoding_ostream_fp out(fp, fmt);
10473 + return put_wchar(wc, out);
10475 + // put wchar to s[*i] (until maxlen)
10476 + // *i will be changed to point the byte of next character.
10477 + virtual int put_wchar(wchar wc, unsigned char *s, int *i, int maxlen) {
10478 + encoding_ostream_str out(s, i, maxlen);
10479 + return put_wchar(wc, out);
10482 + // maximum number of bytes of multibyte character in this encoding
10483 + virtual int max_wchar_len() { return 1; };
10487 +encoding_handler* select_input_encoding_handler(const char* encoding_name);
10488 +encoding_handler* select_output_encoding_handler(const char* encoding_name);
10489 +extern encoding_handler* input_encoding;
10490 +extern encoding_handler* output_encoding;
10491 +void init_encoding_handler();
10493 +// check if wc is wchar?
10494 +int is_wchar_code(wchar wc);
10496 +// check if wc is wchar & can be represented in single byte?
10497 +int is_wchar_singlebyte(wchar wc);
10499 +// get singlebyte representation of wchar (if is_wchar_singlebyte(wc))
10500 +unsigned char wchar_singlebyte(wchar wc);
10502 +// get actual wide character code
10503 +int wchar_code(wchar wc);
10505 +// make wchar from wide character code
10506 +int make_wchar(int w);
10510 +#endif /* ENCODING_H */
10511 diff -Naur groff-1.18.1.4.orig/src/include/font.h groff-1.18.1.4/src/include/font.h
10512 --- groff-1.18.1.4.orig/src/include/font.h 2002-07-09 07:57:02.000000000 +0000
10513 +++ groff-1.18.1.4/src/include/font.h 2006-10-18 18:54:44.000000000 +0000
10514 @@ -18,11 +18,17 @@
10515 with groff; see the file COPYING. If not, write to the Free Software
10516 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
10518 +#include "encoding.h"
10520 typedef void (*FONT_COMMAND_HANDLER)(const char *, const char *,
10521 const char *, int);
10523 struct font_kern_list;
10524 struct font_char_metric;
10525 +#ifdef ENABLE_MULTIBYTE
10526 +struct fontset_list;
10527 +struct font_wchar_metric;
10529 struct font_widths_cache;
10533 const char *get_special_device_encoding(int index);
10534 const char *get_name();
10535 const char *get_internal_name();
10536 +#ifdef ENABLE_MULTIBYTE
10537 + const char *get_subfont_name(int index);
10540 static int scan_papersize(const char *, const char **, double *, double *);
10543 static int load_desc();
10544 static int name_to_index(const char *);
10545 static int number_to_index(int);
10546 +#ifdef ENABLE_MULTIBYTE
10547 + static int wchar_index(wchar);
10549 static FONT_COMMAND_HANDLER
10550 set_unknown_desc_command_handler(FONT_COMMAND_HANDLER);
10554 static int sizescale;
10555 static int tcommand;
10556 +#ifdef ENABLE_MULTIBYTE
10557 + // XXX: should be in charinfo or font_wchar_metric?
10558 + static int lowerwchar;
10559 + static int wcharkern;
10561 static int pass_filenames;
10562 static int use_charnames_in_special;
10564 @@ -83,13 +100,27 @@
10565 static const char **style_table;
10566 static const char *family;
10568 +#ifdef ENABLE_MULTIBYTE
10569 + // fontsets - sub font list
10570 + static fontset_list *fontsets;
10571 + // get fontset for `wc' in current font `fname'
10572 + static int get_fontset_font(const char *fname, wchar wc);
10573 + // is the fontno's font load on demand?
10574 + static int is_on_demand(int fontno);
10577 unsigned ligatures;
10578 font_kern_list **kern_hash_table;
10581 + short *ch_index; /* XXX: this is used unless font_wchar_metric. */
10583 font_char_metric *ch;
10584 +#ifdef ENABLE_MULTIBYTE
10585 + // font metric for wchar
10586 + font_wchar_metric *wch;
10587 + // get font metric for wchar indexed by c
10588 + font_wchar_metric *get_font_wchar_metric(int c);
10593 diff -Naur groff-1.18.1.4.orig/src/include/lib.h groff-1.18.1.4/src/include/lib.h
10594 --- groff-1.18.1.4.orig/src/include/lib.h 2002-03-08 07:33:49.000000000 +0000
10595 +++ groff-1.18.1.4/src/include/lib.h 2006-10-18 18:54:44.000000000 +0000
10598 extern char invalid_char_table[];
10600 +#include "encoding.h" /* XXX: ukai */
10602 inline int invalid_input_char(int c)
10604 +#ifdef ENABLE_MULTIBYTE
10605 + if (input_encoding->is_wchar_byte(c))
10609 return c >= 0 && invalid_char_table[c];
10612 diff -Naur groff-1.18.1.4.orig/src/include/printer.h groff-1.18.1.4/src/include/printer.h
10613 --- groff-1.18.1.4.orig/src/include/printer.h 2002-04-14 10:22:57.000000000 +0000
10614 +++ groff-1.18.1.4/src/include/printer.h 2006-10-18 18:54:44.000000000 +0000
10619 +#include "encoding.h"
10621 struct environment {
10626 virtual ~printer();
10627 void load_font(int i, const char *name);
10628 +#ifdef ENABLE_MULTIBYTE
10629 + void set_wchar_char(wchar c, char *s, int i0, int len, const environment *env, int *widthp = 0);
10631 void set_ascii_char(unsigned char c, const environment *env,
10633 void set_special_char(const char *nm, const environment *env,
10634 diff -Naur groff-1.18.1.4.orig/src/libs/libdriver/input.cc groff-1.18.1.4/src/libs/libdriver/input.cc
10635 --- groff-1.18.1.4.orig/src/libs/libdriver/input.cc 2002-09-06 08:10:38.000000000 +0000
10636 +++ groff-1.18.1.4/src/libs/libdriver/input.cc 2006-10-18 18:54:44.000000000 +0000
10637 @@ -250,6 +250,7 @@
10639 #include "driver.h"
10640 #include "device.h"
10641 +#include "encoding.h"
10643 #include <stdlib.h>
10645 @@ -1439,6 +1440,19 @@
10646 char *subcmd_str = get_string_arg();
10647 char subcmd = subcmd_str[0];
10649 +#ifdef ENABLE_MULTIBYTE
10650 + case 'e': // x encoding: select encoding
10652 + char *str_arg = get_string_arg();
10653 + if (str_arg == 0)
10654 + warning("empty argument for `x encoding' command");
10656 + select_input_encoding_handler(str_arg);
10662 case 'f': // x font: mount font
10664 IntArg n = get_integer_arg();
10665 @@ -1517,7 +1531,7 @@
10670 +////////////////////////////////////////////////////////////////
10671 /**********************************************************************
10672 exported part (by driver.h)
10673 **********************************************************************/
10674 @@ -1625,6 +1639,18 @@
10675 if (str_arg[0] != 'i')
10676 fatal("the third command must be `x init'");
10678 +#ifdef ENABLE_MULTIBYTE
10679 + Char c = get_char();
10680 + while (is_space_or_tab(c) && c != Char('\n') && c != Char(EOF))
10683 + if (c != Char('\n') && c != Char(EOF)) {
10684 + const char *tmp_encoding = get_string_arg();
10685 + if (tmp_encoding && *tmp_encoding)
10686 + select_input_encoding_handler(tmp_encoding);
10687 + delete tmp_encoding;
10693 @@ -1763,6 +1789,18 @@
10695 while ((c = str_arg[i++]) != '\0') {
10697 +#ifdef ENABLE_MULTIBYTE
10698 + if (input_encoding->is_wchar_byte(c)) {
10700 + wchar wc = input_encoding->make_wchar(c, (const unsigned char *)str_arg, (int *)&i);
10701 + if (is_wchar_code(wc)) {
10702 + /* XXX: singlebyte check? */
10703 + pr->set_wchar_char(wc, str_arg, i0, i - i0, current_env, &w);
10705 + pr->set_ascii_char((unsigned char) c, current_env, &w);
10709 pr->set_ascii_char((unsigned char) c, current_env, &w);
10710 current_env->hpos += w;
10712 diff -Naur groff-1.18.1.4.orig/src/libs/libdriver/printer.cc groff-1.18.1.4/src/libs/libdriver/printer.cc
10713 --- groff-1.18.1.4.orig/src/libs/libdriver/printer.cc 2002-04-14 10:22:57.000000000 +0000
10714 +++ groff-1.18.1.4/src/libs/libdriver/printer.cc 2006-10-18 18:54:44.000000000 +0000
10718 #include "driver.h"
10719 +#include "encoding.h"
10723 @@ -138,6 +139,24 @@
10727 +#ifdef ENABLE_MULTIBYTE
10728 +void printer::set_wchar_char(wchar c, char *s, int i0, int len, const environment *env, int *widthp)
10730 + unsigned char *buf = new unsigned char[len+1];
10731 + memset(buf, 0, len+1);
10732 + memcpy(buf, s+i0, len);
10735 + int i = set_char_and_width((const char *)buf, env, &w, &f);
10737 + set_char(c, f, env, w, (const char *)buf);
10745 void printer::set_special_char(const char *nm, const environment *env,
10748 diff -Naur groff-1.18.1.4.orig/src/libs/libgroff/Makefile.sub groff-1.18.1.4/src/libs/libgroff/Makefile.sub
10749 --- groff-1.18.1.4.orig/src/libs/libgroff/Makefile.sub 2002-08-23 07:04:40.000000000 +0000
10750 +++ groff-1.18.1.4/src/libs/libgroff/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
10755 + encoding.$(OBJEXT) \
10760 $(srcdir)/color.cc \
10761 $(srcdir)/cset.cc \
10762 $(srcdir)/device.cc \
10763 + $(srcdir)/encoding.cc \
10764 $(srcdir)/errarg.cc \
10765 $(srcdir)/error.cc \
10766 $(srcdir)/fatal.cc \
10767 diff -Naur groff-1.18.1.4.orig/src/libs/libgroff/encoding.cc groff-1.18.1.4/src/libs/libgroff/encoding.cc
10768 --- groff-1.18.1.4.orig/src/libs/libgroff/encoding.cc 1970-01-01 00:00:00.000000000 +0000
10769 +++ groff-1.18.1.4/src/libs/libgroff/encoding.cc 2006-10-18 18:54:44.000000000 +0000
10772 +/* Copyright (C) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
10774 +This file is part of groff.
10776 +groff is free software; you can redistribute it and/or modify it under
10777 +the terms of the GNU General Public License as published by the Free
10778 +Software Foundation; either version 2, or (at your option) any later
10781 +groff is distributed in the hope that it will be useful, but WITHOUT ANY
10782 +WARRANTY; without even the implied warranty of MERCHANTABILITY or
10783 +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
10786 +You should have received a copy of the GNU General Public License
10787 +along with this program; if not, write to the Free Software
10788 +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
10790 +#include "encoding.h"
10791 +#include "device.h"
10793 +#include <string.h>
10794 +#ifdef ENABLE_MULTIBYTE
10795 +#include <locale.h>
10796 +#include <wchar.h>
10797 +#ifdef HAVE_LANGINFO_CODESET
10798 +#include <langinfo.h>
10800 +#include <stdlib.h>
10804 +class ascii8_handler : public encoding_handler {
10805 + // encoding handler for 8bit ascii
10806 + // no multibyte support
10808 + ascii8_handler() {}
10809 + ~ascii8_handler() {}
10811 + const char *name() { return "C"; }; /* ??? */
10813 + inline int is_wchar_byte(unsigned char c) { return 0; }
10814 + inline wchar make_wchar(unsigned char c0, encoding_istream& eis) {
10815 + return wchar(c0);
10817 + inline int put_wchar(wchar wc, encoding_ostream& eos) {
10818 + eos.putbyte((unsigned char)wchar_code(wc));
10821 + inline int max_wchar_len() { return 1; };
10825 +#ifdef ENABLE_MULTIBYTE
10826 +class utf8_handler: public encoding_handler {
10828 + utf8_handler() { }
10829 + ~utf8_handler() { }
10831 + const char *name() { return "UTF-8"; };
10833 + inline int is_wchar_byte(unsigned char c) {
10834 + return (c >= 0x80);
10838 + 0000 0000-0000 007F 0xxxxxxx
10839 + 0000 0080-0000 07FF 110xxxxx 10xxxxxx
10840 + 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
10842 + 0001 0000-001F FFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
10843 + 0020 0000-03FF FFFF 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
10844 + 0400 0000-7FFF FFFF 1111110x 10xxxxxx ... 10xxxxxx
10847 + inline wchar make_wchar(unsigned char c0, encoding_istream& eis) {
10850 + if (! is_wchar_byte(c0)) {
10853 + if ((c0 & 0xFC) == 0xFC) {
10856 + } else if ((c0 & 0xF8) == 0xF8) {
10859 + } else if ((c0 & 0xF0) == 0xF0) {
10862 + } else if ((c0 & 0xE0) == 0xE0) {
10865 + } else if ((c0 & 0xC0) == 0xC0) {
10869 + for (; count > 0; count--) {
10871 + int c1 = eis.getbyte();
10872 + if (! is_wchar_byte(c1)) {
10873 + /* illegal utf8 sequence? */
10875 + wc |= (c1 & 0x3F);
10877 + return -wc; // XXX: negative
10880 + inline int put_wchar(wchar wc, encoding_ostream& eos) {
10882 + if (! is_wchar_code(wc)) {
10886 + wc = -wc; // XXX: negative -> character code
10888 + if (wc < 0x800) {
10889 + count = 1; eos.putbyte((wc >> 6) | 0xC0);
10890 + } else if (wc < 0x10000) {
10891 + count = 2; eos.putbyte((wc >> 12) | 0xE0);
10892 + } else if (wc < 0x200000) {
10893 + count = 3; eos.putbyte((wc >> 18) | 0xF0);
10894 + } else if (wc < 0x4000000) {
10895 + count = 4; eos.putbyte((wc >> 24) | 0xf8);
10896 + } else if (wc <= 0x7fffffff) {
10897 + count = 5; eos.putbyte((wc >> 30) | 0xFC);
10899 + for (int i = 0; i < count; i++) {
10900 + eos.putbyte(((wc >> 6 * (count - i - 1)) & 0x3f) | 0x80);
10904 + inline int max_wchar_len() { return 6; }; /* XXX 3?*/
10910 +#include <iconv.h>
10911 +#include <errno.h>
10913 +class iconv_handler : public encoding_handler {
10915 + iconv_t icd, ocd;
10916 + const char *encoding_name;
10917 + static iconv_handler *ih_header;
10920 + iconv_handler *next;
10922 + static iconv_handler *new_iconv_handler(const char *ename) {
10923 + iconv_handler *ip;
10924 + // if already created, use it.
10925 + for (ip = ih_header; ip != NULL; ip = ip->next) {
10926 + if (strcmp(ip->name(), ename) == 0) {
10930 + // not found, create new one.
10931 + ip = new iconv_handler(ename);
10932 + ip->next = ih_header;
10936 + iconv_handler(const char *ename) : encoding_name(ename) {
10937 + // internal code is UCS-2BE
10938 + icd = iconv_open("UCS-2BE", encoding_name);
10939 + ocd = iconv_open(encoding_name, "UCS-2BE");
10941 + ~iconv_handler() {};
10943 + const char *name() { return encoding_name; };
10945 + inline int is_wchar_byte(unsigned char c) {
10946 + return (c >= 0x80); /* ??? */
10949 + inline wchar make_wchar(unsigned char c0, encoding_istream& eis) {
10951 + char inbuf[8], outbuf[8];
10952 + char *inp, *outp;
10953 + size_t inbytesleft, outbytesleft;
10956 + if (! is_wchar_byte(c0)) {
10959 + for (inbuf[i++] = c0; ;inbuf[i++] = eis.getbyte()) {
10961 + outbytesleft = sizeof(outbuf);
10964 + size_t r = iconv(icd, &inp, &inbytesleft, &outp, &outbytesleft);
10965 + if (r == (size_t)-1) {
10966 + if (errno == EILSEQ) {
10967 + /* illegal sequence? */
10969 + } else if (errno == EINVAL) {
10970 + /* incomplete sequence? */
10972 + } else if (errno == E2BIG) {
10973 + /* no room to output? */
10978 + /* UCS-2 is 2 bytes */
10979 + wc = ((outbuf[0] & 0x0ff) << 8) | (outbuf[1] & 0x0ff);
10980 + return -wc; // XXX: negative
10985 + inline int put_wchar(wchar wc, encoding_ostream& eos) {
10986 + char inbuf[4], outbuf[4];
10987 + char *inp, *outp;
10988 + size_t inbytesleft, outbytesleft;
10990 + if (!is_wchar_code(wc)) {
10991 + eos.putbyte(wc & 0x0ff);
10994 + wc = -wc; // XXX: negative -> character code
10996 + inbuf[0] = (wc >> 8) & 0x0ff;
10997 + inbuf[1] = (wc >> 0) & 0x0ff;
11000 + outbytesleft = 4;
11003 + size_t r = iconv(ocd, &inp, &inbytesleft, &outp, &outbytesleft);
11004 + if (r == (size_t)-1) {
11005 + if (errno == EILSEQ) {
11006 + /* illegal sequence? */;
11007 + } else if (errno == EINVAL) {
11008 + /* incomplete sequence? */;
11009 + } else if (errno == E2BIG) {
11010 + /* no room to output? */;
11012 + eos.putbyte('?');
11015 + char *op = outbuf;
11017 + for (; op < outp; op++, n++) {
11018 + eos.putbyte(*op & 0x0ff);
11020 + return outp - outbuf;
11022 + inline int max_wchar_len() { return 6; }; /* XXX */
11026 +class euc_handler : public encoding_handler {
11027 + static const int WCTABLE_OFFSET = 0xa1;
11028 + static const int WCTABLE_SIZE = 94;
11029 + static const int EUCMASK = 0x8080;
11033 + ~euc_handler() {};
11035 + const char *name() { return "EUC-JP"; };
11037 + inline int is_wchar_byte(unsigned char c) {
11038 + return (c >= 0xa1 && c <= 0xfe);
11041 + inline wchar make_wchar(unsigned char c0, encoding_istream& eis) {
11043 + if (! is_wchar_byte(c0)) {
11046 + int c1 = eis.peekbyte();
11047 + if (! is_wchar_byte(c1)) {
11048 + eis.ungetbyte(c1);
11051 + c1 = eis.getbyte();
11052 + wc = (c0 & 0xff) << 8;
11053 + wc |= (c1 & 0xff);
11055 + if (wc == 0xa1a1)
11060 + inline int put_wchar(wchar wc, encoding_ostream& eos) {
11061 + if (is_wchar_code(wc)) {
11063 + eos.putbyte((wc >> 8) & 0x0ff);
11064 + eos.putbyte((wc >> 0) & 0x0ff);
11067 + eos.putbyte(wc & 0x0ff);
11071 + inline int max_wchar_len() { return 2; }; /* XXX */
11073 +#endif /* USE_ICONV */
11076 +static ascii8_handler ascii8;
11077 +#ifdef ENABLE_MULTIBYTE
11078 +static utf8_handler utf8;
11080 +iconv_handler *iconv_handler::ih_header = NULL;
11082 +static euc_handler eucjp;
11086 +encoding_handler *input_encoding = &ascii8;
11087 +encoding_handler *output_encoding = &ascii8;
11090 +new_encoding_handler(encoding_handler **eptr, const char *encoding_name)
11092 + if (!encoding_name) {
11096 +#ifdef ENABLE_MULTIBYTE
11097 + if (strcmp(encoding_name, "UTF-8") == 0) {
11102 + if (strcmp(encoding_name, "C") != 0) {
11103 + *eptr = iconv_handler::new_iconv_handler(encoding_name);
11107 + // printf("encoding request: [%s]\n", encoding_name);
11108 + if (strcmp(encoding_name, "EUC-JP") == 0) {
11109 + // printf("encoding: [EUC-JP]\n");
11120 +encoding_handler *
11121 +select_input_encoding_handler(const char *encoding_name)
11123 + new_encoding_handler(&input_encoding, encoding_name);
11124 + return input_encoding;
11127 +encoding_handler *
11128 +select_output_encoding_handler(const char *encoding_name)
11130 + new_encoding_handler(&output_encoding, encoding_name);
11131 + return output_encoding;
11135 +init_encoding_handler()
11137 +#ifdef ENABLE_MULTIBYTE
11138 + const char *locale, *charset;
11139 + // groff 1 defines ISO-8859-1 as the input encoding, so this is required
11140 + // for compatibility. groff 2 will define UTF-8 (or possibly officially
11141 + // allow it to be switchable?)
11142 + select_input_encoding_handler("ISO-8859-1");
11143 + select_output_encoding_handler("C");
11145 + locale = setlocale(LC_ALL, "");
11146 + if (locale == NULL ||
11147 + strcmp(locale, "C") == 0 || strcmp(locale, "POSIX") == 0) {
11150 + /* check LC_CTYPE is C or POSIX */
11151 + locale = setlocale(LC_CTYPE, NULL);
11152 + if (strcmp(locale, "C") == 0 || strcmp(locale, "POSIX") == 0) {
11156 +#if HAVE_LANGINFO_CODESET
11157 + charset = nl_langinfo(CODESET);
11159 + charset = strchr(locale, '.');
11165 + if (strncmp(locale, "ja", 2) == 0 || strncmp(locale, "zh", 2) == 0 ||
11166 + (strncmp(locale, "ko", 2) == 0 && strcmp(charset, "UTF-8") == 0)) {
11167 + select_input_encoding_handler(charset);
11168 + select_output_encoding_handler(charset);
11169 + } else if ((!device || strcmp(device, "ascii8") == 0)) {
11170 + select_input_encoding_handler(NULL);
11171 + select_output_encoding_handler(NULL);
11178 +is_wchar_code(wchar wc)
11184 +is_wchar_singlebyte(wchar wc)
11186 + return ((-256 < wc) && (wc < 0));
11190 +wchar_singlebyte(wchar wc)
11193 + return (unsigned char)wc;
11195 + return (unsigned char)-wc;
11199 +wchar_code(wchar wc)
11212 diff -Naur groff-1.18.1.4.orig/src/libs/libgroff/font.cc groff-1.18.1.4/src/libs/libgroff/font.cc
11213 --- groff-1.18.1.4.orig/src/libs/libgroff/font.cc 2002-07-23 23:50:52.000000000 +0000
11214 +++ groff-1.18.1.4/src/libs/libgroff/font.cc 2006-10-18 18:54:44.000000000 +0000
11216 #include <assert.h>
11218 #include <stdlib.h>
11219 +#include "encoding.h" // XXX: ukai
11220 #include "errarg.h"
11224 int italic_correction;
11225 int subscript_correction;
11226 char *special_device_coding;
11227 +#ifdef ENABLE_MULTIBYTE
11228 + char *subfont_name;
11232 +#ifdef ENABLE_MULTIBYTE
11233 +struct fontset_list {
11234 + struct fontset_list *next;
11235 + char *primary_font_name;
11236 + int fontset_font;
11237 + wchar start_code;
11242 +fontset_list *font::fontsets = NULL;
11244 +struct font_wchar_metric {
11245 + struct font_wchar_metric *next;
11252 + int pre_math_space;
11253 + int italic_correction;
11254 + int subscript_correction;
11255 + char *special_device_coding;
11256 + char *subfont_name;
11260 struct font_kern_list {
11263 @@ -149,7 +181,11 @@
11265 font::font(const char *s)
11266 : ligatures(0), kern_hash_table(0), space_width(0), ch_index(0), nindices(0),
11267 - ch(0), ch_used(0), ch_size(0), special(0), widths_cache(0)
11269 +#ifdef ENABLE_MULTIBYTE
11272 + ch_used(0), ch_size(0), special(0), widths_cache(0)
11274 name = new char[strlen(s) + 1];
11276 @@ -183,6 +219,17 @@
11277 widths_cache = widths_cache->next;
11280 +#ifdef ENABLE_MULTIBYTE
11281 + struct font_wchar_metric *wcp, *nwcp;
11282 + for (wcp = wch; wcp != NULL; wcp = nwcp) {
11283 + nwcp = wcp->next;
11284 + if (wcp->special_device_coding)
11285 + delete [] wcp->special_device_coding;
11286 + if (wcp->subfont_name)
11287 + delete [] wcp->subfont_name;
11293 static int scale_round(int n, int x, int y)
11294 @@ -244,6 +291,11 @@
11296 int font::contains(int c)
11298 +#ifdef ENABLE_MULTIBYTE
11299 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11303 return c >= 0 && c < nindices && ch_index[c] >= 0;
11306 @@ -266,8 +318,31 @@
11310 +#ifdef ENABLE_MULTIBYTE
11311 +struct font_wchar_metric *
11312 +font::get_font_wchar_metric(int c)
11314 + /* XXX: c is font index, not char code... */
11315 + /* XXX: we assume wchar_code == font index code for wchars */
11316 + /* XXX: does really code conflicts with index? */
11317 + struct font_wchar_metric *wcp;
11318 + for (wcp = wch; wcp != NULL; wcp = wcp->next) {
11319 + if (wcp->start_code <= wchar_code(c) && wchar_code(c) <= wcp->end_code) {
11327 int font::get_width(int c, int point_size)
11329 +#ifdef ENABLE_MULTIBYTE
11330 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11331 + if (wcp != NULL) {
11332 + return scale(wcp->width, point_size);
11335 assert(c >= 0 && c < nindices);
11336 int i = ch_index[c];
11338 @@ -299,30 +374,60 @@
11340 int font::get_height(int c, int point_size)
11342 +#ifdef ENABLE_MULTIBYTE
11343 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11344 + if (wcp != NULL) {
11345 + return scale(wcp->height, point_size);
11348 assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11349 return scale(ch[ch_index[c]].height, point_size);
11352 int font::get_depth(int c, int point_size)
11354 +#ifdef ENABLE_MULTIBYTE
11355 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11356 + if (wcp != NULL) {
11357 + return scale(wcp->depth, point_size);
11360 assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11361 return scale(ch[ch_index[c]].depth, point_size);
11364 int font::get_italic_correction(int c, int point_size)
11366 +#ifdef ENABLE_MULTIBYTE
11367 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11368 + if (wcp != NULL) {
11369 + return scale(wcp->italic_correction, point_size);
11372 assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11373 return scale(ch[ch_index[c]].italic_correction, point_size);
11376 int font::get_left_italic_correction(int c, int point_size)
11378 +#ifdef ENABLE_MULTIBYTE
11379 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11380 + if (wcp != NULL) {
11381 + return scale(wcp->pre_math_space, point_size);
11384 assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11385 return scale(ch[ch_index[c]].pre_math_space, point_size);
11388 int font::get_subscript_correction(int c, int point_size)
11390 +#ifdef ENABLE_MULTIBYTE
11391 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11392 + if (wcp != NULL) {
11393 + return scale(wcp->subscript_correction, point_size);
11396 assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11397 return scale(ch[ch_index[c]].subscript_correction, point_size);
11399 @@ -371,12 +476,24 @@
11401 int font::get_character_type(int c)
11403 +#ifdef ENABLE_MULTIBYTE
11404 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11405 + if (wcp != NULL) {
11406 + return wcp->type;
11409 assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11410 return ch[ch_index[c]].type;
11413 int font::get_code(int c)
11415 +#ifdef ENABLE_MULTIBYTE
11416 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11417 + if (wcp != NULL) {
11421 assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11422 return ch[ch_index[c]].code;
11424 @@ -393,10 +510,26 @@
11426 const char *font::get_special_device_encoding(int c)
11428 +#ifdef ENABLE_MULTIBYTE
11429 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11431 + return wcp->special_device_coding;
11433 assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11434 return( ch[ch_index[c]].special_device_coding );
11437 +#ifdef ENABLE_MULTIBYTE
11438 +const char *font::get_subfont_name(int c)
11440 + font_wchar_metric *wcp = get_font_wchar_metric(c);
11442 + return wcp->subfont_name;
11443 + assert(c >= 0 && c < nindices && ch_index[c] >= 0);
11444 + return ch[ch_index[c]].subfont_name;
11448 void font::alloc_ch_index(int index)
11450 if (nindices == 0) {
11451 @@ -554,9 +687,11 @@
11456 // If the font can't be found, then if not_found is non-NULL, it will be set
11457 // to 1 otherwise a message will be printed.
11460 int font::load(int *not_found)
11463 @@ -570,7 +705,7 @@
11465 text_file t(fp, path);
11466 t.skip_comments = 1;
11471 t.error("missing charset command");
11472 @@ -681,6 +816,9 @@
11474 else if (strcmp(command, "charset") == 0) {
11476 +#ifdef ENABLE_MULTIBYTE
11477 + int had_range = 0;
11479 int last_index = -1;
11482 @@ -695,6 +833,11 @@
11486 +#ifdef ENABLE_MULTIBYTE
11487 + int start_code = 0;
11488 + int end_code = 0;
11489 + int nrange = sscanf(nm, "u%X..u%X", &start_code, &end_code);
11492 if (last_index == -1) {
11493 t.error("first charset entry is duplicate");
11494 @@ -711,7 +854,64 @@
11496 copy_entry(index, last_index);
11498 +#ifdef ENABLE_MULTIBYTE
11499 + else if (nrange == 2) {
11501 + font_wchar_metric *wcp = new font_wchar_metric;
11502 + wcp->start_code = start_code;
11503 + wcp->end_code = end_code;
11506 + wcp->pre_math_space = 0;
11507 + wcp->italic_correction = 0;
11508 + wcp->subscript_correction = 0;
11509 + int nparms = sscanf(p, "%d,%d,%d,%d,%d,%d",
11510 + &wcp->width, &wcp->height, &wcp->depth,
11511 + &wcp->italic_correction,
11512 + &wcp->pre_math_space,
11513 + &wcp->subscript_correction);
11514 + if (nparms < 1) {
11515 + t.error("bad width for `%1'", nm);
11518 + p = strtok(0, WS);
11520 + t.error("missing character type for `%1'", nm);
11524 + if (sscanf(p, "%d", &type) != 1) {
11525 + t.error("bad character type for `%1'", nm);
11528 + if (type < 0 || type > 255) {
11529 + t.error("character type `%1' out of range", type);
11532 + wcp->type = type;
11534 + p = strtok(0, WS);
11535 + if ((p == 0) || (strcmp(p, "--") == 0)) {
11536 + wcp->subfont_name = NULL;
11538 + wcp->subfont_name = new char[strlen(p) + 1];
11539 + strcpy(wcp->subfont_name, p);
11542 + p = strtok(0, WS);
11543 + if ((p == NULL) || (strcmp(p, "--") == 0)) {
11544 + wcp->special_device_coding = NULL;
11546 + wcp->special_device_coding = new char[strlen(p) + 1];
11547 + strcpy(wcp->special_device_coding, p);
11556 font_char_metric metric;
11559 @@ -747,6 +947,16 @@
11560 t.error("missing code for `%1'", nm);
11563 +#ifdef ENABLE_MULTIBYTE
11564 + char *subp = strchr(p, ':');
11567 + metric.subfont_name = new char[strlen(subp) + 1];
11568 + strcpy(metric.subfont_name, subp);
11570 + metric.subfont_name = NULL;
11574 metric.code = (int)strtol(p, &ptr, 0);
11575 if (metric.code == 0 && ptr == p) {
11576 @@ -777,7 +987,11 @@
11580 +#ifdef ENABLE_MULTIBYTE
11581 + if (!had_range && last_index == -1) {
11583 if (last_index == -1) {
11585 t.error("I didn't seem to find any characters");
11588 @@ -811,6 +1025,11 @@
11589 { "biggestfont", &font::biggestfont },
11590 { "spare2", &font::spare2 },
11591 { "sizescale", &font::sizescale }
11592 +#ifdef ENABLE_MULTIBYTE
11594 + { "lowerwchar", &font::lowerwchar },
11595 + { "wcharkern", &font::wcharkern }
11599 int font::load_desc()
11600 @@ -981,6 +1200,67 @@
11602 else if (strcmp("use_charnames_in_special", p) == 0)
11603 use_charnames_in_special = 1;
11604 +#ifdef ENABLE_MULTIBYTE
11605 + else if (strcmp("fontset", p) == 0) {
11606 + /* fontset <primary-fontname> <fontname> <code>..<code> [ondemand] */
11607 + p = strtok(0, WS);
11609 + t.error("no primary font for fontset");
11612 + char *pfont = NULL;
11613 + if (strcmp(p, "-") != 0) {
11614 + pfont = new char[strlen(p)+1];
11615 + strcpy(pfont, p);
11617 + p = strtok(0, WS);
11619 + t.error("no fontset font for `%1'",
11620 + pfont ? pfont : "-");
11623 + int fontset_font = 0;
11624 + for (int i = 0; i < nfonts; i++) {
11625 + if (strcmp(p, font_name_table[i]) == 0) {
11626 + fontset_font = i;
11630 + if (fontset_font == nfonts) {
11631 + t.error("fontset font `%1' for font `%2' not defined",
11632 + p, pfont ? pfont : "-");
11635 + p = strtok(0, WS);
11637 + t.error("no range for fontset font `%1' for font `%2'",
11638 + font_name_table[fontset_font],
11639 + pfont ? pfont : "-");
11642 + wchar start_code = 0;
11643 + wchar end_code = 0;
11644 + int nparms = sscanf(p, "%x..%x", &start_code, &end_code);
11645 + if (nparms != 2) {
11646 + t.error("invalid range format `%1'", p);
11649 + p = strtok(0, WS);
11650 + int on_demand = 0;
11651 + if (p != NULL && strcmp(p, "ondemand") == 0) {
11655 + fontset_list *fl = new fontset_list;
11656 + fl->primary_font_name = pfont;
11657 + fl->fontset_font = fontset_font;
11658 + fl->start_code = start_code;
11659 + fl->end_code = end_code;
11660 + fl->on_demand = on_demand;
11661 + fl->next = fontsets;
11665 else if (strcmp("charset", p) == 0)
11667 else if (unknown_desc_command_handler) {
11668 @@ -1020,6 +1300,39 @@
11672 +#ifdef ENABLE_MULTIBYTE
11674 +font::get_fontset_font(const char *fname, wchar wc) {
11675 + fontset_list *fl;
11676 + int avail_fontno = -1;
11677 + wc = wchar_code(wc);
11678 + for (fl = fontsets; fl != NULL; fl = fl->next) {
11679 + if (fl->primary_font_name == NULL) {
11680 + if (fl->start_code <= wc && wc <= fl->end_code) {
11681 + avail_fontno = fl->fontset_font;
11684 + else if (fname && strcmp(fl->primary_font_name, fname) == 0) {
11685 + if (fl->start_code <= wc && wc <= fl->end_code) {
11686 + return fl->fontset_font;
11690 + return avail_fontno;
11694 +font::is_on_demand(int fontno) {
11695 + fontset_list *fl;
11696 + for (fl = fontsets; fl != NULL; fl = fl->next) {
11697 + if (fl->fontset_font == fontno) {
11698 + return fl->on_demand;
11705 void font::handle_unknown_font_command(const char *, const char *,
11708 diff -Naur groff-1.18.1.4.orig/src/libs/libgroff/fontfile.cc groff-1.18.1.4/src/libs/libgroff/fontfile.cc
11709 --- groff-1.18.1.4.orig/src/libs/libgroff/fontfile.cc 2002-05-31 14:31:01.000000000 +0000
11710 +++ groff-1.18.1.4/src/libs/libgroff/fontfile.cc 2006-10-18 18:54:44.000000000 +0000
11712 #include <assert.h>
11713 #include <stdlib.h>
11715 +#include "encoding.h" // XXX: ukai
11717 #include "searchpath.h"
11718 #include "device.h"
11722 int font::vert = 1;
11723 +#ifdef ENABLE_MULTIBYTE
11724 +int font::lowerwchar = 0;
11725 +int font::wcharkern = 0;
11727 int font::unitwidth = 0;
11728 int font::paperwidth = 0;
11729 int font::paperlength = 0;
11730 diff -Naur groff-1.18.1.4.orig/src/libs/libgroff/nametoindex.cc groff-1.18.1.4/src/libs/libgroff/nametoindex.cc
11731 --- groff-1.18.1.4.orig/src/libs/libgroff/nametoindex.cc 2002-04-05 20:55:38.000000000 +0000
11732 +++ groff-1.18.1.4/src/libs/libgroff/nametoindex.cc 2006-10-18 18:54:44.000000000 +0000
11735 #include <assert.h>
11736 #include <stdlib.h>
11737 +#include "encoding.h" // XXX: ukai
11738 #include "errarg.h"
11742 character_indexer();
11743 ~character_indexer();
11744 int ascii_char_index(unsigned char);
11745 +#ifdef ENABLE_MULTIBYTE
11746 + int wchar_index(wchar);
11748 int named_char_index(const char *);
11749 int numbered_char_index(int);
11752 return ascii_index[c];
11755 +#ifdef ENABLE_MULTIBYTE
11756 +int character_indexer::wchar_index(wchar wc)
11758 + return wc; /* XXX: wchar code == index */
11762 int character_indexer::numbered_char_index(int n)
11764 if (n >= 0 && n < NSMALL) {
11765 @@ -103,6 +114,30 @@
11766 int font::name_to_index(const char *s)
11768 assert(s != 0 && s[0] != '\0' && s[0] != ' ');
11769 +#ifdef ENABLE_MULTIBYTE
11772 + wchar wc = input_encoding->make_wchar(s[0], (const unsigned char *)s, &i);
11774 + * if wchar can be represented in single byte (<256),
11775 + * it should be the same as char<wc>.
11777 + if (is_wchar_singlebyte(wc)) {
11778 + return indexer.ascii_char_index(wchar_singlebyte(wc));
11780 + if (is_wchar_code(wc)) {
11781 + return indexer.wchar_index(wc);
11783 + /* XXX: uA1A1 and \xa1a1 are synonyms */
11784 + if (s[0] == 'u') {
11786 + long n = strtol(s + 1, &res, 16);
11787 + if (res != s + 1 && *res == '\0') {
11788 + return indexer.wchar_index(n);
11794 return indexer.ascii_char_index(s[0]);
11795 /* char128 and \200 are synonyms */
11796 @@ -115,3 +150,9 @@
11797 return indexer.named_char_index(s);
11800 +#ifdef ENABLE_MULTIBYTE
11801 +int font::wchar_index(wchar wc)
11803 + return indexer.wchar_index(wc);
11806 diff -Naur groff-1.18.1.4.orig/src/libs/libgroff/searchpath.cc groff-1.18.1.4/src/libs/libgroff/searchpath.cc
11807 --- groff-1.18.1.4.orig/src/libs/libgroff/searchpath.cc 2001-08-19 21:32:28.000000000 +0000
11808 +++ groff-1.18.1.4/src/libs/libgroff/searchpath.cc 2006-10-18 18:54:44.000000000 +0000
11810 with groff; see the file COPYING. If not, write to the Free Software
11811 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
11813 +#include "encoding.h"
11816 #include <stdlib.h>
11817 diff -Naur groff-1.18.1.4.orig/src/libs/libgroff/tmpfile.cc groff-1.18.1.4/src/libs/libgroff/tmpfile.cc
11818 --- groff-1.18.1.4.orig/src/libs/libgroff/tmpfile.cc 2002-09-06 07:50:42.000000000 +0000
11819 +++ groff-1.18.1.4/src/libs/libgroff/tmpfile.cc 2006-10-18 18:54:44.000000000 +0000
11822 #include <stdlib.h>
11824 +#include "encoding.h"
11826 #include "errarg.h"
11828 diff -Naur groff-1.18.1.4.orig/src/preproc/eqn/box.cc groff-1.18.1.4/src/preproc/eqn/box.cc
11829 --- groff-1.18.1.4.orig/src/preproc/eqn/box.cc 2002-04-04 14:04:45.000000000 +0000
11830 +++ groff-1.18.1.4/src/preproc/eqn/box.cc 2006-10-18 18:54:44.000000000 +0000
11833 int nroff = 0; // should we grok ndefine or tdefine?
11839 } param_table[] = {
11840 diff -Naur groff-1.18.1.4.orig/src/preproc/eqn/eqn.y groff-1.18.1.4/src/preproc/eqn/eqn.y
11841 --- groff-1.18.1.4.orig/src/preproc/eqn/eqn.y 2000-02-06 09:38:01.000000000 +0000
11842 +++ groff-1.18.1.4/src/preproc/eqn/eqn.y 2006-10-18 18:54:44.000000000 +0000
11844 #include <string.h>
11845 #include <stdlib.h>
11847 +#include "encoding.h" /* XXX */
11850 extern int non_empty_flag;
11851 diff -Naur groff-1.18.1.4.orig/src/preproc/eqn/lex.cc groff-1.18.1.4/src/preproc/eqn/lex.cc
11852 --- groff-1.18.1.4.orig/src/preproc/eqn/lex.cc 2002-02-10 01:22:11.000000000 +0000
11853 +++ groff-1.18.1.4/src/preproc/eqn/lex.cc 2006-10-18 18:54:44.000000000 +0000
11855 #include "eqn_tab.h"
11856 #include "stringclass.h"
11857 #include "ptable.h"
11858 +#include "encoding.h"
11860 struct definition {
11862 @@ -375,6 +376,11 @@
11863 lex_error("invalid input character code %1", c);
11866 +#ifdef ENABLE_MULTIBYTE
11867 + if (input_encoding->is_wchar_byte(c)) {
11868 + line += char(getc(fp));
11874 diff -Naur groff-1.18.1.4.orig/src/preproc/eqn/main.cc groff-1.18.1.4/src/preproc/eqn/main.cc
11875 --- groff-1.18.1.4.orig/src/preproc/eqn/main.cc 2002-02-19 16:28:31.000000000 +0000
11876 +++ groff-1.18.1.4/src/preproc/eqn/main.cc 2006-10-18 18:54:44.000000000 +0000
11877 @@ -258,6 +258,7 @@
11878 program_name = argv[0];
11879 static char stderr_buf[BUFSIZ];
11880 setbuf(stderr, stderr_buf);
11881 + init_encoding_handler();
11883 int load_startup_file = 1;
11884 static const struct option long_options[] = {
11885 diff -Naur groff-1.18.1.4.orig/src/preproc/eqn/text.cc groff-1.18.1.4/src/preproc/eqn/text.cc
11886 --- groff-1.18.1.4.orig/src/preproc/eqn/text.cc 2000-02-06 09:38:06.000000000 +0000
11887 +++ groff-1.18.1.4/src/preproc/eqn/text.cc 2006-10-18 18:54:44.000000000 +0000
11888 @@ -21,13 +21,20 @@
11891 #include "ptable.h"
11892 +#include "encoding.h"
11894 class char_box : public simple_box {
11896 +#ifdef ENABLE_MULTIBYTE
11899 char next_is_italic;
11900 char prev_is_italic;
11902 char_box(unsigned char);
11903 +#ifdef ENABLE_MULTIBYTE
11904 + char_box(unsigned char, wchar);
11906 void debug_print();
11909 @@ -165,11 +172,22 @@
11912 char_box::char_box(unsigned char cc)
11913 -: c(cc), next_is_italic(0), prev_is_italic(0)
11915 +#ifdef ENABLE_MULTIBYTE
11918 + next_is_italic(0), prev_is_italic(0)
11920 spacing_type = char_table[c].spacing_type;
11923 +#ifdef ENABLE_MULTIBYTE
11924 +char_box::char_box(unsigned char cc, wchar wc)
11925 +: c(cc), wc(wc), next_is_italic(0), prev_is_italic(0)
11930 void char_box::hint(unsigned flags)
11932 if (flags & HINT_PREV_IS_ITALIC)
11933 @@ -188,7 +206,11 @@
11935 fputs("\\e", stdout);
11937 +#ifdef ENABLE_MULTIBYTE
11938 + output_encoding->put_wchar(wc, stdout);
11942 if (!next_is_italic)
11943 fputs("\\/", stdout);
11945 @@ -497,6 +519,14 @@
11949 +#ifdef ENABLE_MULTIBYTE
11950 + if (input_encoding->is_wchar_byte(c)) {
11952 + wchar wc = input_encoding->make_wchar(c, (unsigned char *)s, &i);
11953 + b = new char_box('A', wc); // char_info of wc is same the 'A'.
11957 b = new char_box(c);
11960 diff -Naur groff-1.18.1.4.orig/src/preproc/html/pre-html.cc groff-1.18.1.4/src/preproc/html/pre-html.cc
11961 --- groff-1.18.1.4.orig/src/preproc/html/pre-html.cc 2002-09-05 23:37:01.000000000 +0000
11962 +++ groff-1.18.1.4/src/preproc/html/pre-html.cc 2006-10-18 18:54:44.000000000 +0000
11964 #define DEFAULT_IMAGE_RES 100 // number of pixels per inch resolution
11965 #define IMAGE_BOARDER_PIXELS 0
11966 #define INLINE_LEADER_CHAR '\\'
11967 +#define A4_LENGTH 841890 // taken from devps/Makefile.sub
11968 +#define LETTER_LENGTH 792000 // taken from devps/Makefile.sub
11969 +#define A4_OFFSET 0
11970 +#define LETTER_OFFSET 50 // 50/72 of an inch
11972 #define TRANSPARENT "-background white -transparent white"
11973 #define MIN_ALPHA_BITS 0
11974 @@ -104,6 +108,7 @@
11975 static char *macroset_template= NULL; // image template passed to troff by -D
11976 static int troff_arg = 0; // troff arg index
11977 static char *image_dir = NULL; // user specified image directory
11978 +static char *gsPaper = NULL; // the paper size that gs must use
11979 static int textAlphaBits = MAX_ALPHA_BITS;
11980 static int graphicAlphaBits = MAX_ALPHA_BITS;
11981 static char *antiAlias = NULL; // antialias arguments we pass to gs.
11982 @@ -211,6 +216,54 @@
11986 + * get_papersize - returns an integer determining the paper length from
11990 +static int get_papersize (void)
11995 + f = font_path.open_file("devps/DESC", &pathp);
11997 + fatal("can't open devps/DESC");
11998 + while (get_line(f)) {
11999 + int n = sscanf(linebuf, "paperlength %d", &res);
12004 + if (!strncmp(linebuf, "papersize", 9)) {
12006 + char *p = linebuf + 9;
12007 + while (*p == ' ' || *p == '\t')
12009 + for (p = strtok(p, " \t"); p; p = strtok(0, " \t")) {
12010 + if (font::scan_papersize(p, 0, &length, 0)) {
12012 + return int(length * postscriptRes + 0.5);
12015 + fatal("bad argument to `papersize' keyword in devps/DESC");
12018 + fatal("can't find `papersize' or `paperlength' keyword in devps/DESC");
12023 + * determine_vertical_offset - works out the default vertical offset from
12024 + * the page length
12027 +static void determine_vertical_offset (void)
12029 + vertical_offset = ((A4_LENGTH-get_papersize())*72)/postscriptRes;
12030 + gsPaper = "-sPAPERSIZE=a4";
12034 * html_system - a wrapper for system()
12037 @@ -1469,6 +1522,7 @@
12040 postscriptRes = get_resolution();
12041 + determine_vertical_offset();
12042 i = scanArguments(argc, argv);
12045 diff -Naur groff-1.18.1.4.orig/src/preproc/refer/command.cc groff-1.18.1.4/src/preproc/refer/command.cc
12046 --- groff-1.18.1.4.orig/src/preproc/refer/command.cc 2002-02-10 01:22:12.000000000 +0000
12047 +++ groff-1.18.1.4/src/preproc/refer/command.cc 2006-10-18 18:54:44.000000000 +0000
12048 @@ -632,7 +632,7 @@
12049 ? means that the previous argument is optional, * means that the
12050 previous argument can occur any number of times. */
12056 const char *arg_types;
12057 diff -Naur groff-1.18.1.4.orig/src/roff/groff/groff.cc groff-1.18.1.4/src/roff/groff/groff.cc
12058 --- groff-1.18.1.4.orig/src/roff/groff/groff.cc 2002-09-22 08:35:48.000000000 +0000
12059 +++ groff-1.18.1.4/src/roff/groff/groff.cc 2006-10-18 18:54:44.000000000 +0000
12060 @@ -107,6 +107,7 @@
12061 program_name = argv[0];
12062 static char stderr_buf[BUFSIZ];
12063 setbuf(stderr, stderr_buf);
12064 + init_encoding_handler();
12065 assert(NCOMMANDS <= MAX_COMMANDS);
12066 string Pargs, Largs, Fargs;
12068 diff -Naur groff-1.18.1.4.orig/src/roff/groff/groff.man groff-1.18.1.4/src/roff/groff/groff.man
12069 --- groff-1.18.1.4.orig/src/roff/groff/groff.man 2002-07-13 09:28:17.000000000 +0000
12070 +++ groff-1.18.1.4/src/roff/groff/groff.man 2006-10-18 18:54:44.000000000 +0000
12072 A copy of the Free Documentation License is included as a file called
12073 FDL in the main directory of the groff source package.
12076 +A copy of the GNU Free Documentation License is also available in this
12077 +Debian package as /usr/share/doc/groff-base/copyright.
12080 .\" --------------------------------------------------------------------
12082 @@ -118,7 +122,7 @@
12083 .c --------------------------------------------------------------------
12084 .c ShortOpt ([char [punct]])
12086 -.c `-c' somwhere in the text
12087 +.c `-c' somewhere in the text
12088 .c second arg is punctuation
12091 @@ -130,7 +134,7 @@
12092 .c --------------------------------------------------------------------
12093 .c LongOpt ([name [punct]])
12095 -.c `--name' somwhere in the text
12096 +.c `--name' somewhere in the text
12097 .c second arg is punctuation
12100 @@ -314,7 +318,7 @@
12102 program allows to control the whole
12104 -system by comand line options.
12105 +system by command line options.
12107 This is a great simplification in comparison to the classical case (which
12109 @@ -610,7 +614,7 @@
12112 .\" --------------------------------------------------------------------
12113 -.SS Tranparent Options
12114 +.SS Transparent Options
12115 .\" --------------------------------------------------------------------
12117 The following options are transparently handed over to the formatter
12118 @@ -695,7 +699,7 @@
12119 is much easier than
12120 .IR "classical roff" .
12122 -This section gives an overview of the parts that consitute the groff
12123 +This section gives an overview of the parts that constitute the groff
12127 @@ -948,6 +952,10 @@
12128 Text output using the EBCDIC code page IBM cp1047 (e.g. OS/390 Unix).
12132 +Text output using the Japanese-EUC character set.
12138 @@ -956,6 +964,12 @@
12143 +For typewriter-like devices. Unlike
12145 +this device is 8 bit clean. This device is intended to be used
12146 +for codesets other than ASCII and ISO-8859-1.
12149 Text output using the ISO Latin-1 (ISO 8859-1) character set; see
12150 .BR iso_8859_1 (7).
12151 @@ -1031,7 +1045,7 @@
12154 Today, most printing or drawing hardware is handled by the operating
12155 -system, by device drivers, or by software interfaces, usally accepting
12156 +system, by device drivers, or by software interfaces, usually accepting
12159 Consequently, there isn't an urgent need for more hardware device
12160 diff -Naur groff-1.18.1.4.orig/src/roff/nroff/nroff.man groff-1.18.1.4/src/roff/nroff/nroff.man
12161 --- groff-1.18.1.4.orig/src/roff/nroff/nroff.man 2002-02-07 08:36:54.000000000 +0000
12162 +++ groff-1.18.1.4/src/roff/nroff/nroff.man 2006-10-18 18:54:44.000000000 +0000
12164 command using groff.
12173 are valid arguments for the
12174 diff -Naur groff-1.18.1.4.orig/src/roff/nroff/nroff.sh groff-1.18.1.4/src/roff/nroff/nroff.sh
12175 --- groff-1.18.1.4.orig/src/roff/nroff/nroff.sh 2002-02-07 08:36:54.000000000 +0000
12176 +++ groff-1.18.1.4/src/roff/nroff/nroff.sh 2006-10-18 18:54:44.000000000 +0000
12184 case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
12190 + ja_JP.ujis | ja_JP.eucJP)
12193 case "$LESSCHARSET" in
12209 -[iptSUC] | -[mrno]*)
12211 - -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047)
12212 + -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon)
12215 # ignore other devices
12216 diff -Naur groff-1.18.1.4.orig/src/roff/troff/charinfo.h groff-1.18.1.4/src/roff/troff/charinfo.h
12217 --- groff-1.18.1.4.orig/src/roff/troff/charinfo.h 2002-03-22 16:11:18.000000000 +0000
12218 +++ groff-1.18.1.4/src/roff/troff/charinfo.h 2006-10-18 18:54:44.000000000 +0000
12221 unsigned char special_translation;
12222 unsigned char hyphenation_code;
12223 +#ifdef ENABLE_MULTIBYTE
12224 + unsigned short flags;
12226 unsigned char flags;
12228 unsigned char ascii_code;
12229 unsigned char asciify_code;
12230 +#ifdef ENABLE_MULTIBYTE
12231 + wchar wchar_code;
12234 char transparent_translate; // non-zero means translation applies
12235 // to transparent throughput
12237 OVERLAPS_VERTICALLY = 16,
12240 +#ifdef ENABLE_MULTIBYTE
12242 + DONT_BREAK_BEFORE = 0x100, // 256, pre kinsoku
12243 + DONT_BREAK_AFTER = 0x200 // 512, post kinsoku
12249 int get_translation_input();
12250 charinfo *get_translation(int = 0);
12251 void set_translation(charinfo *, int, int);
12252 +#ifdef ENABLE_MULTIBYTE
12253 + void set_flags(unsigned short);
12255 void set_flags(unsigned char);
12257 void set_special_translation(int, int);
12258 int get_special_translation(int = 0);
12259 macro *set_macro(macro *, int = 0);
12260 @@ -84,6 +100,12 @@
12264 +#ifdef ENABLE_MULTIBYTE
12265 + wchar get_wchar_code();
12266 + void set_wchar_code(wchar);
12267 + int cannot_break_before(); // pre kinsoku
12268 + int cannot_break_after(); // post kinsoku
12270 symbol *get_symbol();
12273 @@ -131,6 +153,18 @@
12277 +#ifdef ENABLE_MULTIBYTE
12278 +inline int charinfo::cannot_break_before()
12280 + return flags & DONT_BREAK_BEFORE;
12283 +inline int charinfo::cannot_break_after()
12285 + return flags & DONT_BREAK_AFTER;
12289 inline charinfo *charinfo::get_translation(int transparent_throughput)
12291 return (transparent_throughput && !transparent_translate
12292 @@ -153,7 +187,18 @@
12293 return (translate_input ? asciify_code : 0);
12296 +#ifdef ENABLE_MULTIBYTE
12297 +inline wchar charinfo::get_wchar_code()
12299 + return wchar_code;
12303 +#ifdef ENABLE_MULTIBYTE
12304 +inline void charinfo::set_flags(unsigned short c)
12306 inline void charinfo::set_flags(unsigned char c)
12311 diff -Naur groff-1.18.1.4.orig/src/roff/troff/env.cc groff-1.18.1.4/src/roff/troff/env.cc
12312 --- groff-1.18.1.4.orig/src/roff/troff/env.cc 2002-10-03 15:53:06.000000000 +0000
12313 +++ groff-1.18.1.4/src/roff/troff/env.cc 2006-10-18 18:54:44.000000000 +0000
12315 #include "charinfo.h"
12316 #include "macropath.h"
12318 +#include "font.h" // ENABLE_MULTIBYTE only?
12321 symbol default_family("T");
12322 @@ -264,6 +265,13 @@
12323 void environment::add_char(charinfo *ci)
12326 +#ifdef ENABLE_MULTIBYTE
12327 + int fontno = get_font(); // current font #
12328 + int fontset_font = get_fontset_fontno(fontno, ci->get_wchar_code());
12329 + if (fontno >= 0 && fontno != fontset_font) {
12330 + change_curfont(fontset_font);
12335 // don't allow fields in dummy environments
12336 @@ -286,11 +294,95 @@
12340 +#ifdef ENABLE_MULTIBYTE
12342 + * XXX: NEED REWRITE TO BE MORE GENERIC
12343 + * This code is based on jgroff
12344 + * about kerning between ASCII and EUC-JP
12346 + if (!ci->get_wchar_code()) {
12348 + * This node is a ASCII character node.
12350 + if (!pre_char_is_ascii && enable_wcharkern && !hwkern.is_zero()) {
12352 + * Insert a little space node between EUC and ASCII.
12354 + word_space_node *ws;
12356 + if (ci->ends_sentence() || ci->transparent() || ci->cannot_break_before())
12357 + ws = new unbreakable_space_node(hwkern.to_units(), get_fill_color());
12359 + ws = new word_space_node(hwkern.to_units(),
12360 + get_fill_color(),
12361 + new width_list(env_space_width(this),
12362 + env_sentence_space_width(this)));
12363 + curenv->add_node(ws);
12365 + pre_char_is_ascii = 1;
12366 + pre_wchar_cannot_break_after = 0;
12369 + * This node is a EUC charcater node.
12371 + if (!pre_char_is_ascii && line->get_node_type() == NODE_NEWLINE_SPACE) {
12373 + * remove a newline-node.
12375 + node *ns_node = line;
12376 + line = line->next;
12377 + width_total -= ns_node->width();
12378 + space_total -= ns_node->nspaces();
12382 + if (!pre_wchar_cannot_break_after && !ci->cannot_break_before()) {
12384 + * add a zero-width-space-node before EUC charcater node.
12386 + add_node(new kword_space_node(get_fill_color()));
12387 + met_with_kword_space = 1;
12389 + pre_wchar_cannot_break_after = ci->cannot_break_after();
12391 + if (pre_char_is_ascii && enable_wcharkern && !hwkern.is_zero()) {
12393 + * Insert a little space node between ASCII and EUC.
12395 + unbreakable_space_node *ws =
12396 + new unbreakable_space_node(hwkern.to_units(), get_fill_color());
12397 + curenv->add_node(ws);
12399 + pre_char_is_ascii = 0;
12401 + if (!vlower.is_zero()) {
12403 + * Lower a EUC charcater node.
12405 + curenv->add_node(new vmotion_node(vlower.to_units(),
12406 + get_fill_color())); // lower
12410 if (ci != hyphen_indicator_char)
12411 line = line->add_char(ci, this, &width_total, &space_total);
12413 line = line->add_discretionary_hyphen();
12414 +#ifdef ENABLE_MULTIBYTE
12415 + enable_wcharkern = 1;
12416 + if (!vlower.is_zero() && ci->get_wchar_code()) {
12418 + * Raise a EUC charcater node.
12420 + curenv->add_node(new vmotion_node(-vlower.to_units(),
12421 + get_fill_color())); // raise
12425 +#ifdef ENABLE_MULTIBYTE
12426 + if (fontset_font >= 0 && fontno != fontset_font)
12427 + change_curfont(fontno); /* restore saved font # */
12431 node *environment::make_char_node(charinfo *ci)
12432 @@ -394,7 +486,11 @@
12436 +#ifdef ENABLE_MULTIBYTE
12437 + add_node(new newline_space_node(x, get_fill_color())); // This node may be removed
12439 add_node(new word_space_node(x, get_fill_color(), w));
12441 possibly_break_line(0, spread_flag);
12444 @@ -480,6 +576,35 @@
12445 warning(WARN_FONT, "bad font number");
12448 +#ifdef ENABLE_MULTIBYTE
12449 +void environment::change_curfont(symbol nm)
12451 + int n = symbol_fontno(nm);
12453 + n = next_available_font_position();
12454 + if (!mount_font(n, nm))
12460 +void environment::change_curfont(int n)
12462 + if (is_good_fontno(n))
12465 + error("bad font number");
12468 +void environment::set_encoding(symbol enc)
12470 + if (enc.is_null() || enc.is_empty())
12472 + select_input_encoding_handler(enc.contents());
12473 + select_output_encoding_handler(enc.contents());
12475 +#endif /* ENABLE_MULTIBYTE */
12477 void environment::set_family(symbol fam)
12480 @@ -649,6 +774,16 @@
12482 no_break_control_char('\''),
12483 hyphen_indicator_char(0)
12484 +#ifdef ENABLE_MULTIBYTE
12486 + stretch_threshold(0),
12487 + pre_wchar_cannot_break_after(0),
12488 + pre_char_is_ascii(-1),
12489 + enable_wcharkern(0),
12490 + met_with_kword_space(0),
12491 + hwkern(font::wcharkern),
12492 + vlower(font::lowerwchar)
12495 prev_family = family = lookup_family(default_family);
12496 prev_fontno = fontno = 1;
12497 @@ -739,6 +874,16 @@
12498 control_char(e->control_char),
12499 no_break_control_char(e->no_break_control_char),
12500 hyphen_indicator_char(e->hyphen_indicator_char)
12501 +#ifdef ENABLE_MULTIBYTE
12503 + stretch_threshold(e->stretch_threshold),
12504 + pre_wchar_cannot_break_after(0),
12505 + pre_char_is_ascii(-1),
12506 + enable_wcharkern(0),
12507 + met_with_kword_space(0),
12508 + hwkern(font::wcharkern),
12509 + vlower(font::lowerwchar)
12514 @@ -1781,6 +1926,9 @@
12515 target_text_length = line_length - saved_indent;
12518 +#ifdef ENABLE_MULTIBYTE
12519 + enable_wcharkern = 0;
12523 hunits environment::get_hyphenation_space()
12524 @@ -1819,6 +1967,23 @@
12528 +#ifdef ENABLE_MULTIBYTE
12529 +void stretch_threshold_request()
12532 + if (has_arg() && get_integer(&n)) {
12533 + if (n < 0 || n > 100) {
12534 + warning(WARN_RANGE, "stretch threshold value %1 out of range", n);
12536 + curenv->stretch_threshold = n;
12539 + curenv->stretch_threshold = 0;
12545 breakpoint *environment::choose_breakpoint()
12547 hunits x = width_total;
12548 @@ -2014,6 +2179,30 @@
12549 // When a macro follows a paragraph in fill mode, the
12550 // current line should not be empty.
12551 || (width_total - line->width()) > target_text_length)) {
12552 +#ifdef ENABLE_MULTIBYTE
12553 + if (met_with_kword_space) {
12554 + node *linep = line;
12556 + while (linep->next) {
12557 + if (linep->next->get_node_type() == NODE_GLYPH)
12559 + else if (linep->next->get_node_type() == NODE_KWORD_SPACE)
12561 + linep = linep->next;
12565 + * delete a kword_space_node which is in the top of line.
12567 + linep = prep->next;
12568 + prep->next = linep->next;
12569 + width_total -= linep->width();
12570 + space_total -= linep->nspaces();
12573 + met_with_kword_space = 0;
12576 hyphenate_line(start_here);
12577 breakpoint *bp = choose_breakpoint();
12579 @@ -2026,6 +2215,15 @@
12580 bp->nd->split(bp->index, &pre, &post);
12582 hunits extra_space_width = H0;
12583 +#ifdef ENABLE_MULTIBYTE
12584 + int sv_adjust_mode = adjust_mode;
12585 + if (stretch_threshold) {
12586 + int ratio = bp->width * 100 / target_text_length;
12587 + if (ratio < stretch_threshold) {
12588 + adjust_mode = ADJUST_LEFT;
12592 switch(adjust_mode) {
12594 if (bp->nspaces != 0)
12595 @@ -2041,6 +2239,9 @@
12596 saved_indent += target_text_length - bp->width;
12599 +#ifdef ENABLE_MULTIBYTE
12600 + adjust_mode = sv_adjust_mode;
12602 distribute_space(pre, bp->nspaces, extra_space_width);
12603 hunits output_width = bp->width + extra_space_width;
12604 input_line_start -= output_width;
12605 @@ -3237,6 +3438,9 @@
12606 init_request("hys", hyphenation_space_request);
12607 init_request("hym", hyphenation_margin_request);
12608 init_request("pvs", post_vertical_spacing);
12609 +#ifdef ENABLE_MULTIBYTE
12610 + init_request("stt", stretch_threshold_request);
12612 init_int_env_reg(".f", get_font);
12613 init_int_env_reg(".b", get_bold);
12614 init_hunits_env_reg(".i", get_indent);
12615 diff -Naur groff-1.18.1.4.orig/src/roff/troff/env.h groff-1.18.1.4/src/roff/troff/env.h
12616 --- groff-1.18.1.4.orig/src/roff/troff/env.h 2002-09-20 14:39:32.000000000 +0000
12617 +++ groff-1.18.1.4/src/roff/troff/env.h 2006-10-18 18:54:44.000000000 +0000
12618 @@ -213,6 +213,15 @@
12619 unsigned char control_char;
12620 unsigned char no_break_control_char;
12621 charinfo *hyphen_indicator_char;
12622 +#ifdef ENABLE_MULTIBYTE
12623 + int stretch_threshold;
12624 + int pre_wchar_cannot_break_after;
12625 + int pre_char_is_ascii;
12626 + int enable_wcharkern;
12627 + int met_with_kword_space;
12632 environment(symbol);
12633 environment(const environment *); // for temporary environment
12634 @@ -279,6 +288,10 @@
12635 void wrap_up_tab();
12636 void set_font(int);
12637 void set_font(symbol);
12638 +#ifdef ENABLE_MULTIBYTE
12639 + void change_curfont(int);
12640 + void change_curfont(symbol);
12642 void set_family(symbol);
12643 void set_size(int);
12644 void set_char_height(int);
12645 @@ -309,6 +322,9 @@
12646 const char *get_point_size_string();
12647 const char *get_requested_point_size_string();
12648 void output_pending_lines();
12649 +#ifdef ENABLE_MULTIBYTE
12650 + void set_encoding(symbol);
12653 friend void title_length();
12654 friend void space_size();
12655 @@ -347,6 +363,9 @@
12656 #ifdef WIDOW_CONTROL
12657 friend void widow_control_request();
12658 #endif /* WIDOW_CONTROL */
12659 +#ifdef ENABLE_MULTIBYTE
12660 + friend void stretch_threshold_request();
12663 friend void do_divert(int append, int boxing);
12665 diff -Naur groff-1.18.1.4.orig/src/roff/troff/input.cc groff-1.18.1.4/src/roff/troff/input.cc
12666 --- groff-1.18.1.4.orig/src/roff/troff/input.cc 2002-10-03 15:52:20.000000000 +0000
12667 +++ groff-1.18.1.4/src/roff/troff/input.cc 2006-10-18 18:54:44.000000000 +0000
12669 #include "macropath.h"
12672 +#include "encoding.h" // XXX: ukai
12674 // Needed for getpid() and isatty()
12677 charinfo *charset_table[256];
12678 unsigned char hpf_code_table[256];
12680 +#ifdef ENABLE_MULTIBYTE
12681 +charinfo *wcharset_table_entry(wchar wc);
12683 +#endif /* ENABLE_MULTIBYTE */
12685 static int warning_mask = DEFAULT_WARNING_MASK;
12686 static int inhibit_errors = 0;
12687 static int ignoring = 0;
12688 @@ -148,6 +154,20 @@
12689 input_iterator *make_temp_iterator(const char *);
12690 const char *input_char_description(int);
12692 +#ifdef ENABLE_MULTIBYTE
12696 + symbol e = get_long_name(1);
12697 + if (e.is_null()) {
12701 + curenv->set_encoding(e);
12707 void set_escape_char()
12709 @@ -1524,6 +1544,19 @@
12710 type = TOKEN_NEWLINE;
12713 +#ifdef ENABLE_MULTIBYTE
12714 +class encoding_istream_input : public encoding_istream {
12718 + encoding_istream_input(node **n) : np(n) {};
12719 + ~encoding_istream_input() {};
12720 + int getbyte() { return input_stack::get(np); };
12721 + int peekbyte() { return input_stack::peek(); };
12722 + void ungetbyte(int ch) { return; };
12729 @@ -1533,6 +1566,10 @@
12733 +#ifdef ENABLE_MULTIBYTE
12734 + encoding_istream_input einput(&n);
12737 int cc = input_stack::get(&n);
12738 if (cc != escape_char || escape_char == 0) {
12739 handle_normal_char:
12740 @@ -1686,8 +1723,22 @@
12744 +#ifdef ENABLE_MULTIBYTE
12745 + wc = input_encoding->make_wchar(cc, einput);
12746 + if (is_wchar_code(wc)) {
12747 + type = TOKEN_WCHAR;
12749 + } else if (wc == ' ') {
12750 + type = TOKEN_SPACE;
12753 + type = TOKEN_CHAR;
12763 @@ -2057,6 +2108,10 @@
12767 +#ifdef ENABLE_MULTIBYTE
12768 + case TOKEN_WCHAR:
12769 + return wc == t.wc;
12771 case TOKEN_SPECIAL:
12773 case TOKEN_NUMBERED_CHAR:
12774 @@ -2563,6 +2618,27 @@
12778 +#ifdef ENABLE_MULTIBYTE
12779 + case token::TOKEN_WCHAR:
12781 + wchar wch = tok.wc;
12783 + if (possibly_handle_first_page_transition())
12787 + curenv->add_char(wcharset_table_entry(wch));
12789 + if (tok.type != token::TOKEN_WCHAR)
12793 + suppress_next = 1;
12798 +#endif /* ENABLE_MULTIBYTE */
12799 case token::TOKEN_TRANSPARENT:
12802 @@ -6018,6 +6094,10 @@
12804 if (type == TOKEN_CHAR)
12805 return charset_table[c];
12806 +#ifdef ENABLE_MULTIBYTE
12807 + if (type == TOKEN_WCHAR)
12808 + return wcharset_table_entry(wc);
12810 if (type == TOKEN_SPECIAL)
12811 return get_charinfo(nm);
12812 if (type == TOKEN_NUMBERED_CHAR)
12813 @@ -6070,6 +6150,11 @@
12815 *pp = (*pp)->add_char(charset_table[c], curenv, &w, &s);
12817 +#ifdef ENABLE_MULTIBYTE
12818 + case TOKEN_WCHAR:
12819 + *pp = (*pp)->add_char(wcharset_table_entry(wc), curenv, &w, &s);
12823 n = new dummy_node;
12825 @@ -6142,6 +6227,11 @@
12827 curenv->add_char(charset_table[c]);
12829 +#ifdef ENABLE_MULTIBYTE
12830 + case TOKEN_WCHAR:
12831 + curenv->add_char(wcharset_table_entry(wc));
12835 curenv->add_node(new dummy_node);
12837 @@ -6900,6 +6990,7 @@
12839 mac_path = ¯o_path;
12840 set_string(".T", device);
12841 + init_encoding_handler();
12842 init_charset_table();
12843 init_hpf_code_table();
12844 if (!font::load_desc())
12845 @@ -6924,6 +7015,9 @@
12846 // In the DESC file a font name of 0 (zero) means leave this
12848 if (strcmp(font::font_name_table[i], "0") != 0)
12849 +#ifdef ENABLE_MULTIBYTE
12850 + if (!font::is_on_demand(i))
12852 mount_font(j, symbol(font::font_name_table[i]));
12853 curdiv = topdiv = new top_level_diversion;
12855 @@ -7081,6 +7175,9 @@
12856 init_request("ecs", save_escape_char);
12857 init_request("el", else_request);
12858 init_request("em", end_macro);
12859 +#ifdef ENABLE_MULTIBYTE
12860 + init_request("encoding", select_encoding);
12862 init_request("eo", escape_off);
12863 init_request("ex", exit_request);
12864 init_request("fchar", define_fallback_character);
12865 @@ -7533,12 +7630,92 @@
12867 dictionary charinfo_dictionary(501);
12869 +#ifdef ENABLE_MULTIBYTE
12870 +struct charinfo_list {
12871 + struct charinfo_list *next;
12873 +} *wcharset_table = NULL;
12875 +/* XXX: use more efficient method? */
12877 +lookup_wcharset_table(wchar wc)
12879 + struct charinfo_list *cl;
12880 + for (cl = wcharset_table; cl; cl = cl->next) {
12881 + if (cl->ci && cl->ci->get_wchar_code() == wc)
12888 +add_wcharset_table(charinfo *ci)
12890 + struct charinfo_list *cl = new struct charinfo_list;
12891 + cl->next = wcharset_table;
12893 + wcharset_table = cl;
12896 +charinfo *wcharset_table_entry(wchar wc)
12898 + if (! is_wchar_code(wc))
12900 + charinfo *cp = lookup_wcharset_table(wc);
12901 + if (cp == NULL) {
12902 + int i = wchar_code(wc);
12905 + sprintf(buf, "u%04X", i);
12907 + cp = get_charinfo_by_number(i);
12910 + sprintf(buf, "char%d", i); // ???
12912 + symbol nm = symbol(buf);
12913 + cp = new charinfo(nm);
12914 + (void)charinfo_dictionary.lookup(nm, cp);
12915 + cp->set_wchar_code(wc);
12916 + add_wcharset_table(cp);
12922 +wchar_charinfo(symbol nm)
12924 + const char *p = nm.contents();
12929 + wchar wc = make_wchar(strtol(p + 1, &pp, 16));
12932 + charinfo *cp = lookup_wcharset_table(wc);
12935 + /* create on demand */
12936 + cp = new charinfo(nm);
12937 + cp->set_wchar_code(wc);
12938 + add_wcharset_table(cp);
12943 charinfo *get_charinfo(symbol nm)
12945 void *p = charinfo_dictionary.lookup(nm);
12947 return (charinfo *)p;
12948 +#ifdef ENABLE_MULTIBYTE
12949 + charinfo *cp = wchar_charinfo(nm);
12951 + cp = new charinfo(nm);
12953 charinfo *cp = new charinfo(nm);
12955 (void)charinfo_dictionary.lookup(nm, cp);
12958 @@ -7548,6 +7725,9 @@
12959 charinfo::charinfo(symbol s)
12960 : translation(0), mac(0), special_translation(TRANSLATE_NONE),
12961 hyphenation_code(0), flags(0), ascii_code(0), asciify_code(0),
12962 +#ifdef ENABLE_MULTIBYTE
12965 not_found(0), transparent_translate(1), translate_input(0),
12968 @@ -7592,6 +7772,14 @@
12972 +#ifdef ENABLE_MULTIBYTE
12973 +void charinfo::set_wchar_code(wchar wc)
12976 + index = wc; /* XXX: wchar code == index */
12980 macro *charinfo::set_macro(macro *m, int f)
12983 @@ -7647,6 +7835,13 @@
12984 int font::name_to_index(const char *nm)
12987 +#ifdef ENABLE_MULTIBYTE
12989 + wchar wc = input_encoding->make_wchar(nm[0], (const unsigned char *)nm, &i);
12990 + if (is_wchar_code(wc)) {
12991 + ci = wcharset_table_entry(wc);
12995 ci = charset_table[nm[0] & 0xff];
12996 else if (nm[0] == '\\' && nm[2] == 0)
12997 @@ -7663,3 +7858,10 @@
12999 return get_charinfo_by_number(n)->get_index();
13002 +#ifdef ENABLE_MULTIBYTE
13003 +int font::wchar_index(wchar wc)
13005 + return(wcharset_table_entry(wc)->get_index());
13008 diff -Naur groff-1.18.1.4.orig/src/roff/troff/node.cc groff-1.18.1.4/src/roff/troff/node.cc
13009 --- groff-1.18.1.4.orig/src/roff/troff/node.cc 2002-10-03 21:55:09.000000000 +0000
13010 +++ groff-1.18.1.4/src/roff/troff/node.cc 2006-10-18 18:54:44.000000000 +0000
13014 #include "geometry.h"
13015 +#include "encoding.h"
13017 #include "nonposix.h"
13019 @@ -745,8 +746,15 @@
13020 int current_font_number;
13021 symbol *font_position;
13022 int nfont_positions;
13023 +#ifdef ENABLE_MULTIBYTE
13024 + const char *current_encoding;
13026 enum { TBUF_SIZE = 256 };
13027 +#ifdef ENABLE_MULTIBYTE
13028 + wchar tbuf[TBUF_SIZE];
13030 char tbuf[TBUF_SIZE];
13035 @@ -756,6 +764,9 @@
13037 void put(unsigned int i);
13038 void put(const char *s);
13039 +#ifdef ENABLE_MULTIBYTE
13040 + void putw(const wchar wc);
13042 void set_font(tfont *tf);
13045 @@ -799,6 +810,13 @@
13049 +#ifdef ENABLE_MULTIBYTE
13050 +inline void troff_output_file::putw(wchar wc)
13052 + output_encoding->put_wchar(wc, fp);
13056 inline void troff_output_file::put(unsigned char c)
13059 @@ -956,7 +974,11 @@
13060 check_output_limits(hpos, vpos - current_size);
13062 for (int i = 0; i < tbuf_len; i++)
13063 +#ifdef ENABLE_MULTIBYTE
13071 @@ -988,7 +1010,13 @@
13075 +#ifdef ENABLE_MULTIBYTE
13076 + wchar c = ci->get_wchar_code();
13078 + c = ci->get_ascii_code();
13080 char c = ci->get_ascii_code();
13085 @@ -1014,7 +1042,8 @@
13087 else if (tcommand_flag) {
13088 if (tbuf_len > 0 && hpos == output_hpos && vpos == output_vpos
13089 - && gcol == current_glyph_color && fcol == current_fill_color
13090 + && (!gcol || gcol == current_glyph_color)
13091 + && (!fcol || fcol == current_fill_color)
13093 && tbuf_len < TBUF_SIZE) {
13094 check_charinfo(tf, ci);
13095 @@ -1039,17 +1068,26 @@
13096 check_charinfo(tf, ci);
13097 // check_output_limits(output_hpos, output_vpos);
13098 if (vpos == output_vpos
13099 - && gcol == current_glyph_color && fcol == current_fill_color
13100 + && (!gcol || gcol == current_glyph_color)
13101 + && (!fcol || fcol == current_fill_color)
13102 && n > 0 && n < 100 && !force_motion) {
13103 put(char(n/10 + '0'));
13104 put(char(n%10 + '0'));
13105 +#ifdef ENABLE_MULTIBYTE
13110 output_hpos = hpos;
13115 +#ifdef ENABLE_MULTIBYTE
13121 hpos += w.to_units() + kk;
13123 @@ -1063,7 +1101,13 @@
13125 if (tf != current_tfont)
13127 +#ifdef ENABLE_MULTIBYTE
13128 + wchar c = ci->get_wchar_code();
13130 + c = ci->get_ascii_code();
13132 char c = ci->get_ascii_code();
13137 @@ -1087,11 +1131,16 @@
13139 int n = hpos - output_hpos;
13140 if (vpos == output_vpos
13141 - && gcol == current_glyph_color && fcol == current_fill_color
13142 + && (!gcol || gcol == current_glyph_color)
13143 + && (!fcol || fcol == current_fill_color)
13144 && n > 0 && n < 100) {
13145 put(char(n/10 + '0'));
13146 put(char(n%10 + '0'));
13147 +#ifdef ENABLE_MULTIBYTE
13152 output_hpos = hpos;
13155 @@ -1099,13 +1148,26 @@
13159 +#ifdef ENABLE_MULTIBYTE
13168 void troff_output_file::set_font(tfont *tf)
13170 +#ifdef ENABLE_MULTIBYTE
13172 + if (current_encoding != output_encoding->name()) {
13173 + put("x encoding ");
13174 + put(output_encoding->name());
13176 + current_encoding = output_encoding->name();
13179 if (current_tfont == tf)
13181 int n = tf->get_input_position();
13182 @@ -1162,7 +1224,7 @@
13184 void troff_output_file::fill_color(color *col)
13186 - if ((current_fill_color == col) || !color_flag)
13187 + if (!col || current_fill_color == col || !color_flag)
13191 @@ -1210,7 +1272,7 @@
13193 void troff_output_file::glyph_color(color *col)
13195 - if ((current_glyph_color == col) || !color_flag)
13196 + if (!col || current_glyph_color == col || !color_flag)
13200 @@ -1497,7 +1559,17 @@
13204 +#ifdef ENABLE_MULTIBYTE
13205 + current_encoding = output_encoding->name();
13207 + if (current_encoding && *current_encoding != '\0') {
13209 + put(current_encoding);
13218 @@ -1777,6 +1849,9 @@
13220 const char *type();
13221 int force_tprint();
13222 +#ifdef ENABLE_MULTIBYTE
13223 + node_type get_node_type();
13227 glyph_node *glyph_node::free_list = 0;
13228 @@ -1802,6 +1877,9 @@
13230 const char *type();
13231 int force_tprint();
13232 +#ifdef ENABLE_MULTIBYTE
13233 + node_type get_node_type();
13237 class kern_pair_node : public node {
13238 @@ -5225,6 +5303,55 @@
13242 +#ifdef ENABLE_MULTIBYTE
13243 +kword_space_node::kword_space_node(color *c, node *x) : word_space_node(0, c, new width_list(0, 0), x)
13246 +node *kword_space_node::copy()
13248 + return new kword_space_node(col);
13250 +newline_space_node::newline_space_node(hunits d, color *c, node *x) : word_space_node(d, c, new width_list(0, 0), x)
13253 +node *newline_space_node::copy()
13255 + return new newline_space_node(n, col);
13258 +const char *kword_space_node::type()
13260 + return "kword_space_node";
13262 +const char *newline_space_node::type()
13264 + return "newline_space_node";
13267 +node_type node::get_node_type()
13269 + return NODE_ANOTHER;
13271 +node_type glyph_node::get_node_type()
13273 + return NODE_GLYPH;
13276 +node_type ligature_node::get_node_type()
13278 + return NODE_ANOTHER;
13281 +node_type kword_space_node::get_node_type()
13283 + return NODE_KWORD_SPACE;
13285 +node_type newline_space_node::get_node_type()
13287 + return NODE_NEWLINE_SPACE;
13291 int unbreakable_space_node::same(node *nd)
13293 return n == ((unbreakable_space_node *)nd)->n
13294 @@ -5625,6 +5752,28 @@
13298 +#ifdef ENABLE_MULTIBYTE
13299 +int get_fontset_fontno(int n, wchar wc)
13301 + if (n >= 0 && n < font_table_size && font_table[n] != 0) {
13302 + /* XXX: external_name should be used? */
13303 + int fn = font::get_fontset_font(font_table[n]->get_name().contents(), wc);
13305 + symbol nm(font::font_name_table[fn]);
13306 + int nn = symbol_fontno(nm);
13308 + nn = next_available_font_position();
13309 + if (!mount_font(nn, nm)) {
13310 + return -1; /* XXX */
13320 hunits env_digit_width(environment *env)
13322 node *n = make_glyph_node(charset_table['0'], env);
13323 diff -Naur groff-1.18.1.4.orig/src/roff/troff/node.h groff-1.18.1.4/src/roff/troff/node.h
13324 --- groff-1.18.1.4.orig/src/roff/troff/node.h 2002-10-02 14:23:28.000000000 +0000
13325 +++ groff-1.18.1.4/src/roff/troff/node.h 2006-10-18 18:54:44.000000000 +0000
13327 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
13330 +#include "config.h"
13332 struct hyphen_list {
13333 unsigned char hyphen;
13334 unsigned char breakable;
13336 void hyphenate(hyphen_list *, unsigned);
13338 enum hyphenation_type { HYPHEN_MIDDLE, HYPHEN_BOUNDARY, HYPHEN_INHIBIT };
13339 +#ifdef ENABLE_MULTIBYTE
13340 +enum node_type {NODE_GLYPH, NODE_KWORD_SPACE, NODE_NEWLINE_SPACE, NODE_ANOTHER};
13343 class ascii_output_file;
13345 @@ -106,6 +111,9 @@
13347 virtual int same(node *) = 0;
13348 virtual const char *type() = 0;
13349 +#ifdef ENABLE_MULTIBYTE
13350 + virtual node_type get_node_type();
13354 inline node::node()
13355 @@ -212,6 +220,24 @@
13356 int force_tprint();
13359 +#ifdef ENABLE_MULTIBYTE
13360 +class kword_space_node : public word_space_node {
13362 + kword_space_node(color *, node * = 0);
13364 + const char *type();
13365 + node_type get_node_type();
13368 +class newline_space_node : public word_space_node {
13370 + newline_space_node(hunits, color *, node * = 0);
13372 + const char *type();
13373 + node_type get_node_type();
13377 class unbreakable_space_node : public word_space_node {
13378 unbreakable_space_node(hunits, int, color *, node * = 0);
13380 @@ -538,6 +564,9 @@
13381 node *copy_node_list(node *);
13383 int get_bold_fontno(int f);
13384 +#ifdef ENABLE_MULTIBYTE
13385 +int get_fontset_fontno(int f, wchar wc);
13388 inline hyphen_list::hyphen_list(unsigned char code, hyphen_list *p)
13389 : hyphen(0), breakable(0), hyphenation_code(code), next(p)
13390 @@ -595,3 +624,4 @@
13392 font_family *lookup_family(symbol);
13393 symbol get_font_name(int, environment *);
13395 diff -Naur groff-1.18.1.4.orig/src/roff/troff/token.h groff-1.18.1.4/src/roff/troff/token.h
13396 --- groff-1.18.1.4.orig/src/roff/troff/token.h 2002-06-22 21:31:41.000000000 +0000
13397 +++ groff-1.18.1.4/src/roff/troff/token.h 2006-10-18 18:54:44.000000000 +0000
13398 @@ -28,12 +28,18 @@
13402 +#ifdef ENABLE_MULTIBYTE
13410 TOKEN_CHAR, // a normal printing character
13411 +#ifdef ENABLE_MULTIBYTE
13412 + TOKEN_WCHAR, // a multibyte character
13415 TOKEN_EMPTY, // this is the initial value
13417 diff -Naur groff-1.18.1.4.orig/src/roff/troff/troff.h groff-1.18.1.4/src/roff/troff/troff.h
13418 --- groff-1.18.1.4.orig/src/roff/troff/troff.h 2002-06-19 13:20:18.000000000 +0000
13419 +++ groff-1.18.1.4/src/roff/troff/troff.h 2006-10-18 18:54:44.000000000 +0000
13421 #include <stdlib.h>
13424 +#include "encoding.h"
13425 #include "assert.h"
13427 #include "device.h"
13428 diff -Naur groff-1.18.1.4.orig/src/roff/troff/troff.man groff-1.18.1.4/src/roff/troff/troff.man
13429 --- groff-1.18.1.4.orig/src/roff/troff/troff.man 2002-09-16 08:42:45.000000000 +0000
13430 +++ groff-1.18.1.4/src/roff/troff/troff.man 2006-10-18 18:54:44.000000000 +0000
13432 A copy of the Free Documentation License is included as a file called
13433 FDL in the main directory of the groff source package.
13436 +A copy of the GNU Free Documentation License is also available in this
13437 +Debian package as /usr/share/doc/groff-base/copyright.
13441 .\" --------------------------------------------------------------------
13442 diff -Naur groff-1.18.1.4.orig/src/utils/tfmtodit/tfmtodit.cc groff-1.18.1.4/src/utils/tfmtodit/tfmtodit.cc
13443 --- groff-1.18.1.4.orig/src/utils/tfmtodit/tfmtodit.cc 2001-08-19 21:32:41.000000000 +0000
13444 +++ groff-1.18.1.4/src/utils/tfmtodit/tfmtodit.cc 2006-10-18 18:54:44.000000000 +0000
13445 @@ -650,7 +650,7 @@
13446 gives the groff name of the character, `i' gives its index in
13447 the encoding, which is filled in later (-1 if it does not appear). */
13454 @@ -670,7 +670,7 @@
13456 // Each possible ligature appears in this table.
13460 unsigned char c1, c2, res;
13463 diff -Naur groff-1.18.1.4.orig/src/xditview/Dvi.c groff-1.18.1.4/src/xditview/Dvi.c
13464 --- groff-1.18.1.4.orig/src/xditview/Dvi.c 2000-03-01 13:50:49.000000000 +0000
13465 +++ groff-1.18.1.4/src/xditview/Dvi.c 2006-10-18 18:54:44.000000000 +0000
13470 +#include "config.h"
13473 * Dvi.c - Dvi display widget
13476 NBI -adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\
13477 S -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
13478 SS -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
13479 +M -misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0\n\
13480 +G -misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0\
13483 #define offset(field) XtOffset(DviWidget, field)
13486 static void SaveToFile ();
13489 +extern void ParseFontMap();
13490 +extern void DestroyFontMap();
13491 +extern void ForgetFonts();
13494 +extern void DestroyFileMap();
13495 +extern int SearchPagePosition();
13496 +extern void FileSeek();
13497 +extern void ForgetPagePositions();
13500 +extern int ParseInput();
13502 DviClassRec dviClassRec = {
13504 &widgetClassRec, /* superclass */
13505 @@ -406,6 +424,7 @@
13510 SetDevice (dw, name)
13513 @@ -559,6 +578,9 @@
13514 DviWidgetClass super = (DviWidgetClass) wc->core_class.superclass;
13515 if (wc->command_class.save == InheritSaveToFile)
13516 wc->command_class.save = super->command_class.save;
13517 +#ifdef ENABLE_MULTIBYTE
13523 diff -Naur groff-1.18.1.4.orig/src/xditview/DviChar.c groff-1.18.1.4/src/xditview/DviChar.c
13524 --- groff-1.18.1.4.orig/src/xditview/DviChar.c 2002-04-07 04:48:51.000000000 +0000
13525 +++ groff-1.18.1.4/src/xditview/DviChar.c 2006-10-18 18:54:44.000000000 +0000
13527 * font indexes and back
13530 -#include "DviChar.h"
13531 +#include <stdlib.h>
13532 +#include "config.h"
13533 +#include "DviChar.h"
13534 +#include "encoding.h"
13536 extern char *xmalloc();
13539 static int standard_maps_loaded = 0;
13540 static void load_standard_maps ();
13541 static int hash_name ();
13542 -static dispose_hash(), compute_hash();
13543 +static void dispose_hash(), compute_hash();
13546 DviFindMap (encoding)
13548 compute_hash (map);
13554 DviCharNameMap *map;
13563 DviCharNameMap *map;
13565 @@ -120,7 +123,10 @@
13568 DviCharNameHash *h;
13570 +#ifdef ENABLE_MULTIBYTE
13571 + if (map->char_index)
13572 + return (*map->char_index)(map, name);
13574 i = hash_name (name) % DVI_HASH_SIZE;
13575 for (h = map->buckets[i]; h; h=h->next)
13576 if (!strcmp (h->name, name))
13577 @@ -128,9 +134,47 @@
13581 +#ifdef ENABLE_MULTIBYTE
13582 +#include <X11/Xlib.h>
13584 +DviChar2XChar2b(int c, XChar2b *xc)
13586 + /* XXX: can we assume 'c' is EUC-JP ? */
13587 + xc->byte1 = (c >> 8) & 0x7f;
13588 + xc->byte2 = (c) &0x7f;
13593 +DviCharIndexJISX0208_1983(map, name)
13594 + DviCharNameMap *map;
13597 + /* XXX: can we assume name points EUC-JP chars? */
13598 + unsigned char ub = *name, lb = *(name + 1);
13600 + wc = (name[0] & 0xff) << 8;
13601 + wc |= (name[1] & 0xff);
13605 +static DviCharNameMap JISX0208_1983_0_map = {
13606 + "jisx0208.1983-0",
13609 + DviCharIndexJISX0208_1983,
13611 +{ "DummyEntry", /* 0 */},
13615 static DviCharNameMap ISO8859_1_map = {
13618 +#ifdef ENABLE_MULTIBYTE
13625 @@ -393,6 +437,10 @@
13626 static DviCharNameMap Adobe_Symbol_map = {
13627 "adobe-fontspecific",
13629 +#ifdef ENABLE_MULTIBYTE
13636 @@ -659,4 +707,7 @@
13637 standard_maps_loaded = 1;
13638 DviRegisterMap (&ISO8859_1_map);
13639 DviRegisterMap (&Adobe_Symbol_map);
13640 +#ifdef ENABLE_MULTIBYTE
13641 + DviRegisterMap (&JISX0208_1983_0_map);
13644 diff -Naur groff-1.18.1.4.orig/src/xditview/DviChar.h groff-1.18.1.4/src/xditview/DviChar.h
13645 --- groff-1.18.1.4.orig/src/xditview/DviChar.h 2000-02-06 09:38:57.000000000 +0000
13646 +++ groff-1.18.1.4/src/xditview/DviChar.h 2006-10-18 18:54:44.000000000 +0000
13648 * CharSetRegistry from the CharSetEncoding
13651 +#include "config.h"
13653 # define DVI_MAX_SYNONYMS 10
13654 # define DVI_MAP_SIZE 256
13655 # define DVI_HASH_SIZE 256
13657 typedef struct _dviCharNameMap {
13660 +#ifdef ENABLE_MULTIBYTE
13661 + void (*char2XChar2b)(/* int c, XChar2b *xc */);
13662 + int (*char_index)(/* struct _dviCharNameMap *map, char *name */);
13664 char *dvi_names[DVI_MAP_SIZE][DVI_MAX_SYNONYMS];
13665 DviCharNameHash *buckets[DVI_HASH_SIZE];
13667 diff -Naur groff-1.18.1.4.orig/src/xditview/DviP.h groff-1.18.1.4/src/xditview/DviP.h
13668 --- groff-1.18.1.4.orig/src/xditview/DviP.h 2000-02-06 09:38:57.000000000 +0000
13669 +++ groff-1.18.1.4/src/xditview/DviP.h 2006-10-18 18:54:44.000000000 +0000
13674 +#include "config.h"
13677 #include "DviChar.h"
13679 #define DVI_CHAR_CACHE_SIZE 1024
13681 typedef struct _dviCharCache {
13682 +#ifdef ENABLE_MULTIBYTE
13683 + XTextItem16 cache[DVI_TEXT_CACHE_SIZE];
13685 XTextItem cache[DVI_TEXT_CACHE_SIZE];
13687 char adjustable[DVI_TEXT_CACHE_SIZE];
13688 +#ifdef ENABLE_MULTIBYTE
13689 + XChar2b char_cache[DVI_CHAR_CACHE_SIZE];
13691 char char_cache[DVI_CHAR_CACHE_SIZE];
13696 @@ -182,6 +191,7 @@
13700 +extern int DviGetAndPut();
13701 #define DviGetIn(dw,cp)\
13702 (dw->dvi.tmpFile ? (\
13703 DviGetAndPut (dw, cp) \
13704 @@ -228,6 +238,11 @@
13705 extern DeviceFont *QueryDeviceFont ();
13707 extern char *GetWord(), *GetLine();
13709 +#ifdef ENABLE_MULTIBYTE
13710 +extern void DviInitLocale();
13711 +extern int DviGEtCharacter();
13713 #endif /* _XtDviP_h */
13716 diff -Naur groff-1.18.1.4.orig/src/xditview/FontMap.jisx0208 groff-1.18.1.4/src/xditview/FontMap.jisx0208
13717 --- groff-1.18.1.4.orig/src/xditview/FontMap.jisx0208 1970-01-01 00:00:00.000000000 +0000
13718 +++ groff-1.18.1.4/src/xditview/FontMap.jisx0208 2006-10-18 18:54:44.000000000 +0000
13720 +M -misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0
13721 +G -misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0
13722 diff -Naur groff-1.18.1.4.orig/src/xditview/GXditview-ad.h groff-1.18.1.4/src/xditview/GXditview-ad.h
13723 --- groff-1.18.1.4.orig/src/xditview/GXditview-ad.h 2000-02-06 09:39:04.000000000 +0000
13724 +++ groff-1.18.1.4/src/xditview/GXditview-ad.h 2006-10-18 18:54:44.000000000 +0000
13726 "GXditview.promptShell.promptDialog.cancel.label: Cancel",
13727 "GXditview.promptShell.promptDialog.cancel.translations: #override \
13728 <BtnUp>: Cancel() unset()",
13729 +"GXditview*fontMap: \
13730 +TR -adobe-times-medium-r-normal--*-100-*-*-*-*-iso8859-1\\n\
13731 +TI -adobe-times-medium-i-normal--*-100-*-*-*-*-iso8859-1\\n\
13732 +TB -adobe-times-bold-r-normal--*-100-*-*-*-*-iso8859-1\\n\
13733 +TBI -adobe-times-bold-i-normal--*-100-*-*-*-*-iso8859-1\\n\
13734 +CR -adobe-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1\\n\
13735 +CI -adobe-courier-medium-o-normal--*-100-*-*-*-*-iso8859-1\\n\
13736 +CB -adobe-courier-bold-r-normal--*-100-*-*-*-*-iso8859-1\\n\
13737 +CBI -adobe-courier-bold-o-normal--*-100-*-*-*-*-iso8859-1\\n\
13738 +HR -adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1\\n\
13739 +HI -adobe-helvetica-medium-o-normal--*-100-*-*-*-*-iso8859-1\\n\
13740 +HB -adobe-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1\\n\
13741 +HBI -adobe-helvetica-bold-o-normal--*-100-*-*-*-*-iso8859-1\\n\
13742 +NR -adobe-new century schoolbook-medium-r-normal--*-100-*-*-*-*-iso8859-1\\n\
13743 +NI -adobe-new century schoolbook-medium-i-normal--*-100-*-*-*-*-iso8859-1\\n\
13744 +NB -adobe-new century schoolbook-bold-r-normal--*-100-*-*-*-*-iso8859-1\\n\
13745 +NBI -adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\\n\
13746 +S -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\\n\
13747 +SS -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\\n\
13748 +M -misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0\\n\
13749 +G -misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0",
13750 diff -Naur groff-1.18.1.4.orig/src/xditview/GXditview.ad groff-1.18.1.4/src/xditview/GXditview.ad
13751 --- groff-1.18.1.4.orig/src/xditview/GXditview.ad 2000-02-06 09:38:57.000000000 +0000
13752 +++ groff-1.18.1.4/src/xditview/GXditview.ad 2006-10-18 18:54:44.000000000 +0000
13754 GXditview.promptShell.promptDialog.cancel.label: Cancel
13755 GXditview.promptShell.promptDialog.cancel.translations: #override \
13756 <BtnUp>: Cancel() unset()
13758 +GXditview*fontMap: \
13759 +TR -adobe-times-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
13760 +TI -adobe-times-medium-i-normal--*-100-*-*-*-*-iso8859-1\n\
13761 +TB -adobe-times-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
13762 +TBI -adobe-times-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\
13763 +CR -adobe-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
13764 +CI -adobe-courier-medium-o-normal--*-100-*-*-*-*-iso8859-1\n\
13765 +CB -adobe-courier-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
13766 +CBI -adobe-courier-bold-o-normal--*-100-*-*-*-*-iso8859-1\n\
13767 +HR -adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
13768 +HI -adobe-helvetica-medium-o-normal--*-100-*-*-*-*-iso8859-1\n\
13769 +HB -adobe-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
13770 +HBI -adobe-helvetica-bold-o-normal--*-100-*-*-*-*-iso8859-1\n\
13771 +NR -adobe-new century schoolbook-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
13772 +NI -adobe-new century schoolbook-medium-i-normal--*-100-*-*-*-*-iso8859-1\n\
13773 +NB -adobe-new century schoolbook-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
13774 +NBI -adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\
13775 +S -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
13776 +SS -adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
13777 +M -misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0\n\
13778 +G -misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0
13779 diff -Naur groff-1.18.1.4.orig/src/xditview/XFontName.c groff-1.18.1.4/src/xditview/XFontName.c
13780 --- groff-1.18.1.4.orig/src/xditview/XFontName.c 2000-02-06 09:38:58.000000000 +0000
13781 +++ groff-1.18.1.4/src/xditview/XFontName.c 2006-10-18 18:54:44.000000000 +0000
13782 @@ -225,6 +225,7 @@
13787 XCopyFontName (name1, name2, fontNameAttributes)
13788 XFontName *name1, *name2;
13789 unsigned int fontNameAttributes;
13790 diff -Naur groff-1.18.1.4.orig/src/xditview/config.h groff-1.18.1.4/src/xditview/config.h
13791 --- groff-1.18.1.4.orig/src/xditview/config.h 1970-01-01 00:00:00.000000000 +0000
13792 +++ groff-1.18.1.4/src/xditview/config.h 2006-10-18 18:54:44.000000000 +0000
13795 +#include "../include/config.h"
13798 diff -Naur groff-1.18.1.4.orig/src/xditview/device.c groff-1.18.1.4/src/xditview/device.c
13799 --- groff-1.18.1.4.orig/src/xditview/device.c 2000-12-02 21:12:53.000000000 +0000
13800 +++ groff-1.18.1.4/src/xditview/device.c 2006-10-18 18:54:44.000000000 +0000
13805 +#include <stdlib.h>
13807 #include <X11/Xos.h>
13808 #include <X11/Intrinsic.h>
13810 +#include "config.h"
13811 #include "device.h"
13816 struct charinfo *char_table[CHAR_TABLE_SIZE];
13817 struct charinfo *code_table[256];
13818 +#ifdef ENABLE_MULTIBYTE
13819 + struct charrange *range;
13825 static struct charinfo *add_char();
13826 static int read_charset_section();
13827 static char *canonicalize_name();
13828 +#ifdef ENABLE_MULTIBYTE
13829 +struct charrange {
13830 + struct charrange *next;
13835 +static void add_charrange();
13839 Device *new_device(name)
13840 @@ -256,6 +270,9 @@
13841 f->char_table[i] = 0;
13842 for (i = 0; i < 256; i++)
13843 f->code_table[i] = 0;
13844 +#ifdef ENABLE_MULTIBYTE
13850 @@ -267,6 +284,15 @@
13854 +#ifdef ENABLE_MULTIBYTE
13856 + struct charrange *cp, *cp2;
13857 + for (cp = f->range; cp != NULL; cp = cp2) {
13859 + XtFree((char *)cp);
13864 for (i = 0; i < CHAR_TABLE_SIZE; i++) {
13865 struct charinfo *ptr = f->char_table[i];
13866 @@ -342,6 +368,20 @@
13868 struct charinfo *p;
13870 +#ifdef ENABLE_MULTIBYTE
13872 + extern DviWCharP();
13873 + if (DviWCharP(name, &wc)) {
13874 + struct charrange *rp;
13875 + for (rp = f->range; rp != NULL; rp = rp->next) {
13876 + if (rp->start_code <= wc && wc <= rp->end_code) {
13877 + *widthp = scale_round(rp->width, ps,
13878 + f->dev->unitwidth);
13884 name = canonicalize_name(name);
13885 for (p = f->char_table[hash_name(name) % CHAR_TABLE_SIZE];; p = p->next) {
13887 @@ -424,6 +464,22 @@
13891 +#ifdef ENABLE_MULTIBYTE
13893 +add_charrange(f, width, start_code, end_code)
13895 + int width, start_code, end_code;
13897 + struct charrange *ci;
13898 + ci = (struct charrange *)XtMalloc(sizeof(struct charrange));
13899 + ci->start_code = start_code;
13900 + ci->end_code = end_code;
13901 + ci->width = width;
13902 + ci->next = f->range;
13907 /* Return non-zero for success. */
13910 @@ -439,11 +495,31 @@
13914 +#ifdef ENABLE_MULTIBYTE
13915 + int scode, ecode;
13919 name = strtok(buf, WS);
13921 continue; /* ignore blank lines */
13922 +#ifdef ENABLE_MULTIBYTE
13923 + if (sscanf(name, "u%X..u%X", &scode, &ecode) == 2) {
13924 + p = strtok((char *)0, WS);
13927 + if (sscanf(p, "%d", &width) != 1) {
13928 + error("bad width field");
13931 + p = strtok((char *)0, WS);
13933 + error("missing type field");
13936 + add_charrange(f, width, scode, ecode);
13939 p = strtok((char *)0, WS);
13940 if (!p) /* end of charset section */
13942 @@ -479,6 +555,9 @@
13944 last_charinfo = add_char(f, name, width, code);
13946 +#ifdef ENABLE_MULTIBYTE
13952 @@ -559,7 +638,7 @@
13953 FILE *open_device_file(device_name, file_name, result)
13954 char *device_name, *file_name, **result;
13956 - char *buf, *path;
13960 buf = XtMalloc(3 + strlen(device_name) + 1 + strlen(file_name) + 1);
13961 diff -Naur groff-1.18.1.4.orig/src/xditview/draw.c groff-1.18.1.4/src/xditview/draw.c
13962 --- groff-1.18.1.4.orig/src/xditview/draw.c 2000-02-06 09:39:00.000000000 +0000
13963 +++ groff-1.18.1.4/src/xditview/draw.c 2006-10-18 18:54:44.000000000 +0000
13968 +#include "config.h"
13970 /* math.h on a Sequent doesn't define M_PI, apparently */
13976 +#include "encoding.h" /* XXX */
13978 #define DeviceToX(dw, n) ((int)((n) * (dw)->dvi.scale_factor + .5))
13979 #define XPos(dw) (DeviceToX((dw), (dw)->dvi.state->x - \
13982 static int FakeCharacter();
13985 +extern int MaxFontPosition();
13988 HorizontalMove(dw, delta)
13992 dw->dvi.state->x += delta;
13996 HorizontalGoto(dw, NewPosition)
14000 dw->dvi.state->x = NewPosition;
14004 VerticalMove(dw, delta)
14008 dw->dvi.state->y += delta;
14012 VerticalGoto(dw, NewPosition)
14016 dw->dvi.state->y = NewPosition;
14020 AdjustCacheDeltas (dw)
14023 @@ -94,14 +104,21 @@
14028 FlushCharCache (dw)
14031 if (dw->dvi.cache.char_index != 0) {
14032 AdjustCacheDeltas (dw);
14033 +#ifdef ENABLE_MULTIBYTE
14034 + XDrawText16 (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
14035 + dw->dvi.cache.start_x, dw->dvi.cache.start_y,
14036 + dw->dvi.cache.cache, dw->dvi.cache.index + 1);
14038 XDrawText (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
14039 dw->dvi.cache.start_x, dw->dvi.cache.start_y,
14040 dw->dvi.cache.cache, dw->dvi.cache.index + 1);
14043 dw->dvi.cache.index = 0;
14044 dw->dvi.cache.max = DVI_TEXT_CACHE_SIZE;
14045 @@ -115,6 +132,7 @@
14046 dw->dvi.cache.start_y = dw->dvi.cache.y = YPos (dw);
14053 @@ -123,6 +141,7 @@
14054 dw->dvi.word_flag = 0;
14061 @@ -135,7 +154,6 @@
14063 (fi)->max_bounds.width\
14068 int charExists (fi, c)
14069 @@ -152,14 +170,25 @@
14070 || p->ascent != 0 || p->descent != 0 || p->attributes != 0);
14075 +#ifdef ENABLE_MULTIBYTE
14076 +DoCharacter (dw, c, wid, char2xchar2b)
14078 DoCharacter (dw, c, wid)
14082 int wid; /* width in device units */
14083 +#ifdef ENABLE_MULTIBYTE
14084 + void (*char2xchar2b)();
14087 register XFontStruct *font;
14088 +#ifdef ENABLE_MULTIBYTE
14089 + register XTextItem16 *text;
14091 register XTextItem *text;
14096 @@ -225,9 +254,25 @@
14098 dw->dvi.cache.x += text->delta;
14100 +#ifdef ENABLE_MULTIBYTE
14101 + if (charExists(font, c) || char2xchar2b) {
14103 if (charExists(font, c)) {
14106 +#ifdef ENABLE_MULTIBYTE
14107 + if (char2xchar2b) {
14108 + (*char2xchar2b)(c,
14109 + &dw->dvi.cache.char_cache[dw->dvi.cache.char_index++]);
14111 + dw->dvi.cache.char_cache[dw->dvi.cache.char_index].
14112 + byte1 = (unsigned char)'\0';
14113 + dw->dvi.cache.char_cache[dw->dvi.cache.char_index++].
14114 + byte2 = (unsigned char)c;
14117 dw->dvi.cache.char_cache[dw->dvi.cache.char_index++] = (char) c;
14120 w = charWidth(font, c);
14121 dw->dvi.cache.x += w;
14122 @@ -291,7 +336,11 @@
14124 c = DviCharIndex (map, buf);
14126 +#ifdef ENABLE_MULTIBYTE
14127 + DoCharacter (dw, c, wid, map->char2XChar2b);
14129 DoCharacter (dw, c, wid);
14132 (void) FakeCharacter (dw, buf, wid);
14133 dw->dvi.state->font_number = prevFont;
14134 @@ -345,6 +394,7 @@
14139 PutNumberedCharacter (dw, c)
14142 @@ -368,7 +418,11 @@
14143 dw->dvi.state->font_size, c, &wid))
14145 if (dw->dvi.native) {
14146 +#ifdef ENABLE_MULTIBYTE
14147 + DoCharacter (dw, c, wid, NULL);
14149 DoCharacter (dw, c, wid);
14153 map = QueryFontMap (dw, dw->dvi.state->font_number);
14154 @@ -379,7 +433,11 @@
14155 name = device_name_for_code ((DeviceFont *)0, c)) {
14156 int code = DviCharIndex (map, name);
14158 +#ifdef ENABLE_MULTIBYTE
14159 + DoCharacter (dw, code, wid, map->char2XChar2b);
14161 DoCharacter (dw, code, wid);
14165 if (FakeCharacter (dw, name, wid))
14166 @@ -387,13 +445,14 @@
14174 XClearWindow (XtDisplay (dw), XtWindow (dw));
14182 @@ -417,7 +476,7 @@
14191 @@ -444,6 +503,7 @@
14196 DrawLine (dw, x, y)
14199 @@ -459,6 +519,7 @@
14200 xp + DeviceToX (dw, x), yp + DeviceToX (dw, y));
14204 DrawCircle (dw, diam)
14207 @@ -473,6 +534,7 @@
14212 DrawFilledCircle (dw, diam)
14215 @@ -490,6 +552,7 @@
14220 DrawEllipse (dw, a, b)
14223 @@ -501,6 +564,7 @@
14224 DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360);
14228 DrawFilledEllipse (dw, a, b)
14231 @@ -515,6 +579,7 @@
14232 DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360);
14236 DrawArc (dw, x0, y0, x1, y1)
14238 int x0, y0, x1, y1;
14239 @@ -541,6 +606,7 @@
14240 rad*2, rad*2, angle1, angle2);
14244 DrawPolygon (dw, v, n)
14247 @@ -572,7 +638,7 @@
14253 DrawFilledPolygon (dw, v, n)
14256 @@ -608,7 +674,7 @@
14258 #define POINTS_MAX 10000
14262 appendPoint(points, pointi, x, y)
14265 @@ -623,7 +689,7 @@
14271 flattenCurve(points, pointi, x2, y2, x3, y3, x4, y4)
14274 @@ -659,7 +725,7 @@
14280 DrawSpline (dw, v, n)
14283 diff -Naur groff-1.18.1.4.orig/src/xditview/encoding.h groff-1.18.1.4/src/xditview/encoding.h
14284 --- groff-1.18.1.4.orig/src/xditview/encoding.h 1970-01-01 00:00:00.000000000 +0000
14285 +++ groff-1.18.1.4/src/xditview/encoding.h 2006-10-18 18:54:44.000000000 +0000
14288 +/* Copyright (c) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
14290 +This file is part of groff.
14292 +groff is free software; you can redistribute it and/or modify it under
14293 +the terms of the GNU General Public License as published by the Free
14294 +Software Foundation; either version 2, or (at your option) any later
14297 +groff is distributed in the hope that it will be useful, but WITHOUT ANY
14298 +WARRANTY; without even the implied warranty of MERCHANTABILITY or
14299 +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14302 +You should have received a copy of the GNU General Public License
14303 +along with this program; if not, write to the Free Software
14304 +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
14306 +#ifndef ENCODING_H
14307 +#define ENCODING_H
14309 +#include "config.h"
14311 +#ifdef ENABLE_MULTIBYTE
14312 +typedef unsigned int wchar;
14314 +typedef char wchar;
14318 diff -Naur groff-1.18.1.4.orig/src/xditview/font.c groff-1.18.1.4/src/xditview/font.c
14319 --- groff-1.18.1.4.orig/src/xditview/font.c 2000-02-06 09:39:01.000000000 +0000
14320 +++ groff-1.18.1.4/src/xditview/font.c 2006-10-18 18:54:44.000000000 +0000
14322 #include <X11/StringDefs.h>
14325 +#include <stdlib.h>
14327 #include "XFontName.h"
14329 -static DisposeFontSizes();
14330 +static void DisposeFontSizes();
14331 +void DestroyFontMap();
14334 +extern Bool XParseFontName();
14335 +extern Bool XFormatFontName();
14339 @@ -115,7 +121,7 @@
14340 # define SizePosition 8
14341 # define EncodingPosition 13
14345 ConvertFontNameToSize (n)
14348 @@ -191,7 +197,7 @@
14354 DisposeFontSizes (dw, fs)
14356 DviFontSizeList *fs;
14357 @@ -263,6 +269,7 @@
14365 @@ -322,6 +329,7 @@
14373 @@ -357,6 +365,7 @@
14374 dw->dvi.font_map = fm;
14378 DestroyFontMap (font_map)
14379 DviFontMap *font_map;
14381 @@ -374,6 +383,7 @@
14386 SetFontPosition (dw, position, dvi_name, extra)
14389 diff -Naur groff-1.18.1.4.orig/src/xditview/lex.c groff-1.18.1.4/src/xditview/lex.c
14390 --- groff-1.18.1.4.orig/src/xditview/lex.c 2000-02-06 09:39:02.000000000 +0000
14391 +++ groff-1.18.1.4/src/xditview/lex.c 2006-10-18 18:54:44.000000000 +0000
14393 #include <X11/IntrinsicP.h>
14394 #include <X11/StringDefs.h>
14396 +#include "config.h"
14400 DviGetAndPut(dw, cp)
14416 +#ifdef ENABLE_MULTIBYTE
14417 +#include <locale.h>
14418 +#include <langinfo.h>
14419 +#include <iconv.h>
14420 +#include <errno.h>
14422 +static iconv_t icd;
14427 + setlocale(LC_ALL, "");
14428 + enc = nl_langinfo(CODESET);
14429 + icd = iconv_open("UCS-2BE", enc);
14433 +DviGetCharacter(dw, cp)
14439 + char *inp, *outp;
14440 + size_t inbytesleft, outbytesleft = 8;
14447 + while (wc == 0) {
14453 + outbytesleft = BUFSIZ;
14456 + r = iconv(icd, &inp, &inbytesleft, &outp, &outbytesleft);
14457 + if (r == (size_t)-1) {
14458 + if (errno == EILSEQ) {
14459 + /* illegal sequence */
14460 + } else if (errno == EINVAL) {
14461 + /* incomplete sequence */
14463 + } else if (errno == E2BIG) {
14464 + /* no room to output? */
14467 + DviUngetC(dw, c);
14469 + /* ok - pass inbuf to cp */
14470 + for (j = 0; j < i; j++) {
14471 + cp[j] = inbuf[j];
14476 + /* NOT REACHED */
14480 +DviWCharP(char *name, int *wc)
14482 + char outbuf[BUFSIZ];
14483 + char *inp, *outp;
14484 + int inbytesleft, outbytesleft;
14488 + inbytesleft = strlen(name);
14490 + outbytesleft = sizeof(outbuf)-1;
14491 + r = iconv(icd, &inp, &inbytesleft, &outp, &outbytesleft);
14495 + /* UCS-2 check */
14496 + if (outbuf + 2 != outp) {
14499 + for (inp = outbuf; inp < outp; inp++) {
14501 + *wc |= (*inp) & 0x0ff;
14510 diff -Naur groff-1.18.1.4.orig/src/xditview/page.c groff-1.18.1.4/src/xditview/page.c
14511 --- groff-1.18.1.4.orig/src/xditview/page.c 2000-02-06 09:39:02.000000000 +0000
14512 +++ groff-1.18.1.4/src/xditview/page.c 2006-10-18 18:54:44.000000000 +0000
14526 ForgetPagePositions (dw)
14530 dw->dvi.file_map = 0;
14534 RememberPagePosition(dw, number)
14538 m->position = ftell (dw->dvi.file);
14542 SearchPagePosition (dw, number)
14546 return m->position;
14550 FileSeek(dw, position)
14553 diff -Naur groff-1.18.1.4.orig/src/xditview/parse.c groff-1.18.1.4/src/xditview/parse.c
14554 --- groff-1.18.1.4.orig/src/xditview/parse.c 2002-04-07 04:48:51.000000000 +0000
14555 +++ groff-1.18.1.4/src/xditview/parse.c 2006-10-18 18:54:44.000000000 +0000
14557 #include <X11/StringDefs.h>
14560 +#include "config.h"
14562 +#include "encoding.h"
14564 static int StopSeen = 0;
14565 -static ParseDrawFunction(), ParseDeviceControl();
14566 -static push_env(), pop_env();
14567 +static void ParseDrawFunction(), ParseDeviceControl();
14568 +static void push_env(), pop_env();
14571 +extern int PutCharacter();
14572 +extern int PutNumberedCharacter();
14573 +extern void HorizontalGoto();
14574 +extern void Word();
14575 +extern void VerticalGoto();
14576 +extern void VerticalMove();
14577 +extern void FlushCharCache();
14578 +extern void Newline();
14579 +extern void DrawLine();
14580 +extern void DrawCircle();
14581 +extern void DrawFilledCircle();
14582 +extern void DrawEllipse();
14583 +extern void DrawFilledEllipse();
14584 +extern void DrawArc();
14585 +extern void DrawPolygon();
14586 +extern void DrawFilledPolygon();
14587 +extern void DrawSpline();
14590 +extern void SetDevice();
14593 +extern void RememberPagePosition();
14596 +extern void SetFontPosition();
14599 +extern int GetNumber();
14601 #define HorizontalMove(dw, delta) ((dw)->dvi.state->x += (delta))
14606 register DviWidget dw;
14608 @@ -57,11 +91,17 @@
14609 DviGetC(dw,&otherc)-'0');
14611 case 'c': /* single ascii character */
14612 +#ifdef ENABLE_MULTIBYTE
14613 + DviGetCharacter(dw, Buffer);
14614 + if (Buffer[0] == ' ')
14623 (void) PutCharacter (dw, Buffer);
14626 @@ -69,10 +109,15 @@
14627 (void) PutCharacter (dw, Buffer);
14630 +#ifdef ENABLE_MULTIBYTE
14631 + while (DviGetCharacter(dw, Buffer) != EOF
14632 + && Buffer[0] != ' ' && Buffer[0] != '\n') {
14635 while (DviGetC (dw, &c) != EOF
14636 && c != ' ' && c != '\n') {
14639 HorizontalMove (dw, PutCharacter (dw, Buffer));
14642 @@ -158,7 +203,7 @@
14651 @@ -177,7 +222,7 @@
14652 dw->dvi.state = new;
14660 @@ -188,7 +233,7 @@
14661 XtFree ((char *) old);
14666 InitTypesetter (dw)
14669 @@ -200,7 +245,7 @@
14671 #define DRAW_ARGS_MAX 128
14675 ParseDrawFunction(dw, buf)
14678 @@ -284,13 +329,12 @@
14684 ParseDeviceControl(dw) /* Parse the x commands */
14687 char str[20], str1[50];
14689 - extern int LastPage, CurrentPage;
14691 GetWord (dw, str, 20);
14692 switch (str[0]) { /* crude for now */
14693 diff -Naur groff-1.18.1.4.orig/src/xditview/xditview.c groff-1.18.1.4/src/xditview/xditview.c
14694 --- groff-1.18.1.4.orig/src/xditview/xditview.c 2002-06-23 14:11:55.000000000 +0000
14695 +++ groff-1.18.1.4/src/xditview/xditview.c 2006-10-18 18:54:44.000000000 +0000
14697 #include <X11/Xaw/SimpleMenu.h>
14698 #include <X11/Xaw/SmeBSB.h>
14700 +#include <stdlib.h>
14701 #include <signal.h>
14704 @@ -101,7 +102,7 @@
14705 * Report the syntax for calling xditview.
14713 @@ -126,12 +127,12 @@
14715 void (*function)();
14716 } menuEntries[] = {
14717 - "nextPage", NextPage,
14718 - "previousPage", PreviousPage,
14719 - "selectPage", SelectPage,
14721 - "openFile", OpenFile,
14723 + {"nextPage", NextPage},
14724 + {"previousPage",PreviousPage},
14725 + {"selectPage", SelectPage},
14726 + {"print", Print},
14727 + {"openFile", OpenFile},
14731 static void NextPageAction(), PreviousPageAction(), SelectPageAction();
14732 @@ -139,17 +140,18 @@
14733 static void AcceptAction(), CancelAction();
14734 static void PrintAction();
14735 static void RerasterizeAction();
14736 +static void MakePrompt();
14738 XtActionsRec xditview_actions[] = {
14739 - "NextPage", NextPageAction,
14740 - "PreviousPage", PreviousPageAction,
14741 - "SelectPage", SelectPageAction,
14742 - "Print", PrintAction,
14743 - "OpenFile", OpenFileAction,
14744 - "Rerasterize", RerasterizeAction,
14745 - "Quit", QuitAction,
14746 - "Accept", AcceptAction,
14747 - "Cancel", CancelAction,
14748 + {"NextPage", NextPageAction},
14749 + {"PreviousPage", PreviousPageAction},
14750 + {"SelectPage", SelectPageAction},
14751 + {"Print", PrintAction},
14752 + {"OpenFile", OpenFileAction},
14753 + {"Rerasterize", RerasterizeAction},
14754 + {"Quit", QuitAction},
14755 + {"Accept", AcceptAction},
14756 + {"Cancel", CancelAction},
14759 #define MenuNextPage 0
14760 @@ -318,6 +320,7 @@
14762 static char fileBuf[1024];
14765 ResetMenuEntry (entry)
14768 @@ -516,6 +519,7 @@
14769 CancelAction (widget, event, params, num_params);
14773 MakePrompt(centerw, prompt, func, def)
14776 diff -Naur groff-1.18.1.4.orig/src/xditview/xtotroff.c groff-1.18.1.4/src/xditview/xtotroff.c
14777 --- groff-1.18.1.4.orig/src/xditview/xtotroff.c 2000-03-01 13:50:49.000000000 +0000
14778 +++ groff-1.18.1.4/src/xditview/xtotroff.c 2006-10-18 18:54:44.000000000 +0000
14782 * convert X font metrics into troff font metrics
14783 + * XXX: ENABLE_MULTIBYTE may not work yet
14786 #include <X11/Xlib.h>
14788 #include <unistd.h>
14789 #include <stdlib.h>
14791 +#include "config.h"
14792 #include "XFontName.h"
14793 #include "DviChar.h"
14795 @@ -171,6 +173,47 @@
14796 fprintf (out, "spacewidth %d\n", w);
14798 fprintf (out, "charset\n");
14799 +#if 0 /* def ENABLE_MULTIBYTE */
14800 + if (fi->min_byte1 != 0 || fi->max_byte1 != 0) {
14802 + * 2 byte code font.
14805 + int D = fi->max_char_or_byte2 - fi->min_char_or_byte2 + 1;
14806 + int max = (fi->max_byte1 - fi->min_byte1 + 1) *
14807 + (fi->max_char_or_byte2 - fi->min_char_or_byte2 + 1);
14810 + unsigned int euc_code;
14812 + for (N = 0; N < max; N++) {
14813 + byte1 = N / D + fi->min_byte1;
14814 + byte2 = N % D + fi->min_char_or_byte2;
14815 + euc_code = ((byte1 << 8) | byte2) & 0xffff | 0x8080;
14816 + wid = fi->max_bounds.width;
14817 + fputc(byte1 & 0xff | 0x80, out);/* output EUC code */
14818 + fputc(byte2 & 0xff | 0x80, out);/* output EUC code */
14819 + fprintf (out, "\t%d", wid);
14820 + if (groff_flag) {
14822 + param[0] = fi->max_bounds.ascent;
14823 + param[1] = fi->max_bounds.descent;
14824 + param[2] = 0 /* charRBearing (fi, c) - wid */;
14825 + param[3] = 0 /* charLBearing (fi, c) */;
14826 + param[4] = 0; /* XXX */
14827 + for (j = 0; j < 5; j++)
14828 + if (param[j] < 0)
14830 + for (j = 4; j >= 0; j--)
14831 + if (param[j] != 0)
14833 + for (k = 0; k <= j; k++)
14834 + fprintf (out, ",%d", param[k]);
14836 + fprintf (out, "\t0\t%#x\n", euc_code);
14839 +#endif /* ENABLE_MULTIBYTE */
14840 for (c = fi->min_char_or_byte2; c <= fi->max_char_or_byte2; c++) {
14841 char *name = DviCharName (char_map,c,0);
14842 if (charExists (fi, c) && (groff_flag || name)) {
14843 diff -Naur groff-1.18.1.4.orig/stamp-h groff-1.18.1.4/stamp-h
14844 --- groff-1.18.1.4.orig/stamp-h 1970-01-01 00:00:00.000000000 +0000
14845 +++ groff-1.18.1.4/stamp-h 2006-10-18 18:54:44.000000000 +0000
14848 diff -Naur groff-1.18.1.4.orig/tmac/Makefile.sub groff-1.18.1.4/tmac/Makefile.sub
14849 --- groff-1.18.1.4.orig/tmac/Makefile.sub 2002-07-13 20:41:16.000000000 +0000
14850 +++ groff-1.18.1.4/tmac/Makefile.sub 2006-10-18 18:54:44.000000000 +0000
14851 @@ -25,15 +25,19 @@
14852 html.tmac www.tmac \
14854 troffrc troffrc-end \
14859 + gb.tmac big5.tmac
14860 SPECIALFILES=an.tmac man.tmac s.tmac ms.tmac
14861 -STRIPFILES=e.tmac doc.tmac doc-old.tmac
14862 -MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
14863 +STRIPFILES=e.tmac doc.tmac doc-old.tmac docj.tmac
14864 +MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms docj-ditroff docj-nroff
14865 mdocdir=$(tmacdir)/mdoc
14867 stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed \
14868 stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \
14869 - doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s
14870 + doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s \
14871 + docj.tmac-s docj-ditroff-s docj-nroff-s
14875 diff -Naur groff-1.18.1.4.orig/tmac/andocj.tmac groff-1.18.1.4/tmac/andocj.tmac
14876 --- groff-1.18.1.4.orig/tmac/andocj.tmac 1970-01-01 00:00:00.000000000 +0000
14877 +++ groff-1.18.1.4/tmac/andocj.tmac 2006-10-18 18:54:44.000000000 +0000
14879 +.\" Load either tmac.an or tmac.doc.
14880 +.if !\n(.g .ab These macros require groff.
14891 diff -Naur groff-1.18.1.4.orig/tmac/big5.tmac groff-1.18.1.4/tmac/big5.tmac
14892 --- groff-1.18.1.4.orig/tmac/big5.tmac 1970-01-01 00:00:00.000000000 +0000
14893 +++ groff-1.18.1.4/tmac/big5.tmac 2006-10-18 18:54:44.000000000 +0000
14895 +.\" Kinsoku table for the BIG5 encoding of Chinese, recoded from
14896 +.\" kinsoku.el in Emacs 22.0.50.
14897 +.\" Needs review by native zh_TW speaker.
14899 +.cflags 256 ¡B¡C¡A¡D¡G¡F¡H¡I¡Ã¡Ä
14900 +.cflags 256 ¡²Éi¡X¡þ¡U¡L¡¦¡¨¡^
14901 +.cflags 256 ¡f¡b¡r¡n¡v¡z¡j¡Ñ¡×¡Õ¡Ø¡Û¡ñ¢X
14902 +.cflags 256 ¡½¡µ¡¶¡¾¡¿¡°¢E¡÷¡ö¡ô¡ã
14903 +.cflags 512 ¡Ö¡Ù¡ï¡ð¢X¢C¡ì
14904 +.cflags 512 ÛÖ¶yÅV¡D¡¶¡ù£H¢}
14906 +.\" http://tcl.apache.org/sources/tcl/tools/encoding/big5.txt lists U+FF0D
14907 +.\" as FULLWIDTH HYPHEN-MINUS. Is this correct?
14910 diff -Naur groff-1.18.1.4.orig/tmac/docj-ditroff groff-1.18.1.4/tmac/docj-ditroff
14911 --- groff-1.18.1.4.orig/tmac/docj-ditroff 1970-01-01 00:00:00.000000000 +0000
14912 +++ groff-1.18.1.4/tmac/docj-ditroff 2006-10-18 18:54:44.000000000 +0000
14914 +.\" Copyright (c) 1991 The Regents of the University of California.
14915 +.\" All rights reserved.
14917 +.\" Redistribution and use in source and binary forms, with or without
14918 +.\" modification, are permitted provided that the following conditions
14920 +.\" 1. Redistributions of source code must retain the above copyright
14921 +.\" notice, this list of conditions and the following disclaimer.
14922 +.\" 2. Redistributions in binary form must reproduce the above copyright
14923 +.\" notice, this list of conditions and the following disclaimer in the
14924 +.\" documentation and/or other materials provided with the distribution.
14925 +.\" 3. All advertising materials mentioning features or use of this software
14926 +.\" must display the following acknowledgement:
14927 +.\" This product includes software developed by the University of
14928 +.\" California, Berkeley and its contributors.
14929 +.\" 4. Neither the name of the University nor the names of its contributors
14930 +.\" may be used to endorse or promote products derived from this software
14931 +.\" without specific prior written permission.
14933 +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14934 +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14935 +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
14936 +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
14937 +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
14938 +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
14939 +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
14940 +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
14941 +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
14942 +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
14945 +.\" @(#)doc-ditroff 5.8 (Berkeley) 8/5/91
14947 +.\" tmac.mdoc-ditroff
14948 +.if \n(.g .if !rC .nr C 0
14966 +.ds lP \fR\|(\|\fP\s10
14967 +.ds lp \fR(\fP\s10
14968 +.ds rP \fR\|)\|\fP\s10
14969 +.ds rp \fR)\fP\s10
14970 +.ds lB \fR\^[\^\fP\s10
14971 +.ds rB \fR\^]\fP\s10
14977 +.ds Pu \fR{\ .\ ,\ :\ ;\ (\ )\ [\ ]\ \fR}
14991 +.nr sI \w
\a\fC,
\au*5
15037 +.if !"\\*(cH"Null" \{\
15038 +. ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
15039 +. el .as hT \\|(\\|\\*(cH\\|)
15041 +.if "\\*(cH"Null" \{\
15042 +. if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
15064 +.nr sW \w
\a\fC\\$1
\a
15065 +.ie \\n(sW>=\\n(fW \{\
15066 +. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
15067 +. el .nr sW \\n(sW/\\n(fW
15070 +. ie \\n(sW>0 .nr sW 1
15075 +.nr sW \w
\a\fC\\*(A\\$1
\a
15076 +.ie \\n(sW>=\\n(fW \{\
15077 +. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
15078 +. el .nr sW \\n(sW/\\n(fW
15081 +. ie \\n(sW>0 .nr sW 1
15104 +. if (\\n(aP>0) \{\
15108 +. if (\\n(aP==0) \{\
15109 +. rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
15110 +. rm S1 S2 S3 S4 S5 S6 S7 S8 S9
15134 +.ie "\\$1"NAME" \{\
15139 +. ie "\\$1"̾Á°" \{\
15144 +. ie "\\$1"̾¾Î" \{\
15155 +. if "\\$1"SYNOPSIS" \{\
15159 +. if "\\$1"½ñ¼°" \{\
15163 +. if "\\$1"DESCRIPTION" \{\
15170 +. if "\\$1"ÀâÌÀ" \{\
15177 +. if "\\$1"²òÀâ" \{\
15184 +. if "\\$1"SEE" \{\
15188 +. if "\\$1"´ØÏ¢¹àÌÜ" \{\
15192 +. if "\\$1"FILES" .nr nF 1
15193 +. if "\\$1"¥Õ¥¡¥¤¥ë" .nr nF 1
15194 +. if "\\$1"´ØÏ¢¥Õ¥¡¥¤¥ë" .nr nF 1
15195 +. if "\\$1"STANDARDS" .nr nT 1
15196 +. if "\\$1"½àµò" .nr nT 1
15197 +. if "\\$1"µ¬³Ê" .nr nT 1
15198 +. if "\\$1"AUTHORS" .nr nY 1
15199 +. if "\\$1"Ãø¼Ô" .nr nY 1
15200 +. if "\\$1"ºî¼Ô" .nr nY 1
15201 +. if "\\$1"SEE" .nr sE 1
15202 +. if "\\$1"´ØÏ¢¹àÌÜ" .nr sE 1
15211 +.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
15214 +\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
15216 +.in \\n(.iu+\\n(Tiu
15219 diff -Naur groff-1.18.1.4.orig/tmac/docj-nroff groff-1.18.1.4/tmac/docj-nroff
15220 --- groff-1.18.1.4.orig/tmac/docj-nroff 1970-01-01 00:00:00.000000000 +0000
15221 +++ groff-1.18.1.4/tmac/docj-nroff 2006-10-18 18:54:44.000000000 +0000
15223 +.\" Copyright (c) 1991 The Regents of the University of California.
15224 +.\" All rights reserved.
15226 +.\" Redistribution and use in source and binary forms, with or without
15227 +.\" modification, are permitted provided that the following conditions
15229 +.\" 1. Redistributions of source code must retain the above copyright
15230 +.\" notice, this list of conditions and the following disclaimer.
15231 +.\" 2. Redistributions in binary form must reproduce the above copyright
15232 +.\" notice, this list of conditions and the following disclaimer in the
15233 +.\" documentation and/or other materials provided with the distribution.
15234 +.\" 3. All advertising materials mentioning features or use of this software
15235 +.\" must display the following acknowledgement:
15236 +.\" This product includes software developed by the University of
15237 +.\" California, Berkeley and its contributors.
15238 +.\" 4. Neither the name of the University nor the names of its contributors
15239 +.\" may be used to endorse or promote products derived from this software
15240 +.\" without specific prior written permission.
15242 +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15243 +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15244 +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15245 +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
15246 +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15247 +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15248 +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15249 +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15250 +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15251 +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15254 +.\" @(#)doc-nroff 5.6 (Berkeley) 8/5/91
15256 +.\" tmac.mdoc-nroff
15278 +.ds lB \fR\|[\|\fP
15284 +.ds Pu {\ .\ ,\ ;\ :\ (\ )\ [\ ]}
15305 +.ie \\n(cR .nr Hm 0
15342 +.if !"\\*(cH"Null" \{\
15343 +. ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
15344 +. el .as hT \\|(\\|\\*(cH\\|)
15346 +.if "\\*(cH"Null" .if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
15355 +.if \\n(nl==0:\\n(nl==-1 'bp
15361 +.ie \\n(sW>=\\n(fW \{\
15362 +. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
15363 +. el .nr sW \\n(sW/\\n(fW
15368 +.nr sW \w
\a\\*(A\\$1
\a
15369 +.ie \\n(sW>=\\n(fW \{\
15370 +. ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
15371 +. el .nr sW \\n(sW/\\n(fW
15392 +.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
15398 +.ie "\\$1"NAME" \{\
15403 +. ie "\\$1"̾Á°" \{\
15408 +. ie "\\$1"̾¾Î" \{\
15420 +. if "\\$1"SEE" .nr nA 1
15421 +. if "\\$1"´ØÏ¢¹àÌÜ" .nr nA 1
15422 +. if "\\$1"FILES" .nr nF 1
15423 +. if "\\$1"¥Õ¥¡¥¤¥ë" .nr nF 1
15424 +. if "\\$1"´ØÏ¢¥Õ¥¡¥¤¥ë" .nr nF 1
15425 +. if "\\$1"STANDARDS" .nr nT 1
15426 +. if "\\$1"½àµò" .nr nT 1
15427 +. if "\\$1"µ¬³Ê" .nr nT 1
15428 +. if "\\$1"SYNOPSIS" .nr nS 1
15429 +. if "\\$1"½ñ¼°" .nr nS 1
15430 +. if "\\$1"DESCRIPTION" \{\
15437 +. if "\\$1"ÀâÌÀ" \{\
15444 +. if "\\$1"²òÀâ" \{\
15451 +. if "\\$1"AUTHORS" .nr nY 1
15452 +. if "\\$1"Ãø¼Ô" .nr nY 1
15453 +. if "\\$1"ºî¼Ô" .nr nY 1
15461 +.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
15464 +\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
15466 +.in \\n(.iu+\\n(Tiu
15467 +.if "\\$1"SEE" .nr sE 1
15470 diff -Naur groff-1.18.1.4.orig/tmac/docj.tmac groff-1.18.1.4/tmac/docj.tmac
15471 --- groff-1.18.1.4.orig/tmac/docj.tmac 1970-01-01 00:00:00.000000000 +0000
15472 +++ groff-1.18.1.4/tmac/docj.tmac 2006-10-18 18:54:44.000000000 +0000
15474 +.\" Copyright (c) 1991 The Regents of the University of California.
15475 +.\" All rights reserved.
15477 +.\" Redistribution and use in source and binary forms, with or without
15478 +.\" modification, are permitted provided that the following conditions
15480 +.\" 1. Redistributions of source code must retain the above copyright
15481 +.\" notice, this list of conditions and the following disclaimer.
15482 +.\" 2. Redistributions in binary form must reproduce the above copyright
15483 +.\" notice, this list of conditions and the following disclaimer in the
15484 +.\" documentation and/or other materials provided with the distribution.
15485 +.\" 3. All advertising materials mentioning features or use of this software
15486 +.\" must display the following acknowledgement:
15487 +.\" This product includes software developed by the University of
15488 +.\" California, Berkeley and its contributors.
15489 +.\" 4. Neither the name of the University nor the names of its contributors
15490 +.\" may be used to endorse or promote products derived from this software
15491 +.\" without specific prior written permission.
15493 +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15494 +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15495 +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15496 +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
15497 +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
15498 +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
15499 +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
15500 +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
15501 +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
15502 +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
15505 +.\" @(#)doc 5.8 (Berkeley) 8/5/91
15506 +.\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
15507 +.\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
15508 +.\" `tmac.doc-common' would be too long); when using groff, the doc-* files
15509 +.\" are loaded using the `mso' request.
15511 +.\" .mdoc-parse - attempt to parse troff request arguments
15519 +.so /usr/share/tmac/\\$1
15533 +.\" NS Db macro - start/stop DEBUG MODE
15534 +.\" NS Db register DEBUG MODE
15535 +.\" NS iN register DEBUG MODE (inline if 1, to stderr if 0 (default))
15539 +. ie \\n(Db==0 \{\
15549 +. if "\\$1"on" \{\
15553 +. if "\\$1"off" \{\
15559 +.\" NS aV macro - parse argument vector (recursive) (.aV arg ... )
15560 +.\" NS fV macro - parse argument vector (recursive) (.fV)
15561 +.\" NS aC register argument counter (aV/fV)
15562 +.\" NS fV register argument counter (must set to \\n(.$ prior to reuqest) (fV)
15563 +.\" NS A[0-9] argument vector (aV/fV)
15564 +.\" NS C[0-9] reg. arg type(1=macro, 2=arg, 3=punct-suf, 4=punct-pre) (aV/fV)
15565 +.\" NS S[0-9] space vector (sV)
15566 +.\" NS aP register argument pointer (aV)
15567 +.\" NS yU local string used for debugging
15568 +.\" NS iI local register (indent for inline debug mode)
15569 +.\" NS mN name of calling request (set in each user requestable macro)
15573 +. if "\\*(mN"Op" .ds A\\n(aC \fR\\$1\fP
15574 +. if "\\*(mN"Ar" .ds A\\n(aC \fR\\$1\fP
15575 +. if "\\*(mN"Fl" .ds A\\n(aC \fR\\$1\fP
15576 +. if "\\*(mN"Cm" .ds A\\n(aC \fR\\$1\fP
15577 +. if "\\*(mN"It" .ds A\\n(aC \fR\\$1\fP
15579 +.el .ds A\\n(aC \\$1
15581 +.nr C\\n(aC \\n(aT
15584 +. if \\n(aT==1 .ds yU Executable
15585 +. if \\n(aT==2 .ds yU String
15586 +. if \\n(aT==3 .ds yU Closing Punctuation or suffix
15587 +. if \\n(aT==4 .ds yU Opening Punctuation or prefix
15588 +. if \\n(iN==1 \{\
15592 +. if \\n(aC==1 \{\
15593 +\&\fBDEBUG(argv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c
15595 +\&\t\fBArgc:\fP \\n(aC \fBArgv:\fP `\\*(A\\n(aC' \fBLength:\fP \\n(sW
15596 +\&\t\fBSpace:\fP `\\*(S\\n(aC' \fBClass:\fP \\*(yU
15598 +. if \\n(iN==0 \{\
15599 +. if \\n(aC==1 \{\
15600 +. tm DEBUG(argv) MACRO: `.\\*(mN' Line #: \\n(.c
15602 +. tm \tArgc: \\n(aC Argv: `\\*(A\\n(aC' Length: \\n(sW
15603 +. tm \tSpace: `\\*(S\\n(aC' Class: \\*(yU
15608 +. ie \\n(dZ==1 \{\
15609 +. if \\n(oM>1 .as b1 \\*(S0
15613 +. if \\n(fC==0 .as b1 \\*(S0
15616 +. ds S0 \\*(S\\n(aC
15618 +. if \\n(iN==1 \{\
15619 +\&MACRO REQUEST: \t.\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
15623 +. if \\n(iN==0 \{\
15624 +.tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
15628 +.el .aV \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
15632 +.if "\\*(A\\n(aC"|" \{\
15633 +. if "\\*(mN"Op" .ds A\\n(aC \fR\\*(A\\n(aC\fP
15634 +. if "\\*(mN"Ar" .ds A\\n(aC \fR\\*(A\\n(aC\fP
15635 +. if "\\*(mN"Fl" .ds A\\n(aC \fR\&\\*(A\\n(aC\fP
15636 +. if "\\*(mN"Cm" .ds A\\n(aC \fR\\*(A\\n(aC\fP
15637 +. if "\\*(mN"It" .ds A\\n(aC \fR\\*(A\\n(aC\fP
15640 +.nr C\\n(aC \\n(aT
15643 +. if \\n(aT==1 .ds yU Executable
15644 +. if \\n(aT==2 .ds yU String
15645 +. if \\n(aT==3 .ds yU Closing Punctuation or suffix
15646 +. if \\n(aT==4 .ds yU Opening Punctuation or prefix
15647 +. if \\n(iN==1 \{\
15651 +. if \\n(aC==1 \{\
15652 +\&\fBDEBUG(fargv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c
15654 +\&\t\fBArgc:\fP \\n(aC \fBArgv:\fP `\\*(A\\n(aC' \fBLength:\fP \\n(sW
15655 +\&\t\fBSpace:\fP `\\*(S\\n(aC' \fBClass:\fP \\*(yU
15657 +. if \\n(iN==0 \{\
15658 +. if \\n(aC==1 \{\
15659 +. tm DEBUG(fargv) MACRO: `.\\*(mN' Line #: \\n(.c
15661 +. tm \tArgc: \\n(aC Argv: `\\*(A\\n(aC' Length: \\n(sW
15662 +. tm \tSpace: `\\*(S\\n(aC' Class: \\*(yU
15667 +. ie \\n(dZ==1 \{\
15668 +. if \\n(oM>1 .as b1 \\*(S0
15672 +. if \\n(fC==0 .as b1 \\*(S0
15675 +. ds S0 \\*(S\\n(aC
15679 +\&\tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
15684 +.tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
15693 +.\" NS aX macro - stuff saved strings into `b1' (used by -diag list)
15696 +.as b1 \&\\*(A\\n(aP
15707 +.\" NS aI macro - append arg to arg vector: .aI [arg] [type] (used by .En only)
15717 +. tm Usage: Too many arguments (maximum of 8 accepted) (#\\n(.c)
15718 +. tm \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
15722 +.\" NS aZ macro - print buffer (pB) and clean up arg vectors (aY)
15727 +.\" NS aY macro - clean up arg vector
15729 +.rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
15730 +.rm A0 A1 A2 A3 A4 A5 A6 A7 A8 A9
15731 +.rm S1 S2 S3 S4 S5 S6 S7 S8 S9
15735 +.\" NS pB macro - test for end of vector (eol) (print b1 buffer or divert)
15738 +. if \\n(oM==1 \{\&\\*(b1
15742 +. if \\n(oM==0 \{\
15747 +. ie \\n(oM==0 \{\&\\*(b1
15752 +. if ((\\n(sM==1)&(\\n(tP==0)) \{\
15759 +.\" NS x1 macro - save buffer and divert if tP flag set
15760 +.\" NS eB diversion string
15761 +.\" NS b2 string save of buffer
15762 +.\" NS lK register count of lines read from input file
15773 +.\" NS x2 macro - end diversion and print
15774 +.\" NS b0 string local temporary
15779 +.ie (\\n(.c-\\n(lK>1) \{\
15780 +. ds b0 \&\\*(eB\\
15781 +. ds b1 \\*(b2\\*(b0\\*(b1
15783 +.el .ds b1 \\*(b2\\*(b1
15788 +.\" NS Fl macro - flags (appends - and prints flags)
15789 +.\" NS cF register save current font
15790 +.\" NS cZ register save current font size
15794 +. ie \\n(.$==0 \{\
15795 +. as b1 \&\|\-\|\fP\s0
15800 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
15804 +. ie (\\n(aC-\\n(aP)==0 \{\
15805 +. as b1 \&\|\-\fP\s0
15810 +. ie \\n(C\\n(aP==1 \{\
15811 +. as b1 \&\|\-\fP\s0
15817 +. if \\n(C\\n(aP==3 \{\
15826 +.\" NS fR macro - Fl flag recursion routine (special handling)
15827 +.\" NS jM local register
15828 +.\" NS jN local register
15832 +.nr jM \\n(C\\n(aP
15839 +. ie \\n(jM==2 \{\
15840 +. ie !"\\*(A\\n(aP"\\*(Ba" \{\
15841 +. ie !"\\*(A\\n(aP"\fR|\fP" \{\
15842 +. ie "\\*(A\\n(aP"-" .as b1 \&\|\-\^\-\|
15843 +. el .as b1 \&\|\-\\*(A\\n(aP
15845 +. el .as b1 \&\\*(A\\n(aP
15847 +. el .as b1 \&\\*(A\\n(aP
15849 +. el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
15850 +. ie \\n(aC==\\n(aP \{\
15851 +. if \\n(jM==4 .as b1 \&\|\-
15857 +. ie ((\\n(C\\n(aP==3)&(\\n(C\\n(jN==4)) .as b1 \&\|\-
15858 +. el .as b1 \&\\*(S\\n(jN
15859 +. fR \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
15865 +.\" NS nR macro - general name recursion routine
15866 +.\" NS jM local register
15867 +.\" NS jN local register
15870 +.nr jM \\n(C\\n(aP
15872 +. as b1 \&\f\\n(cF\s\\n(cZ
15877 +. ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
15878 +. el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
15879 +. ie \\n(aC==\\n(aP \{\
15880 +. as b1 \&\f\\n(cF\s\\n(cZ
15885 +. as b1 \&\\*(S\\n(jN
15891 +.\" NS Ar macro - command line `argument' macro
15896 +. ie \\n(.$==0 \{\
15897 +. as b1 file\ ...\fP\s0
15902 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
15906 +. ie (\\n(aC-\\n(aP)==0 \{\
15907 +. as b1 \&file\ ...\fP\s0
15912 +. ie \\n(C\\n(aP==1 \{\
15913 +. as b1 \&file\ ...\fP\s0
15919 +. if \\n(C\\n(aP==3 \{\
15920 +. as b1 \&file\ ...
15927 +.\" NS Ad macro - Addresses
15930 +. ie \\n(.$==0 .tm Usage: .Ad address ... \\*(Pu (#\\n(.c)
15933 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
15936 +.if \\n(aC>\\n(aP \{\
15944 +.\" NS Cd macro - Config declaration (for section 4 SYNOPSIS) (not callable)
15945 +.\" needs work - not very translatable
15948 +. ie \\n(.$==0 .tm Usage: .Cd Configuration file declaration (#\\n(.c)
15965 +.if \\n(aC>\\n(aP \{\
15971 +. if "\\*(mN"Cd" \{\
15975 +. if \\n(iS==0 .nr iS \\n(Dsu
15987 +.\" NS Cm macro - Interactive command modifier (flag)
15990 +. ie \\n(.$==0 .tm Usage: .Cm Interactive command modifier ... \\*(Pu (#\\n(.c)
16006 +.if \\n(aC>\\n(aP \{\
16014 +.\" NS Dv macro - define variable
16017 +. ie \\n(.$==0 .tm Usage: .Dv define_variable ... \\*(Pu (#\\n(.c)
16020 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16023 +.if \\n(aC>\\n(aP \{\
16031 +.\" NS Em macro - Emphasis
16034 +. ie \\n(.$==0 \{\
16035 +. tm Usage: .Em text ... \\*(Pu (#\\n(.c)
16052 +.if \\n(aC>\\n(aP \{\
16060 +.\" NS Er macro - Errnotype
16063 +. ie \\n(.$==0 .tm Usage: .Er ERRNOTYPE ... \\*(Pu (#\\n(.c)
16066 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16069 +.if \\n(aC>\\n(aP \{\
16077 +.\" NS Ev macro - Environment variable
16080 +. ie \\n(.$==0 .tm Usage: .Ev ENVIRONMENT_VARIABLE ... \\*(Pu (#\\n(.c)
16083 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16086 +.if \\n(aC>\\n(aP \{\
16094 +.\" NS Fd macro - function declaration - not callable (& no err check)
16095 +.\" NS fD register subroutine test (in synopsis only)
16096 +.\" NS fY register subroutine count (in synopsis only) (fortran only)
16097 +.\" NS fZ register also subroutine count (in synopsis only)
16101 +.\" if a variable type was the last thing given, want vertical space
16106 +.\" if a subroutine was the last thing given, want vertical space
16108 +. ie \\n(fD==0 \{\
16118 +\&\\*(fD\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16123 +.\" NS Fr macro - function return value - not callable (at the moment)
16126 +. ie \\n(.$==0 .tm Usage: .Fr Function_return_value... \\*(Pu (#\\n(.c)
16129 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16132 +.if \\n(aC>\\n(aP \{\
16140 +.\" NS Ic macro - Interactive command
16143 +. ie \\n(.$==0 .tm Usage: .Ic Interactive command ... \\*(Pu (#\\n(.c)
16146 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16149 +.if \\n(aC>\\n(aP \{\
16157 +.\" NS Li macro - literals
16160 +. ie \\n(.$==0 .tm Usage .Li argument ... \\*(Pu (#\\n(.c)
16176 +.if \\n(aC>\\n(aP \{\
16184 +.\" NS Or macro - Pipe symbol (OR)
16187 +. ie \\n(.$==0 .tm Usage: .Or ... \\*(Pu (#\\n(.c)
16190 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16193 +.if \\n(aC>\\n(aP \{\
16201 +.\" NS Ms macro - Math symbol
16204 +. ie \\n(.$==0 .tm Usage: .Ms Math symbol ... \\*(Pu (#\\n(.c)
16207 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16210 +.if \\n(aC>\\n(aP \{\
16218 +.\" NS Nm macro - Name of command or page topic
16219 +.\" NS n1 string - save first invocation of .Nm
16220 +.\" NS iS register - indent second command line in a synopsis
16223 +. ie \\n(.$==0 \{\
16224 +. ie "\\*(n1"" .tm Usage: .Nm Name(s) ... \\*(Pu (#\\n(.c)
16225 +. el \&\\*(nM\\*(n1\fP\s0
16243 +. ie \\n(aC==\\n(aP \{\
16244 +. as b1 \&\\*(nM\\*(n1\fP\s0
16250 +. ie \\n(C\\n(aP==1 \{\
16251 +. as b1 \&\\*(n1\fP\s0
16258 +. if "\\*(mN"Nm" \{\
16263 +. if \\n(iS==0 \{\
16265 +. nr iS ((\\n(sWu+1)*\\n(fW)u
16273 +. if "\\*(n1"" .ds n1 \\*(A\\n(aP
16279 +.\" NS Pa macro - Pathname
16282 +. ie \\n(.$==0 \&\\*(pA~\fP\s0
16285 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16288 +.if \\n(aC>\\n(aP \{\
16296 +.\" NS Sy macro - Symbolics
16299 +. ie \\n(.$==0 .tm Usage: .Sy symbolic_text ... \\*(Pu (#\\n(.c)
16315 +.if \\n(aC>\\n(aP \{\
16323 +.\" NS Tn macro - Trade Name Macro
16326 +. ie \\n(.$==0 .tm Usage: .Tn Trade_name(s) ... \\*(Pu (#\\n(.c)
16329 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16332 +.if \\n(aC>\\n(aP \{\
16333 +. as b1 \\*(tN\\*(tF
16340 +.\" NS nN macro - Trade Name Macro for inside of reference
16343 +. ie \\n(.$==0 .tm Usage: .Tn Trade_name(s) ... \\*(Pu (#\\n(.c)
16346 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16349 +.if \\n(aC>\\n(aP \{\
16357 +.\" NS Va macro - variable name macro
16360 +. ie \\n(.$==0 .tm Usage: .Va variable_name(s) ... \\*(Pu (#\\n(.c)
16363 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16366 +.if \\n(aC>\\n(aP \{\
16375 +.\" NS No macro - Normal text macro (default text style if mess up)
16379 +. ie \\n(.$==0 .tm Usage: .No must be called with arguments (#\\n(.c)
16382 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16385 +.if \\n(aC>\\n(aP \{\
16387 +. ie \\n(C\\n(aP==1 \{\
16397 +.\"------------------------------------------------------------------------
16398 +.\" NS Op macro - Option Expression
16403 +.\" .ds qL \&\\*(lO
16404 +.\" .ds qR \&\\*(rO
16407 +.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
16409 +.\" NS Aq macro - Enclose string in angle brackets
16411 +.if \\n(aC==0 .ds mN Aq
16414 +.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16416 +.\" NS Bq macro - Enclose string in square brackets
16418 +.if \\n(aC==0 .ds mN Bq
16421 +.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16423 +.\" NS Dq macro - Enclose string in double quotes
16425 +.if \\n(aC==0 .ds mN Dq
16428 +.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16430 +.\" NS Eq macro - Enclose string in double quotes
16432 +.if \\n(aC==0 .ds mN Eq
16435 +.En \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16437 +.\" NS Pq macro - Enclose string in parenthesis
16439 +.if \\n(aC==0 .ds mN Pq
16442 +.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16444 +.\" NS Ql macro - Quoted literal is in file mdocj-[dit|n|g]roff (too large
16445 +.\" an if-else to carry along recursively for `if n ...')
16447 +.\" NS Sq macro - Enclose string in single quotes
16449 +.if \\n(aC==0 .ds mN Qq
16452 +.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16454 +.\" NS Sq macro - Enclose string in single quotes
16456 +.if \\n(aC==0 .ds mN Sq
16459 +.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16462 +.\" NS Es macro - Set up strings for .En call
16465 +. ie \\n(.$>2 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16471 +.if \\n(aC>\\n(aP \{\
16473 +. ds qL \\*(A\\n(aP
16475 +. ds qR \\*(A\\n(aP
16476 +. ie \\n(aC>\\n(aP .c\\n(C\\n(aP
16480 +.\" .tm En beg arg(A[\\n(aP])==\\*(A\\n(aP;
16481 +.\" .tm En oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
16482 +.\" NS En macro - Enclose string with given args (eg [ and ] etc)
16483 +.\" NS qL string variable set by calling macro
16484 +.\" NS qR string variable set by calling macro
16485 +.\" NS aJ register (for vR)
16488 +. ie \\n(.$==0 \{\
16489 +. as b1 \&\\*(qL\\*(qR
16494 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16502 +. ie (\\n(aC-\\n(aP)==0 \{\
16507 +. ie \\n(C\\n(aC==3 \{\
16511 +. ds A\\n(aJ \&\\*(qR\\*(A\\n(aJ
16514 +. el .aI \&\\*(qR 3
16516 +. if \\n(C\\n(aP==1 .\\*(A\\n(aP
16517 +. if \\n(C\\n(aP>1 \{\
16524 +.\" NS vR macro - vector routine (for En, trace backwards past trail punct)
16526 +.if \\n(C\\n(aJ==3 \{\
16531 +.\"------------------------------------------------------------------------
16532 +.\" NS Ao macro - Angle open
16534 +.if \\n(aC==0 .ds mN Ao
16536 +.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16538 +.\" NS Ac macro - Angle close
16540 +.if \\n(aC==0 .ds mN Ac
16542 +.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16544 +.\" NS Bo macro - Bracket open
16546 +.if \\n(aC==0 .ds mN Bo
16548 +.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16550 +.\" NS Bc macro - Bracket close
16552 +.if \\n(aC==0 .ds mN Bc
16554 +.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16556 +.\" NS Do macro - Double Quote open
16558 +.if \\n(aC==0 .ds mN Do
16560 +.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16562 +.\" NS Dc macro - Double Quote close
16564 +.if \\n(aC==0 .ds mN Dc
16566 +.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16568 +.\" NS Eo macro - Enclose open
16570 +.if \\n(aC==0 .ds mN Eo
16572 +.eO \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16574 +.\" NS Ec macro - Enclose close
16576 +.if \\n(aC==0 .ds mN Ec
16578 +.eC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16580 +.\" NS Oo macro - Option open
16582 +.if \\n(aC==0 .ds mN Oo
16584 +.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16586 +.\" NS Oc macro - Option close
16588 +.if \\n(aC==0 .ds mN Oc
16590 +.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16592 +.\" NS Po macro - Parenthesis open
16594 +.if \\n(aC==0 .ds mN Po
16596 +.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16598 +.\" NS Pc macro - Parenthesis close
16600 +.if \\n(aC==0 .ds mN Pc
16602 +.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16604 +.\" NS Qo macro - Straight Double Quote open
16606 +.if \\n(aC==0 .ds mN Qo
16608 +.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16610 +.\" NS Qc macro - Straight Double Quote close
16612 +.if \\n(aC==0 .ds mN Qc
16614 +.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16616 +.\" NS So macro - Single Quote open
16618 +.if \\n(aC==0 .ds mN So
16620 +.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16622 +.\" NS Sc macro - Single Quote close
16624 +.if \\n(aC==0 .ds mN Sc
16626 +.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16628 +.\" NS Xo macro - Extend open (continue)
16630 +.if \\n(aC==0 .ds mN Xo
16633 +.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16635 +.\" NS Xe macro - Extend close (end)
16638 +.if \\n(aC==0 .ds mN Xc
16640 +.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16642 +.\" NS eO macro - enclose string open
16643 +.\" NS oM register (extension possible)
16646 +.\" .tm eO last arg==A[\\n(aC]==\\*(A\\n(aC; aP==\\n(aP; oM==\\n(oM; dZ==\\n(dZ;
16649 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16654 +. if (\\n(dZ==0)&(\\n(sM==1) \{\
16669 +. if \\n(aC>\\n(aP \{\
16671 +. ie \\n(C\\n(aP==1 .\\*(A\\n(aP
16677 +. if \\n(aC==\\n(aP \{\
16678 +. if \\n(tP==1 \{\
16679 +.\" .tm SETTING Xt!!!
16683 +.\"CHANGED ds S0 \\*(iV
16688 +. if \\n(oM>1 .as b1 \\*(sV
16692 +.\" NS eC macro - enclose string close
16693 +.\" NS aa local register
16696 +.\" tm eC last arg==A[\\n(aC]==\\*(A\\n(aC; aP==\\n(aP; oM==\\n(oM; dZ==\\n(dZ;
16700 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16703 +. ie "\\*(xB"" \{\
16715 +. ie \\n(aC==\\n(aP \{\
16716 +. ie \\n(oM==0 \{\
16723 +. if \\n(C\\n(aa==2 .as b1 \\*(S\\n(aC
16724 +.\" tm CURRENT arg (aP==\\*(A\\n(aP and ap+1==\\*(A\\n(aa) tP==\\n(tP Xt==\\n(Xt
16727 +.\" tm UNSETTING Xt==\\n(Xt!!!!
16728 +. if \\n(Xt>0 .nr Xt \\n(Xt-1
16729 +.\" tm NOW Xt==\\n(Xt!!!!
16735 +.\"------------------------------------------------------------------------
16736 +.\" NS Pf macro - Prefix (calls .pF)
16738 +.if \\n(aC==0 .ds mN Pf
16740 +.pF \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16742 +.\" NS pF macro - Prefix (for prefixing open quotes, brackets etc)
16747 +. tm Warning: Missing arguments - prefix .Pf)
16750 +. el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16753 +. ie (\\n(aC-\\n(aP)>1 \{\
16755 +. as b1 \&\\*(A\\n(aP
16757 +. el .tm Warning: .Pf: trailing prefix (#\\n(.c)
16760 +. ie (\\n(aC-\\n(aP)==0 .aZ
16767 +.\" NS Ns macro - remove space (space remove done by .aV or .fV)
16771 +. ie \\n(.$>0 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16772 +. el .tm Usage: .Ns must be called with arguments (#\\n(.c)
16779 +. tm Usage: Ap "cannot be first request on a line (no .Ap)" (#\\n(.c)
16784 +.\" NS Hv macro - Hard (unpaddable) Space vector
16785 +.\" NS iV string inter-vector space
16786 +.\" NS sV string inter-argument space
16791 +.\" NS Sv macro - Soft Space vector (troff limitation)
16795 +.\" NS Tv macro - Tab Space vector
16799 +.\" NS Sm macro - Space mode
16800 +.\" NS sM register - default is one (space mode on)
16804 +. ie \\n(.$==0 .tm "Usage: .Sm [off | on]" (#\\n(.c)
16807 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
16812 +. if "\\*(A\\n(aP"on" \{\
16816 +. if "\\*(A\\n(aP"off" \{\
16818 +. rm S0 S1 S2 S3 S4 S5 S6 S7 S8 S9
16821 +. ie \\n(aC>\\n(aP \{\
16827 +.\"------------------------------------------------------------------------
16828 +.\" Size and Argument type macros
16829 +.\" NS aT macro - argument type
16830 +.\" NS aU macro - argument type (same as .aT but uses A[1-9] strings
16831 +.\" NS aT register argument type
16835 +.ie \\n(sW>2:(\A'\\$1'==0) \{\
16839 +. if \\n(sW==1 \{\
16840 +. ie \\n(z\\$1>2 \{\
16845 +. if \\n(sW==2 \{\
16856 +.ie \\n(sW>2:(\A'\\*(A\\$1'==0) .nr aT 2
16858 +. if \\n(sW==1 \{\
16859 +. ie \\n(z\\*(A\\$1>2 \{\
16860 +. nr aT \\n(z\\*(A\\$1
16864 +. if \\n(sW==2 \{\
16865 +. ie (\\n(\\*(A\\$1) \{\
16880 +. if \\n(sW==1 \{\
16881 +. ie \\n(z\\$1>2 \{\
16886 +. if \\n(sW==2 \{\
16897 +.ie \\n(sW>2 .nr aT 2
16899 +. if \\n(sW==1 \{\
16900 +. ie \\n(z\\*(A\\$1>2 \{\
16901 +. nr aT \\n(z\\*(A\\$1
16905 +. if \\n(sW==2 \{\
16906 +. ie (\\n(\\*(A\\$1) \{\
16914 +.\" NS s1 macro - set spacing for class type 1
16915 +.\" NS s2 macro - set spacing for class type 2
16916 +.\" NS s3 macro - set spacing for class type 3
16917 +.\" NS s1 macro - set spacing for class type 1
16918 +.\" NS s2 macro - set spacing for class type 2
16919 +.\" NS s3 macro - set spacing for class type 3
16920 +.\" NS s4 macro - set spacing for class type 4
16921 +.\" NS S[0-9] string spacing
16922 +.\" NS xX local register
16923 +.\" NS aa local register
16925 +.tm MDOC-ERROR: bogus type 0 (can't set space '\\*(A\\n(aC') (#\\n(.c)
16928 +.if \\n(\\*(A\\n(aC==3 \{\
16931 +. ds S\\n(aC \\*(sV
16933 +.if \\n(\\*(A\\n(aC==2 \{\
16935 +.\" this kludge can probably go away, but need to double check first
16936 +. ie "\\*(A\\n(aC"Nb" .ds S\\n(xX \\*(hV
16941 +.ds S\\n(aC \\*(sV
16948 +.ds S\\n(aC \\*(sV
16953 +.\" Class switches (on current argument aP)
16954 +.\" NS c0 macro - catch errors (non-existent class type 0)
16955 +.\" NS c1 macro - call request if type 1
16956 +.\" NS c2 macro - call .No if type 2
16957 +.\" NS c3 macro - call .No if type 3
16958 +.\" NS c4 macro - call .No if type 4
16960 +.tm MDOC-ERROR: bogus class 0 (can't determine '\\*(A\\n(aC') (#\\n(.c)
16977 +.\" NS y1 macro - ignore if class 1
16978 +.\" NS y2 macro - ignore if class 2
16979 +.\" NS y3 macro - append if type 3
16980 +.\" NS y4 macro - append if type 4
16988 +.as b1 \\*(A\\n(aP
16993 +.as b1 \\*(A\\n(aP
16997 +.\"--------------------------------------------------------------------------
16998 +.\" Ns Bf macro - Begin Font Mode (will be begin-mode/end-mode in groff & TeX)
16999 +.\" Ns Ef macro - End Font Mode
17005 +. if "\\$1"Em" \&\\*(eM\c
17006 +. if "\\$1"Li" \&\\*(lI\c
17007 +. if "\\$1"Sy" \&\\*(sY\c
17008 +. if "\\$1"-emphasis" \&\\*(eM\c
17009 +. if "\\$1"-literal" \&\\*(lI\c
17010 +. if "\\$1"-symbolic" \&\\*(sY\c
17012 +.el .tm Usage .Bf [Em | emphasis | Li | literal | Sy | symbolic] (#\\n(.c)
17016 +.ie \\n(.$>0 .tm Usage .Ef (does not take arguments) (#\\n(.c)
17017 +.el \&\f\\n(bF\s\\n(bZ
17019 +.\" Ns Bk macro - Begin Keep
17020 +.\" Ns Ek macro - End Keep
17021 +.\" Ns kS string - keep type
17025 +.tm Usage: .Bk [-lines | -words] (#\\n(.c)
17028 +. if !"\\*(kS"" .tm .Bk: nesting keeps not implemented yet. (#\\n(.c)
17029 +. if "\\$1"-lines" .tm .Bd -lines: Not implemented yet. (#\\n(.c)
17030 +. if "\\$1"-words" .Hv
17036 +.ie \\n(.$>0 .tm Usage .Ek (does not take arguments) (#\\n(.c)
17038 +. if "\\*(kS"-lines" .tm .Bd -lines: Not implemented yet. (#\\n(.c)
17039 +. if "\\*(kS"-words" .Sv
17043 +.\" NS Bd macro - Begin Display display-type [offset string]
17044 +.\" NS Ed macro - end Display
17045 +.\" NS O[0-9] registers - stack of indent
17046 +.\" NS d[0-9] registers - display-type stack
17050 +.tm Usage: .Bd [-literal | -filled | -ragged | -unfilled] [-offset [string]] [-compact] (#\\n(.c)
17057 +. if "\\$1"-literal" \{\
17063 +' ta 9n 18n 27n 36n 45n 54n 63n 72n
17066 +' ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
17070 +. if "\\$1"-filled" \{\
17075 +. if "\\$1"-ragged" \{\
17080 +. if "\\$1"-unfilled" \{\
17085 +.\" .tm Here is argc: \\n(.$ and here is iD \\n(iD
17086 +. if ((\\n(iD>=1)&(\\n(.$>\\n(iD)) \{\
17087 +. bV \\$2 \\$3 \\$4
17089 +. if \\n(O\\n(dP>0 'in \\n(.iu+\\n(O\\n(dPu
17090 +. if (\\n(bV==0) \{\
17091 +. if (\\n(nS==0) \{\
17092 +. ie "\\*(d\\n(dP"dR" .sp \\n(dVu
17096 +. if \\n(cR==0 .ne 2v
17101 +.\" NS bV macro - resolve remaining .Bd arguments
17103 +.\" .tm in bV with args: \\$1 \\$2 \\$3
17106 +.if "\\$1"-offset" \{\
17108 +. if "\\*(bY"left" \{\
17112 +. if "\\*(bY"right" \{\
17114 +. nr O\\n(dP (\\n(.l/3)u
17116 +. if "\\*(bY"center" \{\
17118 +. nr O\\n(dP (\\n(.l-\\n(.i)/4u
17120 +. if "\\*(bY"indent" \{\
17122 +. nr O\\n(dP \\n(dIu
17124 +. if "\\*(bY"indent-two" \{\
17126 +. nr O\\n(dP \\n(dIu+\\n(dIu
17128 +. if \\n(iD==1 \{\
17132 +. ie ((\\*(bY>9n)&(\\*(bY<100n)) \{\
17133 +. nr O\\n(dP \\*(bY
17135 +. el .nr O\\n(dP (\\n(sW)*\\n(fWu
17138 +. if \\n(sW==2 .aT \\*(bY
17139 +. ie \\n(aT==1 \{\
17140 +. nr O\\n(dP \\n(\\*(bY
17142 +. el .nr O\\n(dP \\*(bY
17146 +.if "\\$1"-compact" \{\
17149 +.if \\n(iD<\\n(.$ \{\
17150 +. ie "\\*(bY"" \{\
17158 +.\" NS Ed macro - end display
17162 +.if \\n(dP==0 .tm mdoc: Extraneous .Ed
17163 +.if "\\*(d\\n(dP"dL" \{\
17167 +.in \\n(.iu-\\n(O\\n(dPu
17174 +.\"--------------------------------------------------------------------------
17175 +.\" NS Bl macro - begin list (.Bl list-type)
17176 +.\" NS L[0-9] registers - stack of list types
17179 +.tm Usage: .Bl [[-hang | -tag] [-width]] [ -item | -enum | -bullet | -diag] (#\\n(.c)
17194 +. if "\\$1"-hang" \{\
17200 +. if "\\$1"-tag" \{\
17205 +. if "\\$1"-item" \{\
17210 +. if "\\$1"-enum" \{\
17216 +. if "\\$1"-bullet" \{\
17222 +. if "\\$1"-dash" \{\
17228 +. if "\\$1"-hyphen" \{\
17234 +. if "\\$1"-inset" \{\
17239 +. if "\\$1"-diag" \{\
17244 +. if "\\$1"-ohang" \{\
17249 +. if "\\$1"-column" \{\
17253 +. ie \\n(aP==0 \{\
17254 +. tm \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
17255 +. tm Usage: .Bl [[-inset|-tag] -width] [-item|-enum|-bullet|-diag] (#\\n(.c)
17259 +. if (\\n(aP==1)&(\\n(aP<\\n(.$) \{\
17262 +. if "\\*(L\\n(lC"cL" \{\
17266 +. ie \\n(v\\n(lC==1 \{\
17280 +.\" .tm Here is L[\\n(lC]==\\*(L\\n(lC
17285 +. while \ni<100 \{\
17290 +.\" NS lV macro - resolve remaining .Bl arguments
17293 +.if \\n(fV>=\\n(aP \{\
17295 +. if "\\*(A\\n(aP"-compact" \{\
17299 +. if "\\*(A\\n(aP"-width" \{\
17303 +. ds t\\n(lC TagwidtH
17304 +. ds tS \\*(A\\n(aP
17307 +. nr w\\n(lC (\\n(sW)*\\n(fWu
17308 +. if \\n(sW==3 \{\
17310 +. if \A'\\*(tS' .if r num!\\*(tS \{\
17311 +. nr w\\n(lC \\*(tS
17315 +. if (\\*(tS>9n)&(\\*(tS<99n) \{\
17316 +. nr w\\n(lC \\*(tSu
17323 +. ie \\n(aT==1 \{\
17324 +. nr w\\n(lC \\n(\\*(tS
17327 +. nr w\\n(lC \\*(tSu
17331 +. if "\\*(A\\n(aP"-offset" \{\
17334 +. ie "\\*(A\\n(aP"indent" \{\
17335 +. nr o\\n(lC \\n(Dsu
17338 +. ds tS \\*(A\\n(aP
17341 +. nr o\\n(lC (\\n(sW)*\\n(fWu
17343 +. if \A'\\*(tS' .if r num!\\*(tS \{\
17344 +. nr o\\n(lC \\*(tS
17348 +. if (\\*(tS>9n)&(\\*(tS<100n) \{\
17349 +. nr o\\n(lC \\*(tS
17354 +. ie \\n(C\\n(aP==1 .nr o\\n(lC \\n(\\*(tS
17355 +. el .nr o\\n(lC \\*(tS
17359 +. if \\n(iD==0 \{\
17360 +. if "\\*(L\\n(lC"cL" \{\
17362 +. ds A\\n(wV \\*(A\\n(aP
17365 +. if \\n(fV>\\n(aP .lV
17368 +.\" NS El macro - end list
17369 +.\" NS iD local register
17372 +. tm Usage: .El (#\\n(.c)
17377 +. if "\\*(L\\n(lC"cL" \{\
17381 +. if "\\*(L\\n(lC"nU" \{\
17391 +. if "\\*(L\\n(lC"iT" \{\
17392 +' in \\n(.iu-\\n(o\\n(lCu
17398 +. if "\\*(L\\n(lC"oL" \{\
17399 +' in \\n(.iu-\\n(o\\n(lCu
17405 +. if "\\*(L\\n(lC"lL" \{\
17406 +' in \\n(.iu-\\n(o\\n(lCu
17412 +. if \\n(iD==0 \{\
17419 +.\" NS It macro - list item
17420 +.\" NS iD local register
17421 +.\" NS aA save pA font string for section FILES (no underline if nroff)
17423 +.if "\\*(L\\n(lC"" \{\
17424 +. tm Usage .Bl -list-type [-width [string] | -compact | -offset [string]] (#\\n(.c)
17425 +. tm .It \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
17427 +.\" .tm Here is L[\\n(lC]==\\*(L\\n(lC
17443 +. if "\\*(L\\n(lC"mL" \{\
17449 +. if "\\*(L\\n(lC"cL" \{\
17455 +. if "\\*(L\\n(lC"iT" \{\
17460 +. if \\n(iD==0 \{\
17462 +.\" tm ------------------------------------------------------------------------
17463 +.\" tm It list-type==\\*(L\\n(lC, aP==\\n(aP
17464 +.\" tm It beg arg(A[1])==\\*(A1; oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
17468 +. nr tX \\n(C\\n(aP
17469 +. ds tX \\*(A\\n(aP
17470 +. if \\n(nF==1 \{\
17472 +. if n .ds pA \\*(nO
17474 +. ie \\n(C\\n(aP==1 \{\
17481 +.\" tm in It here is b1==\\*(b1
17482 +.\" tm It mid arg(A[1])==\\*(A1; oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
17483 +. ie \\n(Xt==1 .ds xB \&\\*(L\\n(lC
17490 +.\" NS lL macro - .It item of list-type inset
17501 +.\" NS hL macro - .It item of list-type hanging label (as opposed to tagged)
17504 +.nr bb \\n(w\\n(lCu+\\n(lSu
17506 +.ie \w
\a\\*(b1
\au>=(\\n(w\\n(lCu) \&\\*(b1
17507 +.el \&\\*(b1\h'|\\n(bbu'\c
17514 +.\" NS oL macro - .It item of list-type overhanging label
17525 +.\" NS iT macro - .It item of list-type [empty label]
17533 +.\" NS nU macro - Enumerated list
17534 +.\" NS nU register count
17535 +.\" NS hU macro - Hyphen paragraph list (sub bullet list)
17536 +.\" NS bU macro - Bullet paragraph list
17546 +.ds b1 \&\\*(sY\&\(bu\fP
17552 +.ds b1 \&\\*(sY\&\-\fP
17555 +.\" NS uL macro - .It item of list-type enum/bullet/hyphen
17558 +.nr bb \\n(w\\n(lCu+\\n(lSu
17560 +.ie \w
\a\\*(b1
\au>=(\\n(w\\n(lCu) \&\\*(b1
17561 +.el \&\\*(b1\h'|\\n(bbu'\c
17563 +.\" .nr dZ \\n(dZ+1
17569 +.\" NS mL macro - .It item of list-type diagnostic-message
17575 +. ie (\\n(zB-\\n(zA)>1 .Pp
17584 +\&\\*(sY\\*(b1\f\\n(cF\s\\n(cZ\\*(lS\c
17589 +.\" NS tL macro - .It item of list-type "tag"
17591 +.\" tm in tL here is b1==\\*(b1
17594 +.nr bb \\n(w\\n(lCu+\\n(lSu
17596 +.ie (\w
\a\\*(b1
\au)>(\\n(w\\n(lCu) \{\&\\*(b1
17599 +.el \&\\*(b1\h'|\\n(bbu'\c
17601 +. if n .ds pA \\*(aA
17605 +.\" .nr dZ \\n(dZ+1
17610 +.\" NS lW macro - resolve unknown label/tag width (if .Bl [inset | tag] only)
17612 +.if !"TagwidtH"\\*(t\\n(lC" \{\
17613 +. ie \\n(tX==1 \{\
17614 +. ds t\\n(lN \\*(tX
17615 +. nr w\\n(lN \\n(\\*(tX
17619 +. nr w\\n(lN \\n(No
17621 +. if !"\\*(t\\n(lC"\\*(t\\n(lN" .nr tC 1
17624 +.\" NS lX macro - set up vertical spacing (if compact) and offset+indent (all)
17629 +. if \\n(v\\n(lC==0 .sp \\n(dVu
17630 +. in \\n(.iu+\\n(w\\n(lCu+\\n(o\\n(lCu+\\n(lSu
17633 +. ie \\n(v\\n(lC==1 \{\
17640 +.if !\\n(cR .ne 2v
17642 +.\" NS lY macro - set up vertical spacing (if compact) and offset+indent (all)
17647 +. if \\n(v\\n(lC==0 .sp \\n(dVu
17648 +. in \\n(.iu+\\n(o\\n(lCu
17651 +. ie \\n(v\\n(lC==1 \{\
17658 +.if !\\n(cR .ne 2v
17660 +.\" NS tS temporary string
17661 +.\" NS hL macro - hanging list function
17662 +.\" NS tS temporary string
17663 +.\" NS hL macro - hanging list function
17664 +.\" NS lT macro - tagged list function
17665 +.\" NS lE macro - list end function
17666 +.\" NS tX string (initial string)
17667 +.\" NS tX register (initial class)
17668 +.\" NS tC parameter change flag
17669 +.\" NS Xt save current list-type flag
17670 +.\" NS lC register - list type stack counter
17671 +.\" NS tP register tag flag (for diversions)
17672 +.\" NS w[0-9] register tag stack (nested tags)
17673 +.\" NS t[0-9] register tag string stack (nested tags)
17674 +.\" NS o[0-9] register offset stack (nested tags)
17675 +.\" NS v[0-9] register vertical tag break stack
17676 +.\" NS h[0-9] register horizontal tag stack (continuous if 1, break if 0)
17685 +.\" IN lC o[\\n(lC]==\\n(o\\n(lC, w[\\n(lC]==\\n(w\\n(lC,
17686 +.ie \\n(o\\n(lC>0 \{\
17687 +' in \\n(.iu-(\\n(w\\n(lCu)-(\\n(o\\n(lCu)-\\n(lSu
17690 +.el 'in \\n(.iu-\\n(w\\n(lCu-\\n(lSu
17691 +.if \\n(lC<=0 .tm Extraneous .El call (#\\n(.c)
17696 +.\" NS tY macro - set up next block for list
17697 +.\" NS tZ macro - decrement stack
17698 +.\" NS tY register (next possible lC value)
17704 +.ds t\\n(tY \\*(t\\n(lC
17717 +.\" initial values
17724 +.\" NS Xr macro - cross reference (man page only)
17727 +. ie \\n(.$==0 .tm Usage: .Xr manpage_name [section#] \\*(Pu (#\\n(.c)
17730 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
17733 +.if \\n(aC>\\n(aP \{\
17735 +. ie \\n(C\\n(aP==1 .tm Usage: .Xr manpage_name [section#] \\*(Pu (#\\n(.c)
17737 +. ie \\n(C\\n(aP>2 .y\\n(C\\n(aP
17739 +. as b1 \&\\*(xR\\*(A\\n(aP\fP\s0
17740 +. if \\n(aC>\\n(aP \{\
17742 +. if \\n(C\\n(aP==2 \{\
17743 +. as b1 \&(\\*(A\\n(aP)
17746 +. if \\n(aC>=\\n(aP \{\
17755 +.\" NS Sx macro - cross section reference
17758 +. ie \\n(.$==0 .tm Sx Usage: .Sx Section Header \\*(Pu (#\\n(.c)
17761 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
17765 +.if \\n(aC>\\n(aP \{\
17773 +.\" NS cC macro - column-list end-list
17774 +.\" NS eW macro - column indent width
17775 +.\" NS cI register - column indent width
17776 +.\" NS W[1-5] macro - establish tabs for list-type column
17778 +'in \\n(.iu-\\n(o\\n(lCu-\\n(w\\n(lCu
17779 +.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
17786 +.ta \w
\a\\*(A1
\au
17787 +.nr eW \w
\a\\*(A1
\au
17788 +'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
17791 +.ta \w
\a\\*(A1
\au +\w
\a\\*(A2
\au
17792 +.nr eW \w
\a\\*(A1
\au+\w
\a\\*(A2
\au
17793 +'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
17796 +.ta \w
\a\\*(A1
\au +\w
\a\\*(A2
\au +\w
\a\\*(A3
\au
17797 +.nr eW \w
\a\\*(A1
\au+\w
\a\\*(A2
\au+\w
\a\\*(A3
\au
17798 +'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
17801 +.ta \w
\a\\*(A1
\au +\w
\a\\*(A2
\au +\w
\a\\*(A3
\au +\w
\a\\*(A4
\au
17802 +.nr eW \w
\a\\*(A1
\au+\w
\a\\*(A2
\au +\w
\a\\*(A3
\au +\w
\a\\*(A4
\au
17803 +'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
17806 +.ta \w
\a\\*(A1
\au +\w
\a\\*(A2
\au +\w
\a\\*(A3
\au +\w
\a\\*(A4
\au +\w
\a\\*(A5
\au
17807 +.nr eW \w
\a\\*(A1
\au +\w
\a\\*(A2
\au +\w
\a\\*(A3
\au +\w
\a\\*(A4
\au +\w
\a\\*(A5
\au
17808 +' in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
17810 +.\" This is packed abnormally close, intercol width should be an option
17812 +.ta \w
\a\\*(A1
\au +\w
\a\\*(A2
\au +\w
\a\\*(A3
\au +\w
\a\\*(A4
\au +\w
\a\\*(A5
\au +\w
\a\\*(A6
17813 +.nr eW \w
\a\\*(A1
\au +\w
\a\\*(A2
\au +\w
\a\\*(A3
\au +\w
\a\\*(A4
\au +\w
\a\\*(A5
\au +\w
\a\\*(A6
17814 +' in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
17816 +.\" NS cL macro - column items
17818 +.if \\n(w\\n(lC==0 .nr w\\n(lC \\n(eWu
17821 +' in \\n(.iu+\\n(eWu
17826 +.ie \\n(aC>=\\n(aP \{\
17827 +. if "\\*(A\\n(aP"Ta" \{\
17834 +.el .tm Usage: .It column_string [Ta [column_string ...] ] (#\\n(.c)
17836 +.\" NS Ta macro - append tab (\t)
17840 +. ie \\n(aC>=\\n(aP \{\
17841 +. if "\\*(A\\n(aP"Ta" \{\
17858 +. tm Usage: Ta must follow column entry: e.g. (#\\n(.c)
17859 +. tm .It column_string [Ta [column_string ...] ]
17863 +.\" NS Dl macro - display (one line) literal
17865 +'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
17866 +.in \\n(.iu+\\n(Dsu
17868 +. ie \\n(.$==0 \{\
17869 +. tm Usage: .Dl argument ... (#\\n(.c)
17888 +. tm Usage: .Dl not callable by other macros (#\\n(.c)
17890 +.in \\n(.iu-\\n(Dsu
17893 +.\" NS D1 macro - display (one line)
17895 +'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
17896 +.in \\n(.iu+\\n(Dsu
17898 +. ie \\n(.$==0 \{\
17899 +. tm Usage: .D1 argument ... (#\\n(.c)
17915 +. ie \\n(C\\n(aP==1 .\\*(A\\n(aP
17920 +. tm Usage: .D1 not callable by other macros (#\\n(.c)
17922 +.in \\n(.iu-\\n(Dsu
17924 +.\" NS Ex macro - DEFUNCT
17926 +.tm Ex defunct, Use .D1: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
17929 +.\" NS Ex macro - DEFUNCT
17931 +.tm Ex defunct, Use .D1: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
17934 +.\" NS Vt macro - Variable type (for forcing old style variable declarations)
17935 +.\" this is not done in the same manner as .Ot for fortrash - clean up later
17937 +.\" if a function declaration was the last thing given, want vertical space
17942 +.\" if a subroutine was the last thing given, want vertical space
17944 +. ie \\n(fX==0 \{\
17953 +\\*(fT\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
17960 +.\" NS Ft macro - Function type
17982 +\&\\*(fT\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
17988 +.\" NS Ot macro - Old Function type (fortran - no newline)
17989 +.\" Ns oT register
18010 +.if \\n(.$==4 .as b1 \&\\*(fT\&\\$1 \\$2 \\$3 \\$4
18011 +.if \\n(.$==3 .as b1 \&\\*(fT\&\\$1 \\$2 \\$3
18012 +.if \\n(.$==2 .as b1 \&\\*(fT\&\\$1 \\$2
18013 +.if \\n(.$==1 .as b1 \&\\*(fT\&\\$1
18017 +.\" NS Fa macro - Function arguments
18020 +. ie \\n(.$==0 .tm Usage: .Fa Function Arguments ... \\*(Pu (#\\n(.c)
18040 +. if \\n(aC>\\n(aP \{\
18052 +.\" NS fC macro - interal .Fa for .FO and .Fc
18054 +.ie \\n(aC>\\n(aP \{\
18056 +.\" . nr aa \\n(aP
18057 +.\" . if \\n(nS>0 \{\
18068 +. as b1 \&\f\\n(cF\s\\n(cZ,\\*(S\\n(aP\\*(fA\\*(A\\n(aP\fP\s0
18069 +.\" . as b1 \&\\,\\*(S\\n(aP\fP\s0\\*(fA\\*(A\\n(aP\fP\s0
18071 +. if \\n(fC==1 \{\
18072 +. as b1 \&\|\\*(fA\\*(A\\n(aP\fP\s0
18081 +.\" NS Fn macro - functions
18082 +.\" NS fY register - dick with old style function declarations (fortran)
18083 +.\" NS fZ register - break a line when more than one function in a synopsis
18087 +. ie \\n(.$==0 .tm Usage: .Fn function_name function_arg(s) ... \\*(Pu (#\\n(.c)
18104 +.\" if there is/has been more than one subroutine declaration
18105 +. if \\n(fY==0 \{\
18112 +. if \\n(fY==1 \{\
18131 +. if \\n(iS==0 \{\
18132 +. nr iS ((8)*\\n(fW)u
18139 +.if \\n(aC>\\n(aP \{\
18143 +. as b1 \\*(fN\\*(A\\n(aP\fP\s0\\*(lp
18144 +. ie \\n(aC>\\n(aP \{\
18159 +.\" NS f1 macro - class switch
18160 +.\" NS f2 macro - handle function arguments
18161 +.\" NS f3 macro - punctuation
18162 +.\" NS f4 macro - write out function
18164 +.as b1 \\*(rp\f\\n(cF\s\\n(cZ
18178 +.as b1 \\*(A\\n(aP
18179 +.ie \\n(aC>\\n(aP \{\
18182 +. if \\n(C\\n(aP==2 \{\
18183 +. as b1 \&\|\f\\n(cF\s\\n(cZ,\\*(S\\n(aa\fP\s0\|
18188 +. as b1 \\*(rp\f\\n(cF\s\\n(cZ
18193 +.as b1 \\*(rp\f\\n(cF\s\\n(cZ\\*(A\\n(aP
18194 +.ie \\n(aC>\\n(aP \{\
18200 +.as b1 \\*(rp\f\\n(cF\s\\n(cZ\\*(S\\n(aP\\*(A\\n(aP
18201 +.ie \\n(aC>\\n(aP \{\
18210 +. ie \\n(.$==0 .tm Usage: .Fo function_name
18227 +.\" if there is/has been more than one subroutine declaration
18228 +. if \\n(fY==0 \{\
18235 +. if \\n(fY==1 \{\
18254 +. if \\n(iS==0 \{\
18255 +. nr iS ((8)*\\n(fW)u
18262 +.if \\n(aC>\\n(aP \{\
18268 +. as b1 \\*(fN\\*(A\\n(aP\fP\s0\\*(lp
18292 +.ie \\n(aC>\\n(aP \{\
18304 +.\" NS fb macro - if SYNOPSIS, set hard space inbetween function args
18305 +.\" NS fb register - count of words in a function argument
18306 +.\" NS Fb register - counter
18307 +.\" NS Fb string - temporary string
18309 +.\" .tm fB==\\n(fB, Fb==\\n(Fb, 1==\\$1 2==\\$2 3==\\$3 4==\\$4 5==\\$5 6==\\$6
18317 +.if \\n(Fb<\\n(fB \{\
18319 +. fB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
18322 +.\" NS Fc - Function close - not implemented yet
18323 +.\" NS Fo - Function open - not implemented yet
18325 +.\" Very crude references, stash all reference info into strings (usual
18326 +.\" use of b1 buffer, then b1 contents copied to string of retrievable
18327 +.\" naming convention), print out reference on .Re request and clean up.
18328 +.\" Ordering very limited, no fancy citations, but can do articles, journals
18329 +.\" and books - need to add several missing options (like city etc).
18330 +.\" should be able to grab a refer entry, massage it a wee bit (prefix
18331 +.\" a `.' to the %[A-Z]) and not worry (ha!)
18333 +.\" NS Rs macro - Reference Start
18334 +.\" NS rS register - Reference Start flag
18335 +.\" NS rS string - Reference Start buffer name for next save (of b1 buffer)
18342 +.\" NS Re macro - Reference End
18348 +.\" NS rC macro - reference cleanup
18362 +.rm U1 U2 U3 U4 U5 U6 U7 U8
18363 +.rm uK jK nK oK rK qK tK vK dK pK bK
18365 +.\" NS rZ macro - reference print
18367 +.if \\n(uK \{\&\\*(U1,
18369 +. if (\\n(uK>1 \{\
18376 +. if \\n(Kl==0 \{\
18377 +. ie (\\n(jK==1):(\\n(bK==1) \{\&\\*q\\*(tK\\*q.
18379 +. el \{\&\\*(eM\\*(tK\\*(nO.
18383 +. ie (\\n(jK==1):(\\n(bK==1) \{\&\\*q\\*(tK\\*q,
18385 +. el \{\&\\*(eM\\*(tK\\*(nO,
18391 +. if \\n(Kl==0 \&\\*(eM\\*(bK\\*(nO.
18392 +. if \\n(Kl>0 \&\\*(eM\\*(bK\\*(nO,
18396 +. if \\n(Kl==0 \&\\*(eM\\*(jK\\*(nO.
18397 +. if \\n(Kl>0 \&\\*(eM\\*(jK\\*(nO,
18401 +. if \\n(Kl==0 \&\\*(rK.
18402 +. if \\n(Kl>0 \&\\*(rK,
18406 +. if \\n(Kl==0 \&\\*(nK.
18407 +. if \\n(Kl>0 \&\\*(nK,
18411 +. if \\n(Kl==0 \&\\*(vK.
18412 +. if \\n(Kl>0 \&\\*(vK,
18416 +. if \\n(Kl==0 \&\\*(pK.
18417 +. if \\n(Kl>0 \&\\*(pK,
18421 +. if \\n(Kl==0 \&\\*(qK.
18422 +. if \\n(Kl>0 \&\\*(qK,
18426 +. if \\n(Kl==0 \&\\*(dK.
18427 +. if \\n(Kl>0 \&\\*(dK,
18431 +. if \\n(Kl==0 \&\\*(oK.
18432 +. if \\n(Kl>0 \&\\*(oK,
18434 +.if \\n(Kl>0 .tm unresolved reference problem
18436 +.\" NS aK macro - print out reference authors
18439 +.ie (\\n(uK-\\n(aK)==0 \{\&and \\*(U\\n(aK,
18441 +.el \{\&\\*(U\\n(aK,
18445 +.\" NS %A macro - reference author(s)
18446 +.\" NS uK register - reference author(s) counter
18447 +.\" NS U[1-9] strings - reference author(s) names
18450 +. ie \\n(.$==0 .tm Usage: .%A Author_name (#\\n(.c)
18456 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
18459 +.if \\n(aC>\\n(aP \{\
18466 +.\" NS %B macro - [reference] Book Name
18467 +.\" NS bK string - Book Name
18468 +.\" NS bK register - Book Name flag
18471 +. ie \\n(.$==0 .tm Usage: .%B Book Name (#\\n(.c)
18492 +.if \\n(aC>\\n(aP \{\
18496 +. ie \\n(rS==0 \{\
18503 +.\" NS %D macro - [reference] Date
18504 +.\" NS dK string - Date String
18505 +.\" NS dK register - Date flag
18508 +. ie \\n(.$==0 .tm Usage: .%D Date (#\\n(.c)
18527 +.if \\n(aC>\\n(aP \{\
18534 +.\" NS %J macro - [reference] Journal Name
18535 +.\" NS jK register - [reference] Journal Name flag
18536 +.\" NS jK string - [reference] Journal Name
18539 +. ie \\n(.$==0 .tm Usage: .%J Journal Name (#\\n(.c)
18558 +.if \\n(aC>\\n(aP \{\
18565 +.\" NS %N macro - [reference] issue number
18566 +.\" NS nK register - [reference] issue number flag
18567 +.\" NS nK string - [reference] issue number
18570 +. ie \\n(.$==0 .tm Usage: .%N issue number (#\\n(.c)
18576 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
18579 +.if \\n(aC>\\n(aP \{\
18586 +.\" NS %O macro - [reference] optional information
18587 +.\" NS oK register - [reference] optional information flag
18588 +.\" NS oK string - [reference] optional information
18591 +. ie \\n(.$==0 .tm Usage: .%O optional information ... \\*(Pu (#\\n(.c)
18610 +.if \\n(aC>\\n(aP \{\
18617 +.\" NS %P macro - [reference] page numbers
18618 +.\" NS pK register - [reference] page number flag
18619 +.\" NS pK string - [reference] page number
18622 +. ie \\n(.$==0 .tm Usage: .%P page numbers ... \\*(Pu (#\\n(.c)
18641 +.if \\n(aC>\\n(aP \{\
18648 +.\" NS %Q macro - Corporate or Foreign Author
18649 +.\" NS qK string - Corporate or Foreign Author
18650 +.\" NS qK register - Corporate or Foreign Author flag
18653 +. ie \\n(.$==0 .tm Usage: .%Q Corporate or Foreign Author (#\\n(.c)
18672 +.if \\n(aC>\\n(aP \{\
18679 +.\" NS %R macro - [reference] report name
18680 +.\" NS rK string - [reference] report name
18681 +.\" NS rK register - [reference] report flag
18684 +. ie \\n(.$==0 .tm Usage: .%R reference report (#\\n(.c)
18703 +.if \\n(aC>\\n(aP \{\
18710 +.\" NS %T macro - reference title
18711 +.\" NS tK string - reference title
18712 +.\" NS tK register - reference title flag
18715 +. ie \\n(.$==0 .tm Usage: .%T (#\\n(.c)
18736 +.if \\n(aC>\\n(aP \{\
18737 +.\" . ie \\n(jS==1 \{\
18738 +.\" . nr cF \\n(.f
18739 +.\" . nr cZ \\n(.s
18740 +.\" . ds qL \&\\*(Lq\\*(rA
18741 +.\" . ds qR \&\\*(Rq\f\\n(cF\s\\n(cZ
18742 +.\" . En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
18748 +. ie \\n(rS==0 \{\
18756 +.\" NS %V macro - reference volume
18757 +.\" NS vK string - reference volume
18758 +.\" NS vK register - reference volume flag
18761 +. ie \\n(.$==0 .tm Usage: .%V Volume , ... \\*(Pu (#\\n(.c)
18767 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
18770 +.if \\n(aC>\\n(aP \{\
18777 +.\" NS rR macro - reference recursion routine
18778 +.\" NS jM local register
18779 +.\" NS jN local register
18782 +.nr jM \\n(C\\n(aP
18784 +.\" . as b1 \&\f\\n(cF\s\\n(cZ
18785 +. ie "\\*(A\\n(aP"Tn" \{\
18789 +. if \\n(aC>8 .tm Usage: \\*(mN - maximum 8 arguments (#\\n(.c)
18796 +. ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
18797 +. el .as b1 \&\\*(A\\n(aP
18798 +.\" . el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
18799 +. ie \\n(aC==\\n(aP \{\
18800 +.\" . as b1 \&\f\\n(cF\s\\n(cZ
18805 +. as b1 \&\\*(S\\n(jN
18811 +.\" NS rD macro - save b1 buffer in to appropriate name
18818 +.\" NS Hf macro - source include header files.
18829 +.ta +9n 18n 27n 36n 45n 54n 63n 72n
18832 +.ta +8n 16n 24n 32n 40n 48n 56n 64n 72n
18841 +.\" NS An macro - author name
18842 +.\" NS aN register
18846 +. ie \\n(aN==1 \{\
18854 +. ie \\n(.$==0 .tm Usage: .An author_name ... \\*(Pu (#\\n(.c)
18857 +. aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
18860 +.if \\n(aC>\\n(aP \{\
18867 +.\" NS Sf macro -defunct
18869 +.tm .Sf defunct, use prefix or Ns
18871 +.ds rV "function returns the value 0 if successful; otherwise the value -1 is returned and the global variable \\*(vAerrno\fP is set to indicate the error.
18872 +.\" Ns Rv macro - return values
18873 +.\" Ns rV string - standard return message
18876 +.tm Usage: .Rv [-std] (#\\n(.c)
18881 +.\" . nr lR \\n(lR+1
18890 +.\" . nr fV \\n(.$-1
18891 +. if "\\$1"-std" \{\
18893 +. if (\\n(cH<2):(\\n(cH>3) .tm Usage: .Rv -std sections 2 and 3 only
18901 diff -Naur groff-1.18.1.4.orig/tmac/euc-jp.tmac groff-1.18.1.4/tmac/euc-jp.tmac
18902 --- groff-1.18.1.4.orig/tmac/euc-jp.tmac 1970-01-01 00:00:00.000000000 +0000
18903 +++ groff-1.18.1.4/tmac/euc-jp.tmac 2006-10-18 18:54:44.000000000 +0000
18908 +.cflags 256 ¡¢¡£¡¤¡¥¡¦¡§¡¨¡©¡ª¡Ë¡Í¡Ï¡Ñ¡×¡Ù¡Û¤¡¤£¤¥¤§¤©¤Ã¤ã¤å¤ç¡¼
18909 +.cflags 256 ¥¡¥£¥¥¥§¥©¥Ã¥ã¥å¥ç
18910 +.cflags 512 ¡Ê¡Ì¡Î¡Ð¡Ö¡Ø¡Ú
18912 diff -Naur groff-1.18.1.4.orig/tmac/gb.tmac groff-1.18.1.4/tmac/gb.tmac
18913 --- groff-1.18.1.4.orig/tmac/gb.tmac 1970-01-01 00:00:00.000000000 +0000
18914 +++ groff-1.18.1.4/tmac/gb.tmac 2006-10-18 18:54:44.000000000 +0000
18916 +.\" Kinsoku table for the GB2312 encoding of Chinese, recoded from
18917 +.\" kinsoku.el in Emacs 22.0.50.
18918 +.\" Checked by Simon Law, who reckons this is "mostly right". That will
18919 +.\" probably do for now ...
18921 +.cflags 256 ¡¢¡££®£¬¡¤¡¥¡¦¡§¡¨¡©¡ª¡«¡¬¡¡¯¡±£©¡³¡µ¡·¡¹¡»¡½
18922 +.cflags 256 ¡¿£»£º£¿£¡¡À¡Á¡Â¡Ã¡ã¡ä¡å¡æ£¯£Ü£¢£ß£þ£ü¨å
18923 +.cflags 512 ¨Å¨Æ¨Ç¨È¨É¨Ê¨Ë¨Ì¨Í¨Î¨Ï¨Ð¨Ñ¨Ò¨Ó¨Ô¨Õ¨Ö¨×¨Ø¨Ù¨è
18924 +.\" Simon Law supplied these.
18925 +.cflags 512 £¨¡®¡°¡²¡´¡¶¡¸¡º¡¼¡¾
18927 +.\" http://tcl.apache.org/sources/tcl/tools/encoding/gb2312.txt lists U+FF0D
18928 +.\" as FULLWIDTH HYPHEN-MINUS. Is this correct?
18931 diff -Naur groff-1.18.1.4.orig/tmac/groff_trace.man groff-1.18.1.4/tmac/groff_trace.man
18932 --- groff-1.18.1.4.orig/tmac/groff_trace.man 2002-07-13 20:52:47.000000000 +0000
18933 +++ groff-1.18.1.4/tmac/groff_trace.man 2006-10-18 18:54:44.000000000 +0000
18935 A copy of the Free Documentation License is included as a file called
18936 FDL in the main directory of the groff source package.
18939 +A copy of the GNU Free Documentation License is also available in this
18940 +Debian package as /usr/share/doc/groff/copyright.
18943 .\" --------------------------------------------------------------------
18945 diff -Naur groff-1.18.1.4.orig/tmac/troffrc groff-1.18.1.4/tmac/troffrc
18946 --- groff-1.18.1.4.orig/tmac/troffrc 2002-03-02 16:30:46.000000000 +0000
18947 +++ groff-1.18.1.4/tmac/troffrc 2006-10-18 18:54:44.000000000 +0000
18949 .do ds troffrc!X100 X.tmac
18950 .do ds troffrc!X100-12 X.tmac
18951 .do ds troffrc!ascii tty.tmac
18952 +.do ds troffrc!ascii8 tty.tmac
18953 .do ds troffrc!latin1 tty.tmac
18954 +.do ds troffrc!nippon tty.tmac
18955 .do ds troffrc!utf8 tty.tmac
18956 .do ds troffrc!cp1047 tty.tmac
18957 .do ds troffrc!lj4 lj4.tmac
18959 .\" Load hyphenation patterns from `hyphen.us' (in the tmac directory).
18962 +.\" For CJK hack. The hardcoded list of locales is especially nasty, but
18963 +.\" getting the locale charmap requires a troff extension.
18964 +.ie "\V[LANG]"ja_JP.eucJP" .do mso euc-jp.tmac
18965 +.el .ie "\V[LANG]"zh_CN" .do mso gb.tmac
18966 +.el .ie "\V[LANG]"zh_CN.GBK" .do mso gb.tmac
18967 +.el .ie "\V[LANG]"zh_SG" .do mso gb.tmac
18968 +.el .ie "\V[LANG]"zh_SG.GBK" .do mso gb.tmac
18969 +.el .if "\V[LANG]"zh_TW" .do mso big5.tmac
18971 .\" Don't let blank lines creep in here.
18972 diff -Naur groff-1.18.1.4.orig/tmac/tty.tmac groff-1.18.1.4/tmac/tty.tmac
18973 --- groff-1.18.1.4.orig/tmac/tty.tmac 2002-04-20 14:51:11.000000000 +0000
18974 +++ groff-1.18.1.4/tmac/tty.tmac 2006-10-18 18:54:44.000000000 +0000
18976 .ie '\*(.T'cp1047' \
18977 . do mso cp1047.tmac
18979 -. if '\*(.T'latin1' \
18980 +. if !'\*(.T'ascii' \
18981 . do mso latin1.tmac
18983 .\" If you want the character definitions in tty-char.tmac to be loaded