Blob Blame History Raw
--- groff-1.18.1.orig/src/include/config.hin
+++ groff-1.18.1/src/include/config.hin
@@ -1,84 +1,96 @@
-/* src/include/config.hin.  Generated automatically from configure.ac by autoheader.  */
+/* src/include/config.hin.  Generated from configure.ac by autoheader.  */
 
 /* Define if your C++ doesn't understand `delete []'. */
 #undef ARRAY_DELETE_NEEDS_SIZE
 
+/* Define if you want to use multibyte extension. */
+#undef ENABLE_MULTIBYTE
+
 /* Define if you have a C++ <limits.h>. */
 #undef HAVE_CC_LIMITS_H
 
 /* Define if you have a C++ <osfcn.h>. */
 #undef HAVE_CC_OSFCN_H
 
-/* Define if you have the <dirent.h> header file. */
+/* Define to 1 if you have the <dirent.h> header file. */
 #undef HAVE_DIRENT_H
 
-/* Define if you have the `fmod' function. */
+/* Define to 1 if you have the `fmod' function. */
 #undef HAVE_FMOD
 
-/* Define if you have the `getcwd' function. */
+/* Define to 1 if you have the `getcwd' function. */
 #undef HAVE_GETCWD
 
-/* Define if you have the `getpagesize' function. */
+/* Define to 1 if you have the `getpagesize' function. */
 #undef HAVE_GETPAGESIZE
 
-/* Define if you have the `gettimeofday' function. */
+/* Define to 1 if you have the `gettimeofday' function. */
 #undef HAVE_GETTIMEOFDAY
 
-/* Define if you have the <limits.h> header file. */
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `isatty' function. */
+#undef HAVE_ISATTY
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the <limits.h> header file. */
 #undef HAVE_LIMITS_H
 
-/* Define if you have the <math.h> header file. */
+/* Define to 1 if you have the <math.h> header file. */
 #undef HAVE_MATH_H
 
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
 /* Define if you have mkstemp(). */
 #undef HAVE_MKSTEMP
 
-/* Define if you have a working `mmap' system call. */
+/* Define to 1 if you have a working `mmap' system call. */
 #undef HAVE_MMAP
 
-/* Define if you have the `putenv' function. */
+/* Define to 1 if you have the `putenv' function. */
 #undef HAVE_PUTENV
 
-/* Define if you have the `rename' function. */
+/* Define to 1 if you have the `rename' function. */
 #undef HAVE_RENAME
 
-/* Define if you have the `snprintf' function. */
+/* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
-/* Define if you have the `isatty' function. */
-#undef HAVE_ISATTY
-
-/* Define if you have the <stdint.h> header file. */
+/* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
-/* Define if you have the <stdlib.h> header file. */
+/* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define if you have the `strcasecmp' function. */
+/* Define to 1 if you have the `strcasecmp' function. */
 #undef HAVE_STRCASECMP
 
-/* Define if you have the `strerror' function. */
+/* Define to 1 if you have the `strerror' function. */
 #undef HAVE_STRERROR
 
-/* Define if you have the <strings.h> header file. */
+/* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
-/* Define if you have the <string.h> header file. */
+/* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
-/* Define if you have the `strncasecmp' function. */
+/* Define to 1 if you have the `strncasecmp' function. */
 #undef HAVE_STRNCASECMP
 
-/* Define if you have the `strsep' function. */
+/* Define to 1 if you have the `strsep' function. */
 #undef HAVE_STRSEP
 
-/* Define if you have the `strtol' function. */
+/* Define to 1 if you have the `strtol' function. */
 #undef HAVE_STRTOL
 
 /* Define if <math.h> defines struct exception. */
 #undef HAVE_STRUCT_EXCEPTION
 
-/* Define if you have the <sys/dir.h> header file. */
+/* Define to 1 if you have the <sys/dir.h> header file. */
 #undef HAVE_SYS_DIR_H
 
 /* Define if you have sys_errlist in <errno.h> or in <stdio.h>. */
@@ -87,10 +99,16 @@
 /* Define if you have sysnerr in <errno.h> or <stdio.h>. */
 #undef HAVE_SYS_NERR
 
-/* Define if you have the <sys/time.h> header file. */
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
 #undef HAVE_SYS_TIME_H
 
-/* Define if you have the <unistd.h> header file. */
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
 /* Define if the host's encoding is EBCDIC. */
@@ -120,6 +138,21 @@
 /* Define if your C++ doesn't declare strncasecmp(). */
 #undef NEED_DECLARATION_STRNCASECMP
 
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
 /* Define if the printer's page size is A4. */
 #undef PAGEA4
 
@@ -129,7 +162,10 @@
 /* Define if srand() returns void not int. */
 #undef RET_TYPE_SRAND_IS_VOID
 
-/* Define if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
 #undef SYS_SIGLIST_DECLARED
 
 /* Define if your C++ compiler uses a traditional (Reiser) preprocessor. */
--- groff-1.18.1.orig/src/include/device.h
+++ groff-1.18.1/src/include/device.h
@@ -18,4 +18,9 @@
 with groff; see the file COPYING.  If not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
+#ifndef _DEVICE_H
+#define _DEVICE_H
+
 extern const char *device;
+
+#endif /* _DEVICE_H */
--- groff-1.18.1.orig/src/include/driver.h
+++ groff-1.18.1/src/include/driver.h
@@ -27,6 +27,7 @@
 #include <errno.h>
 #include <assert.h>
 #include <math.h>
+#include "encoding.h" // XXX: ukai
 #include "errarg.h"
 #include "error.h"
 #include "font.h"
--- groff-1.18.1.orig/src/include/font.h
+++ groff-1.18.1/src/include/font.h
@@ -18,11 +18,17 @@
 with groff; see the file COPYING.  If not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
+#include "encoding.h"
+
 typedef void (*FONT_COMMAND_HANDLER)(const char *, const char *,
 				     const char *, int);
 
 struct font_kern_list;
 struct font_char_metric;
+#ifdef ENABLE_MULTIBYTE
+struct fontset_list;
+struct font_wchar_metric;
+#endif
 struct font_widths_cache;
 
 class font {
@@ -53,6 +59,9 @@
   const char *get_special_device_encoding(int index);
   const char *get_name();
   const char *get_internal_name();
+#ifdef	ENABLE_MULTIBYTE
+  const char *get_subfont_name(int index);
+#endif
 
   static int scan_papersize(const char *, const char **, double *, double *);
 
@@ -62,6 +71,9 @@
   static int load_desc();
   static int name_to_index(const char *);
   static int number_to_index(int);
+#ifdef	ENABLE_MULTIBYTE
+  static int wchar_index(wchar);
+#endif
   static FONT_COMMAND_HANDLER
     set_unknown_desc_command_handler(FONT_COMMAND_HANDLER);
 
@@ -76,6 +88,11 @@
   static int spare2;
   static int sizescale;
   static int tcommand;
+#ifdef	ENABLE_MULTIBYTE
+  // XXX: should be in charinfo or font_wchar_metric?
+  static int lowerwchar;
+  static int wcharkern;
+#endif
   static int pass_filenames;
   static int use_charnames_in_special;
 
@@ -83,13 +100,27 @@
   static const char **style_table;
   static const char *family;
   static int *sizes;
+#ifdef	ENABLE_MULTIBYTE
+  // fontsets - sub font list
+  static fontset_list *fontsets;
+  // get fontset for `wc' in current font `fname'
+  static int get_fontset_font(const char *fname, wchar wc);
+  // is the fontno's font load on demand?
+  static int is_on_demand(int fontno);
+#endif
 private:
   unsigned ligatures;
   font_kern_list **kern_hash_table;
   int space_width;
-  short *ch_index;
+  short *ch_index;	/* XXX: this is used unless font_wchar_metric. */
   int nindices;
   font_char_metric *ch;
+#ifdef ENABLE_MULTIBYTE
+  // font metric for wchar
+  font_wchar_metric *wch;
+  // get font metric for wchar indexed by c
+  font_wchar_metric *get_font_wchar_metric(int c);
+#endif
   int ch_used;
   int ch_size;
   int special;
--- groff-1.18.1.orig/src/include/lib.h
+++ groff-1.18.1/src/include/lib.h
@@ -88,8 +88,15 @@
 
 extern char invalid_char_table[];
 
+#include "encoding.h" /* XXX: ukai */
+
 inline int invalid_input_char(int c)
 {
+#ifdef ENABLE_MULTIBYTE
+  if (input_encoding->is_wchar_byte(c))
+      return 0;
+  else
+#endif
   return c >= 0 && invalid_char_table[c];
 }
 
--- groff-1.18.1.orig/src/include/printer.h
+++ groff-1.18.1/src/include/printer.h
@@ -38,6 +38,8 @@
 
 #include "color.h"
 
+#include "encoding.h"
+
 struct environment {
   int fontno;
   int size;
@@ -63,6 +65,9 @@
   printer();
   virtual ~printer();
   void load_font(int i, const char *name);
+#ifdef	ENABLE_MULTIBYTE
+  void set_wchar_char(wchar c, char *s, int i0, int len, const environment *env, int *widthp = 0);
+#endif
   void set_ascii_char(unsigned char c, const environment *env,
 		      int *widthp = 0);
   void set_special_char(const char *nm, const environment *env,
--- groff-1.18.1.orig/src/include/encoding.h
+++ groff-1.18.1/src/include/encoding.h
@@ -0,0 +1,175 @@
+// -*- C++ -*-
+/* Copyright (c) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
+
+This file is part of groff.
+
+groff is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+
+#ifndef ENCODING_H
+#define ENCODING_H
+
+#include <config.h>
+
+#ifdef ENABLE_MULTIBYTE
+typedef int wchar;	// negative is used for charcode & index
+#else
+typedef char wchar;
+#endif
+
+#include <stdio.h>
+
+#ifdef __cplusplus
+class encoding_istream {
+public:
+  encoding_istream() {};
+  virtual ~encoding_istream() {};
+  virtual int getbyte() = 0;
+  virtual int peekbyte() = 0;
+  virtual void ungetbyte(int ch) = 0;
+};
+
+class encoding_istream_str: public encoding_istream {
+private:
+  const unsigned char *s;
+  int *i;
+  encoding_istream_str() {};
+public:
+  encoding_istream_str(const unsigned char *s0, int *i0) : s(s0), i(i0) {};
+  ~encoding_istream_str() {};
+  inline int getbyte() { return s[(*i)++]; };
+  inline int peekbyte() { return s[(*i)]; };
+  inline void ungetbyte(int ch) { --(*i); };
+};
+
+class encoding_istream_fp: public encoding_istream {
+private:
+  FILE *fp;
+public:
+  encoding_istream_fp(FILE *fp0) : fp(fp0) {};
+  ~encoding_istream_fp() {};
+  inline int getbyte() { return fgetc(fp); };
+  inline int peekbyte() { int ch = fgetc(fp); ungetc(ch, fp); return ch; };
+  inline void ungetbyte(int ch) { ungetc(ch, fp); };
+};
+
+class encoding_ostream {
+public:
+  encoding_ostream() {};
+  virtual ~encoding_ostream() {};
+  virtual void putbyte(unsigned char ch) = 0;
+};
+
+class encoding_ostream_str: public encoding_ostream {
+private:
+  unsigned char *s;
+  int *i;
+  int len;
+  encoding_ostream_str() {};
+public:
+  encoding_ostream_str(unsigned char *s0, int *i0, int max) : s(s0), i(i0), len(max) {};
+  ~encoding_ostream_str() {};
+  inline void putbyte(unsigned char ch) {
+    if (*i < len)
+      s[(*i)++] = ch;
+  }
+};
+
+class encoding_ostream_fp: public encoding_ostream {
+private:
+  FILE *fp;
+  const char *format;
+public:
+  encoding_ostream_fp(FILE *ofp, const char *fmt = "%c") : fp(ofp), format(fmt) {};
+  ~encoding_ostream_fp() {};
+  inline void putbyte(unsigned char ch) {
+    fprintf(fp, format, ch);
+  }
+};
+
+class encoding_handler {
+public:
+  encoding_handler() {};
+  virtual ~encoding_handler() {};
+
+  // name of this encoding_handler
+  virtual const char *name() { return ""; };
+
+  // check if this byte is byte in multibyte character in this encoding?
+  virtual int is_wchar_byte(unsigned char c) { return 0; };
+
+  // make new wchar from c0 (beginning of multibytes) and rest from `in'
+  virtual wchar make_wchar(unsigned char c0, encoding_istream& in) { 
+    return wchar(c0);
+  }
+  // make new wchar from c0 (beginning of multibytes) and rest from `fp'
+  virtual wchar make_wchar(unsigned char c0, FILE *fp) {
+    encoding_istream_fp in(fp);
+    return make_wchar(c0, in);
+  }
+  // make new wchar from c0 (beginning of multibtyes) and rest from
+  // s[*i], *i will be changed to point the byte of next character.
+  virtual wchar make_wchar(unsigned char c0, const unsigned char *s, int *i) {
+    encoding_istream_str in(s, i);
+    return make_wchar(c0, in);
+  }
+
+  // put wchar to outputstream
+  // returns number of bytes written
+  virtual int put_wchar(wchar wc, encoding_ostream& eos) {
+    eos.putbyte((unsigned char)wc);
+    return 1;
+  }
+  // put wchar to `fp' using `fmt'
+  // returns number of bytes written
+  virtual int put_wchar(wchar wc, FILE *fp, const char *fmt = "%c") {
+    encoding_ostream_fp out(fp, fmt);
+    return put_wchar(wc, out);
+  }
+  // put wchar to s[*i] (until maxlen)
+  // *i will be changed to point the byte of next character.
+  virtual int put_wchar(wchar wc, unsigned char *s, int *i, int maxlen) {
+    encoding_ostream_str out(s, i, maxlen);
+    return put_wchar(wc, out);
+  }
+
+  // maximum number of bytes of multibyte character in this encoding
+  virtual int max_wchar_len() { return 1; };
+
+};
+
+encoding_handler* select_input_encoding_handler(const char* encoding_name);
+encoding_handler* select_output_encoding_handler(const char* encoding_name);
+extern encoding_handler* input_encoding;
+extern encoding_handler* output_encoding;
+void init_encoding_handler();
+
+// check if wc is wchar?
+int is_wchar_code(wchar wc);
+
+// check if wc is wchar & can be represented in single byte?
+int is_wchar_singlebyte(wchar wc);
+
+// get singlebyte representation of wchar (if is_wchar_singlebyte(wc))
+unsigned char wchar_singlebyte(wchar wc);
+
+// get actual wide character code
+int wchar_code(wchar wc);
+
+// make wchar from wide character code
+int make_wchar(int w);
+
+#endif
+
+#endif /* ENCODING_H */
--- groff-1.18.1.orig/src/include/config.h
+++ groff-1.18.1/src/include/config.h
@@ -0,0 +1,187 @@
+/* src/include/config.h.  Generated by configure.  */
+/* src/include/config.hin.  Generated from configure.ac by autoheader.  */
+
+/* Define if your C++ doesn't understand `delete []'. */
+/* #undef ARRAY_DELETE_NEEDS_SIZE */
+
+/* Define if you want to use multibyte extension. */
+#define ENABLE_MULTIBYTE 1
+
+/* Define if you have a C++ <limits.h>. */
+#define HAVE_CC_LIMITS_H 1
+
+/* Define if you have a C++ <osfcn.h>. */
+/* #undef HAVE_CC_OSFCN_H */
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the `fmod' function. */
+#define HAVE_FMOD 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isatty' function. */
+#define HAVE_ISATTY 1
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#define HAVE_LANGINFO_CODESET 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <math.h> header file. */
+#define HAVE_MATH_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define if you have mkstemp(). */
+#define HAVE_MKSTEMP 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the `rename' function. */
+#define HAVE_RENAME 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#define HAVE_STRNCASECMP 1
+
+/* Define to 1 if you have the `strsep' function. */
+#define HAVE_STRSEP 1
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define if <math.h> defines struct exception. */
+#define HAVE_STRUCT_EXCEPTION 1
+
+/* Define to 1 if you have the <sys/dir.h> header file. */
+#define HAVE_SYS_DIR_H 1
+
+/* Define if you have sys_errlist in <errno.h> or in <stdio.h>. */
+#define HAVE_SYS_ERRLIST 1
+
+/* Define if you have sysnerr in <errno.h> or <stdio.h>. */
+#define HAVE_SYS_NERR 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define if the host's encoding is EBCDIC. */
+/* #undef IS_EBCDIC_HOST */
+
+/* Define if localtime() takes a long * not a time_t *. */
+/* #undef LONG_FOR_TIME_T */
+
+/* Define if your C++ doesn't declare gettimeofday(). */
+/* #undef NEED_DECLARATION_GETTIMEOFDAY */
+
+/* Define if your C++ doesn't declare hypot(). */
+/* #undef NEED_DECLARATION_HYPOT */
+
+/* Define if your C++ doesn't declare pclose(). */
+/* #undef NEED_DECLARATION_PCLOSE */
+
+/* Define if your C++ doesn't declare popen(). */
+/* #undef NEED_DECLARATION_POPEN */
+
+/* Define if your C++ doesn't declare putenv(). */
+/* #undef NEED_DECLARATION_PUTENV */
+
+/* Define if your C++ doesn't declare strcasecmp(). */
+/* #undef NEED_DECLARATION_STRCASECMP */
+
+/* Define if your C++ doesn't declare strncasecmp(). */
+/* #undef NEED_DECLARATION_STRNCASECMP */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define if the printer's page size is A4. */
+#define PAGEA4 1
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define if srand() returns void not int. */
+#define RET_TYPE_SRAND_IS_VOID 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
+#define SYS_SIGLIST_DECLARED 1
+
+/* Define if your C++ compiler uses a traditional (Reiser) preprocessor. */
+/* #undef TRADITIONAL_CPP */
+
+/* Define if the 0200 bit of the status returned by wait() indicates whether a
+   core image was produced for a process that was terminated by a signal. */
+/* #undef WCOREFLAG */
+
+/* Define if -D_POSIX_SOURCE is necessary. */
+/* #undef _POSIX_SOURCE */
+
+/* Define if you have ISC 3.x or 4.x. */
+/* #undef _SYSV3 */
+
+/* Define uintmax_t to `unsigned long' or `unsigned long long' if <inttypes.h>
+   does not exist. */
+/* #undef uintmax_t */
--- groff-1.18.1.orig/src/libs/libgroff/Makefile.sub
+++ groff-1.18.1/src/libs/libgroff/Makefile.sub
@@ -6,6 +6,7 @@
   color.$(OBJEXT) \
   cset.$(OBJEXT) \
   device.$(OBJEXT) \
+  encoding.$(OBJEXT) \
   errarg.$(OBJEXT) \
   error.$(OBJEXT) \
   fatal.$(OBJEXT) \
@@ -45,6 +46,7 @@
   $(srcdir)/color.cc \
   $(srcdir)/cset.cc \
   $(srcdir)/device.cc \
+  $(srcdir)/encoding.cc \
   $(srcdir)/errarg.cc \
   $(srcdir)/error.cc \
   $(srcdir)/fatal.cc \
--- groff-1.18.1.orig/src/libs/libgroff/font.cc
+++ groff-1.18.1/src/libs/libgroff/font.cc
@@ -25,6 +25,7 @@
 #include <assert.h>
 #include <math.h>
 #include <stdlib.h>
+#include "encoding.h" // XXX: ukai
 #include "errarg.h"
 #include "error.h"
 #include "cset.h"
@@ -43,8 +44,39 @@
   int italic_correction;
   int subscript_correction;
   char *special_device_coding;
+#ifdef ENABLE_MULTIBYTE
+  char *subfont_name;
+#endif
 };
 
+#ifdef ENABLE_MULTIBYTE
+struct fontset_list {
+  struct fontset_list *next;
+  char *primary_font_name;
+  int fontset_font;
+  wchar start_code;
+  wchar end_code;
+  int on_demand;
+};
+
+fontset_list *font::fontsets = NULL;
+
+struct font_wchar_metric {
+  struct font_wchar_metric *next;
+  char type;
+  int start_code;
+  int end_code;
+  int width;
+  int height;
+  int depth;
+  int pre_math_space;
+  int italic_correction;
+  int subscript_correction;
+  char *special_device_coding;
+  char *subfont_name;
+};
+#endif
+
 struct font_kern_list {
   int i1;
   int i2;
@@ -149,7 +181,11 @@
 
 font::font(const char *s)
 : ligatures(0), kern_hash_table(0), space_width(0), ch_index(0), nindices(0),
-  ch(0), ch_used(0), ch_size(0), special(0), widths_cache(0)
+  ch(0), 
+#ifdef ENABLE_MULTIBYTE
+  wch(0),
+#endif
+  ch_used(0), ch_size(0), special(0), widths_cache(0)
 {
   name = new char[strlen(s) + 1];
   strcpy(name, s);
@@ -183,6 +219,17 @@
     widths_cache = widths_cache->next;
     delete tem;
   }
+#ifdef ENABLE_MULTIBYTE
+  struct font_wchar_metric *wcp, *nwcp;
+  for (wcp = wch; wcp != NULL; wcp = nwcp) {
+    nwcp = wcp->next;
+    if (wcp->special_device_coding)
+      delete [] wcp->special_device_coding;
+    if (wcp->subfont_name)
+      delete [] wcp->subfont_name;
+    delete wcp;
+  }
+#endif
 }
 
 static int scale_round(int n, int x, int y)
@@ -244,6 +291,11 @@
 
 int font::contains(int c)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL)
+    return 1;
+#endif
   return c >= 0 && c < nindices && ch_index[c] >= 0;
 }
 
@@ -266,8 +318,31 @@
   a_delete width;
 }
 
+#ifdef ENABLE_MULTIBYTE
+struct font_wchar_metric *
+font::get_font_wchar_metric(int c)
+{
+  /* XXX: c is font index, not char code... */
+  /* XXX: we assume wchar_code == font index code for wchars */
+  /* XXX: does really code conflicts with index? */
+  struct font_wchar_metric *wcp;
+  for (wcp = wch; wcp != NULL; wcp = wcp->next) {
+    if (wcp->start_code <= wchar_code(c) && wchar_code(c) <= wcp->end_code) {
+      return wcp;
+    }
+  }
+  return NULL;
+}
+#endif
+
 int font::get_width(int c, int point_size)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL) {
+    return scale(wcp->width, point_size);
+  }
+#endif
   assert(c >= 0 && c < nindices);
   int i = ch_index[c];
   assert(i >= 0);
@@ -299,30 +374,60 @@
 
 int font::get_height(int c, int point_size)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL) {
+    return scale(wcp->height, point_size);
+  }
+#endif
   assert(c >= 0 && c < nindices && ch_index[c] >= 0);
   return scale(ch[ch_index[c]].height, point_size);
 }
 
 int font::get_depth(int c, int point_size)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL) {
+    return scale(wcp->depth, point_size);
+  }
+#endif
   assert(c >= 0 && c < nindices && ch_index[c] >= 0);
   return scale(ch[ch_index[c]].depth, point_size);
 }
 
 int font::get_italic_correction(int c, int point_size)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL) {
+    return scale(wcp->italic_correction, point_size);
+  }
+#endif
   assert(c >= 0 && c < nindices && ch_index[c] >= 0);
   return scale(ch[ch_index[c]].italic_correction, point_size);
 }
 
 int font::get_left_italic_correction(int c, int point_size)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL) {
+    return scale(wcp->pre_math_space, point_size);
+  }
+#endif
   assert(c >= 0 && c < nindices && ch_index[c] >= 0);
   return scale(ch[ch_index[c]].pre_math_space, point_size);
 }
 
 int font::get_subscript_correction(int c, int point_size)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL) {
+    return scale(wcp->subscript_correction, point_size);
+  }
+#endif
   assert(c >= 0 && c < nindices && ch_index[c] >= 0);
   return scale(ch[ch_index[c]].subscript_correction, point_size);
 }
@@ -371,12 +476,24 @@
 
 int font::get_character_type(int c)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL) {
+    return wcp->type;
+  }
+#endif
   assert(c >= 0 && c < nindices && ch_index[c] >= 0);
   return ch[ch_index[c]].type;
 }
 
 int font::get_code(int c)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL) {
+    return c;
+  }
+#endif
   assert(c >= 0 && c < nindices && ch_index[c] >= 0);
   return ch[ch_index[c]].code;
 }
@@ -393,10 +510,26 @@
 
 const char *font::get_special_device_encoding(int c)
 {
+#ifdef ENABLE_MULTIBYTE
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL)
+    return wcp->special_device_coding;
+#endif
   assert(c >= 0 && c < nindices && ch_index[c] >= 0);
   return( ch[ch_index[c]].special_device_coding );
 }
 
+#ifdef	ENABLE_MULTIBYTE
+const char *font::get_subfont_name(int c)
+{
+  font_wchar_metric *wcp = get_font_wchar_metric(c);
+  if (wcp != NULL)
+    return wcp->subfont_name;
+  assert(c >= 0 && c < nindices && ch_index[c] >= 0);
+  return ch[ch_index[c]].subfont_name;
+}
+#endif
+
 void font::alloc_ch_index(int index)
 {
   if (nindices == 0) {
@@ -554,9 +687,11 @@
   return 0;
 }
 
+
 // If the font can't be found, then if not_found is non-NULL, it will be set
 // to 1 otherwise a message will be printed.
 
+
 int font::load(int *not_found)
 {
   char *path;
@@ -570,7 +705,7 @@
   }
   text_file t(fp, path);
   t.skip_comments = 1;
-  char *p;
+  char *p = NULL;
   for (;;) {
     if (!t.next()) {
       t.error("missing charset command");
@@ -681,6 +816,9 @@
     }
     else if (strcmp(command, "charset") == 0) {
       had_charset = 1;
+#ifdef ENABLE_MULTIBYTE
+      int had_range = 0;
+#endif
       int last_index = -1;
       for (;;) {
 	if (!t.next()) {
@@ -695,6 +833,11 @@
 	  command = nm;
 	  break;
 	}
+#ifdef ENABLE_MULTIBYTE
+	int start_code = 0;
+	int end_code = 0;
+	int nrange = sscanf(nm, "u%X..u%X", &start_code, &end_code);
+#endif
 	if (p[0] == '"') {
 	  if (last_index == -1) {
 	    t.error("first charset entry is duplicate");
@@ -711,7 +854,64 @@
 	  }
 	  copy_entry(index, last_index);
 	}
+#ifdef ENABLE_MULTIBYTE
+	else if (nrange == 2) {
+	  had_range = 1;
+	  font_wchar_metric *wcp = new font_wchar_metric;
+	  wcp->start_code = start_code;
+	  wcp->end_code = end_code;
+	  wcp->height = 0;
+	  wcp->depth = 0;
+	  wcp->pre_math_space = 0;
+	  wcp->italic_correction = 0;
+	  wcp->subscript_correction = 0;
+	  int nparms = sscanf(p, "%d,%d,%d,%d,%d,%d",
+			      &wcp->width, &wcp->height, &wcp->depth,
+			      &wcp->italic_correction,
+			      &wcp->pre_math_space,
+			      &wcp->subscript_correction);
+	  if (nparms < 1) {
+	    t.error("bad width for `%1'", nm);
+	    return 0;
+	  }
+	  p = strtok(0, WS);
+	  if (p == 0) {
+	    t.error("missing character type for `%1'", nm);
+	    return 0;
+	  }
+	  int type;
+	  if (sscanf(p, "%d", &type) != 1) {
+	    t.error("bad character type for `%1'", nm);
+	    return 0;
+	  }
+	  if (type < 0 || type > 255) {
+	    t.error("character type `%1' out of range", type);
+	    return 0;
+	  }
+	  wcp->type = type;
+
+	  p = strtok(0, WS);
+	  if ((p == 0) || (strcmp(p, "--") == 0)) {
+	    wcp->subfont_name = NULL;
+	  } else {
+	    wcp->subfont_name = new char[strlen(p) + 1];
+	    strcpy(wcp->subfont_name, p);
+	  }
+
+	  p = strtok(0, WS);
+	  if ((p == NULL) || (strcmp(p, "--") == 0)) {
+	    wcp->special_device_coding = NULL;
+	  } else {
+	    wcp->special_device_coding = new char[strlen(p) + 1];
+	    strcpy(wcp->special_device_coding, p);
+	  }
+	  wcp->next = wch;
+	  wch = wcp;
+	  p = NULL;
+	}
+#endif
 	else {
+	  
 	  font_char_metric metric;
 	  metric.height = 0;
 	  metric.depth = 0;
@@ -747,6 +947,16 @@
 	    t.error("missing code for `%1'", nm);
 	    return 0;
 	  }
+#ifdef	ENABLE_MULTIBYTE
+	  char *subp = strchr(p, ':');
+	  if (subp) {
+	    *subp++ = '\0';
+	    metric.subfont_name = new char[strlen(subp) + 1];
+	    strcpy(metric.subfont_name, subp);
+	  } else {
+	    metric.subfont_name = NULL;
+	  }
+#endif
 	  char *ptr;
 	  metric.code = (int)strtol(p, &ptr, 0);
 	  if (metric.code == 0 && ptr == p) {
@@ -777,7 +987,11 @@
 	  }
 	}
       }
+#ifdef ENABLE_MULTIBYTE
+      if (!had_range && last_index == -1) {
+#else
       if (last_index == -1) {
+#endif
 	t.error("I didn't seem to find any characters");
 	return 0;
       }
@@ -811,6 +1025,11 @@
   { "biggestfont", &font::biggestfont },
   { "spare2", &font::spare2 },
   { "sizescale", &font::sizescale }
+#ifdef	ENABLE_MULTIBYTE
+  ,
+  { "lowerwchar", &font::lowerwchar },
+  { "wcharkern", &font::wcharkern }
+#endif
   };
 
 int font::load_desc()
@@ -981,6 +1200,67 @@
       tcommand = 1;
     else if (strcmp("use_charnames_in_special", p) == 0)
       use_charnames_in_special = 1;
+#ifdef	ENABLE_MULTIBYTE
+    else if (strcmp("fontset", p) == 0) {
+      /* fontset <primary-fontname> <fontname> <code>..<code> [ondemand] */
+      p = strtok(0, WS);
+      if (p == NULL) {
+	t.error("no primary font for fontset");
+	return 0;
+      }
+      char *pfont = NULL;
+      if (strcmp(p, "-") != 0) {
+	pfont = new char[strlen(p)+1];
+	strcpy(pfont, p);
+      }
+      p = strtok(0, WS);
+      if (p == NULL) {
+	t.error("no fontset font for `%1'", 
+		pfont ? pfont : "-");
+	return 0;
+      }
+      int fontset_font = 0;
+      for (int i = 0; i < nfonts; i++) {
+	if (strcmp(p, font_name_table[i]) == 0) {
+	  fontset_font = i;
+	  break;
+	}
+      }
+      if (fontset_font == nfonts) {
+	t.error("fontset font `%1' for font `%2' not defined", 
+		p, pfont ? pfont : "-");
+	return 0;
+      }
+      p = strtok(0, WS);
+      if (p == NULL) {
+	t.error("no range for fontset font `%1' for font `%2'",
+		font_name_table[fontset_font],
+		pfont ? pfont : "-");
+	return 0;
+      }
+      wchar start_code = 0;
+      wchar end_code = 0;
+      int nparms = sscanf(p, "%x..%x", &start_code, &end_code);
+      if (nparms != 2) {
+	t.error("invalid range format `%1'", p);
+	return 0;
+      }
+      p = strtok(0, WS);
+      int on_demand = 0;
+      if (p != NULL && strcmp(p, "ondemand") == 0) {
+	on_demand = 1;
+      }
+      /* XXX */
+      fontset_list *fl = new fontset_list;
+      fl->primary_font_name = pfont;
+      fl->fontset_font = fontset_font;
+      fl->start_code = start_code;
+      fl->end_code = end_code;
+      fl->on_demand = on_demand;
+      fl->next = fontsets;
+      fontsets = fl;
+    }
+#endif
     else if (strcmp("charset", p) == 0)
       break;
     else if (unknown_desc_command_handler) {
@@ -1020,6 +1300,39 @@
   return 1;
 }      
 
+#ifdef ENABLE_MULTIBYTE
+int
+font::get_fontset_font(const char *fname, wchar wc) {
+  fontset_list *fl;
+  int avail_fontno = -1;
+  wc = wchar_code(wc);
+  for (fl = fontsets; fl != NULL; fl = fl->next) {
+    if (fl->primary_font_name == NULL) {
+      if (fl->start_code <= wc && wc <= fl->end_code) {
+	avail_fontno = fl->fontset_font;
+      }
+    }
+    else if (fname && strcmp(fl->primary_font_name, fname) == 0) {
+      if (fl->start_code <= wc && wc <= fl->end_code) {
+	return fl->fontset_font;
+      }
+    }
+  }
+  return avail_fontno;
+}
+
+int
+font::is_on_demand(int fontno) {
+  fontset_list *fl;
+  for (fl = fontsets; fl != NULL; fl = fl->next) {
+    if (fl->fontset_font == fontno) {
+      return fl->on_demand;
+    }
+  }
+  return 0;
+}
+#endif
+
 void font::handle_unknown_font_command(const char *, const char *,
 				       const char *, int)
 {
--- groff-1.18.1.orig/src/libs/libgroff/fontfile.cc
+++ groff-1.18.1/src/libs/libgroff/fontfile.cc
@@ -24,6 +24,7 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <errno.h>
+#include "encoding.h" // XXX: ukai
 #include "font.h"
 #include "searchpath.h"
 #include "device.h"
@@ -36,6 +37,10 @@
 int font::res = 0;
 int font::hor = 1;
 int font::vert = 1;
+#ifdef	ENABLE_MULTIBYTE
+int font::lowerwchar = 0;
+int font::wcharkern = 0;
+#endif
 int font::unitwidth = 0;
 int font::paperwidth = 0;
 int font::paperlength = 0;
--- groff-1.18.1.orig/src/libs/libgroff/nametoindex.cc
+++ groff-1.18.1/src/libs/libgroff/nametoindex.cc
@@ -24,6 +24,7 @@
 #include <ctype.h>
 #include <assert.h>
 #include <stdlib.h>
+#include "encoding.h" // XXX: ukai
 #include "errarg.h"
 #include "error.h"
 #include "font.h"
@@ -37,6 +38,9 @@
   character_indexer();
   ~character_indexer();
   int ascii_char_index(unsigned char);
+#ifdef	ENABLE_MULTIBYTE
+  int wchar_index(wchar);
+#endif
   int named_char_index(const char *);
   int numbered_char_index(int);
 private:
@@ -68,6 +72,13 @@
   return ascii_index[c];
 }
 
+#ifdef	ENABLE_MULTIBYTE
+int character_indexer::wchar_index(wchar wc)
+{
+  return wc; /* XXX: wchar code == index */
+}
+#endif
+
 int character_indexer::numbered_char_index(int n)
 {
   if (n >= 0 && n < NSMALL) {
@@ -103,6 +114,30 @@
 int font::name_to_index(const char *s)
 {
   assert(s != 0 && s[0] != '\0' && s[0] != ' ');
+#ifdef	ENABLE_MULTIBYTE
+ {
+   int i = 1;
+   wchar wc = input_encoding->make_wchar(s[0], (const unsigned char *)s, &i);
+   /* XXX 
+    * if wchar can be represented in single byte (<256),
+    * it should be the same as char<wc>.
+    */
+   if (is_wchar_singlebyte(wc)) {
+       return indexer.ascii_char_index(wchar_singlebyte(wc));
+   }
+   if (is_wchar_code(wc)) {
+    return indexer.wchar_index(wc);
+   }
+   /* XXX: uA1A1 and \xa1a1 are synonyms */
+   if (s[0] == 'u') {
+     char *res;
+     long n = strtol(s + 1, &res, 16);
+     if (res != s + 1 && *res == '\0') {
+       return indexer.wchar_index(n);
+     }
+   }
+ }
+#endif
   if (s[1] == '\0')
     return indexer.ascii_char_index(s[0]);
   /* char128 and \200 are synonyms */
@@ -115,3 +150,9 @@
   return indexer.named_char_index(s);
 }
 
+#ifdef	ENABLE_MULTIBYTE
+int font::wchar_index(wchar wc)
+{
+  return indexer.wchar_index(wc);
+}
+#endif
--- groff-1.18.1.orig/src/libs/libgroff/searchpath.cc
+++ groff-1.18.1/src/libs/libgroff/searchpath.cc
@@ -19,6 +19,7 @@
 with groff; see the file COPYING.  If not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
+#include "encoding.h"
 #include "lib.h"
 
 #include <stdlib.h>
--- groff-1.18.1.orig/src/libs/libgroff/tmpfile.cc
+++ groff-1.18.1/src/libs/libgroff/tmpfile.cc
@@ -24,6 +24,7 @@
 #include <errno.h>
 #include <stdlib.h>
 
+#include "encoding.h"
 #include "posix.h"
 #include "errarg.h"
 #include "error.h"
--- groff-1.18.1.orig/src/libs/libgroff/encoding.cc
+++ groff-1.18.1/src/libs/libgroff/encoding.cc
@@ -0,0 +1,440 @@
+// -*- C++ -*-
+/* Copyright (C) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
+
+This file is part of groff.
+
+groff is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+
+#include "encoding.h"
+#include "device.h"
+
+#include <string.h>
+#ifdef ENABLE_MULTIBYTE
+#include <locale.h>
+#include <wchar.h>
+#ifdef HAVE_LANGINFO_CODESET
+#include <langinfo.h>
+#else
+#include <stdlib.h>
+#endif
+#endif
+
+class ascii8_handler : public encoding_handler {
+  // encoding handler for 8bit ascii
+  // no multibyte support
+public:
+  ascii8_handler() {}
+  ~ascii8_handler() {}
+
+  const char *name() { return "C"; }; /* ??? */
+
+  inline int is_wchar_byte(unsigned char c) { return 0; }
+  inline wchar make_wchar(unsigned char c0, encoding_istream& eis) {
+    return wchar(c0);
+  }
+  inline int put_wchar(wchar wc, encoding_ostream& eos) {
+    eos.putbyte((unsigned char)wchar_code(wc));
+    return 1;
+  }
+  inline int max_wchar_len() { return 1; };
+
+};
+
+#ifdef ENABLE_MULTIBYTE
+class utf8_handler: public encoding_handler {
+public:
+  utf8_handler() { } 
+  ~utf8_handler() { }
+
+  const char *name() { return "UTF-8"; };
+
+  inline int is_wchar_byte(unsigned char c) {
+    return (c >= 0x80);
+  }
+
+  /*
+   0000 0000-0000 007F   0xxxxxxx
+   0000 0080-0000 07FF   110xxxxx 10xxxxxx
+   0000 0800-0000 FFFF   1110xxxx 10xxxxxx 10xxxxxx
+
+   0001 0000-001F FFFF   11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+   0020 0000-03FF FFFF   111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+   0400 0000-7FFF FFFF   1111110x 10xxxxxx ... 10xxxxxx
+  */
+
+  inline wchar make_wchar(unsigned char c0, encoding_istream& eis) {
+    wchar wc = 0;
+    int count = 0;
+    if (! is_wchar_byte(c0)) {
+      return c0;
+    }
+    if ((c0 & 0xFC) == 0xFC) {
+      wc = c0 & 0x01;
+      count = 5;
+    } else if ((c0 & 0xF8) == 0xF8) {
+      wc = c0 & 0x03;
+      count = 4;
+    } else if ((c0 & 0xF0) == 0xF0) {
+      wc = c0 & 0x07;
+      count = 3;
+    } else if ((c0 & 0xE0) == 0xE0) {
+      wc = c0 & 0x0F;
+      count = 2;
+    } else if ((c0 & 0xC0) == 0xC0) {
+      wc = c0 & 0x1F;
+      count = 1;
+    }
+    for (; count > 0; count--) {
+      wc <<= 6;
+      int c1 = eis.getbyte();
+      if (! is_wchar_byte(c1)) {
+	/* illegal utf8 sequence? */
+      }
+      wc |= (c1 & 0x3F);
+    }
+    return -wc;	// XXX: negative
+  }
+
+  inline int put_wchar(wchar wc, encoding_ostream& eos) {
+    int count = 0;
+    if (! is_wchar_code(wc)) {
+      eos.putbyte(wc);
+      return 1;
+    }
+    wc = -wc;	// XXX: negative -> character code
+
+    if (wc < 0x800) {
+      count = 1; eos.putbyte((wc >> 6) | 0xC0);
+    } else if (wc < 0x10000) {
+      count = 2; eos.putbyte((wc >> 12) | 0xE0);
+    } else if (wc < 0x200000) {
+      count = 3; eos.putbyte((wc >> 18) | 0xF0);
+    } else if (wc < 0x4000000) {
+      count = 4; eos.putbyte((wc >> 24) | 0xf8);
+    } else if (wc <= 0x7fffffff) {
+      count = 5; eos.putbyte((wc >> 30) | 0xFC);
+    }
+    for (int i = 0; i < count; i++) {
+      eos.putbyte(((wc >> 6 * (count - i - 1)) & 0x3f) | 0x80);
+    }
+    return count;
+  }
+  inline int max_wchar_len() { return 6; }; /* XXX 3?*/
+
+};
+
+#define USE_ICONV
+#ifdef USE_ICONV
+#include <iconv.h>
+#include <errno.h>
+
+class iconv_handler : public encoding_handler {
+private:
+  iconv_t icd, ocd;
+  const char *encoding_name;
+  static iconv_handler *ih_header;
+
+public:
+  iconv_handler *next;
+
+  static iconv_handler *new_iconv_handler(const char *ename) {
+    iconv_handler *ip;
+    // if already created, use it.
+    for (ip = ih_header; ip != NULL; ip = ip->next) {
+      if (strcmp(ip->name(), ename) == 0) {
+	return ip;
+      }
+    }
+    // not found, create new one.
+    ip = new iconv_handler(ename);
+    ip->next = ih_header;
+    ih_header = ip;
+    return ip;
+  }
+  iconv_handler(const char *ename) : encoding_name(ename) {
+    // internal code is UCS-2BE
+    icd = iconv_open("UCS-2BE", encoding_name);
+    ocd = iconv_open(encoding_name, "UCS-2BE");
+  };
+  ~iconv_handler() {};
+
+  const char *name() { return encoding_name; };
+
+  inline int is_wchar_byte(unsigned char c) {
+    return (c >= 0x80); /* ??? */
+  }
+
+  inline wchar make_wchar(unsigned char c0, encoding_istream& eis) {
+    wchar wc = 0;
+    char inbuf[8], outbuf[8];
+    char *inp, *outp;
+    size_t inbytesleft, outbytesleft;
+    int i = 0;
+    
+    if (! is_wchar_byte(c0)) {
+      return c0;
+    }
+    for (inbuf[i++] = c0; ;inbuf[i++] = eis.getbyte()) {
+      inbytesleft = i;
+      outbytesleft = sizeof(outbuf);
+      inp = inbuf;
+      outp = outbuf;
+      size_t r = iconv(icd, &inp, &inbytesleft, &outp, &outbytesleft);
+      if (r == (size_t)-1) {
+	if (errno == EILSEQ) {
+	  /* illegal sequence? */
+	  return '?';
+	} else if (errno == EINVAL) {
+	  /* incomplete sequence? */
+	  continue;
+	} else if (errno == E2BIG) {
+	  /* no room to output? */
+	  return '?';
+	}
+      }
+      /* ok */
+      /* UCS-2 is 2 bytes */
+      wc = ((outbuf[0] & 0x0ff) << 8) | (outbuf[1] & 0x0ff);
+      return -wc;	// XXX: negative
+    }
+  }
+
+
+  inline int put_wchar(wchar wc, encoding_ostream& eos) {
+    char inbuf[4], outbuf[4];
+    char *inp, *outp;
+    size_t inbytesleft, outbytesleft;
+
+    if (!is_wchar_code(wc)) {
+      eos.putbyte(wc & 0x0ff);
+      return 1;
+    }
+    wc = -wc;	// XXX: negative -> character code
+
+    inbuf[0] = (wc >> 8) & 0x0ff;
+    inbuf[1] = (wc >> 0) & 0x0ff;
+    inbuf[2] = 0;
+    inbytesleft = 2;
+    outbytesleft = 4;
+    inp = inbuf;
+    outp = outbuf;
+    size_t r = iconv(ocd, &inp, &inbytesleft, &outp, &outbytesleft);
+    if (r == (size_t)-1) {
+      if (errno == EILSEQ) {
+	/* illegal sequence? */;
+      } else if (errno == EINVAL) {
+	/* incomplete sequence? */;
+      } else if (errno == E2BIG) {
+	/* no room to output? */;
+      }
+      eos.putbyte('?');
+      return 1;
+    }
+    char *op = outbuf;
+    int n = 0;
+    for (; op < outp; op++, n++) {
+      eos.putbyte(*op & 0x0ff);
+    }
+    return outp - outbuf;
+  }
+  inline int max_wchar_len() { return 6; }; /* XXX */
+
+};
+#else
+class euc_handler : public encoding_handler {
+  static const int WCTABLE_OFFSET = 0xa1;
+  static const int WCTABLE_SIZE = 94;
+  static const int EUCMASK = 0x8080;
+
+public:
+  euc_handler() {}
+  ~euc_handler() {};
+
+  const char *name() { return "EUC-JP"; };
+
+  inline int is_wchar_byte(unsigned char c) {
+    return (c >= 0xa1 && c <= 0xfe);
+  }
+
+  inline wchar make_wchar(unsigned char c0, encoding_istream& eis) {
+    wchar wc;
+    if (! is_wchar_byte(c0)) {
+      return c0;
+    }
+    int c1 = eis.peekbyte();
+    if (! is_wchar_byte(c1)) {
+      eis.ungetbyte(c1);
+      return c0;
+    }
+    c1 = eis.getbyte();
+    wc = (c0 & 0xff) << 8;
+    wc |= (c1 & 0xff);
+
+    if (wc == 0xa1a1)
+      return ' ';
+    return -wc;
+  }
+
+  inline int put_wchar(wchar wc, encoding_ostream& eos) {
+    if (is_wchar_code(wc)) {
+      wc = -wc;
+      eos.putbyte((wc >> 8) & 0x0ff);
+      eos.putbyte((wc >> 0) & 0x0ff);
+      return 2;    
+    } else {
+      eos.putbyte(wc & 0x0ff);
+      return 1;
+    }
+  }
+  inline int max_wchar_len() { return 2; }; /* XXX */
+};
+#endif /* USE_ICONV */
+#endif
+
+static ascii8_handler ascii8;
+#ifdef ENABLE_MULTIBYTE
+static utf8_handler utf8;
+#ifdef USE_ICONV
+iconv_handler *iconv_handler::ih_header = NULL;
+#else
+static euc_handler eucjp;
+#endif
+#endif
+
+encoding_handler *input_encoding = &ascii8;
+encoding_handler *output_encoding = &ascii8;
+
+static void
+new_encoding_handler(encoding_handler **eptr, const char *encoding_name)
+{
+  if (!encoding_name) {
+    *eptr = &ascii8;
+    return;
+  }
+#ifdef ENABLE_MULTIBYTE
+  if (strcmp(encoding_name, "UTF-8") == 0) {
+    *eptr = &utf8;
+    return;
+  }
+#ifdef USE_ICONV
+  if (strcmp(encoding_name, "C") != 0) {
+    *eptr = iconv_handler::new_iconv_handler(encoding_name);
+    return;
+  }
+#else
+  // printf("encoding request: [%s]\n", encoding_name);
+  if (strcmp(encoding_name, "EUC-JP") == 0) {
+    // printf("encoding: [EUC-JP]\n");
+    *eptr = &eucjp;
+    return;
+  }
+#endif
+#endif
+  // default
+  *eptr = &ascii8;
+  return;
+}
+
+encoding_handler *
+select_input_encoding_handler(const char *encoding_name)
+{
+  new_encoding_handler(&input_encoding, encoding_name);
+  return input_encoding;
+}
+
+encoding_handler *
+select_output_encoding_handler(const char *encoding_name)
+{
+  new_encoding_handler(&output_encoding, encoding_name);
+  return output_encoding;
+}
+
+void
+init_encoding_handler()
+{
+#ifdef ENABLE_MULTIBYTE
+  const char *locale, *charset;
+  // groff 1 defines ISO-8859-1 as the input encoding, so this is required
+  // for compatibility. groff 2 will define UTF-8 (or possibly officially
+  // allow it to be switchable?)
+  select_input_encoding_handler("ISO-8859-1");
+  select_output_encoding_handler("C");
+
+  locale = setlocale(LC_ALL, "");
+  if (locale == NULL ||
+      strcmp(locale, "C") == 0 || strcmp(locale, "POSIX") == 0) {
+    return;
+  }
+  /* check LC_CTYPE is C or POSIX */
+  locale = setlocale(LC_CTYPE, NULL);
+  if (strcmp(locale, "C") == 0 || strcmp(locale, "POSIX") == 0) {
+    return;
+  }
+  /* otherwise */
+#if HAVE_LANGINFO_CODESET
+  charset = nl_langinfo(CODESET);
+#else
+  charset = strchr(locale, '.');
+  if (charset)
+    ++charset;
+  else
+    charset = "";
+#endif
+  if (strncmp(locale, "ja", 2) == 0) {
+    select_input_encoding_handler(charset);
+    select_output_encoding_handler(charset);
+  } else if ((!device || strcmp(device, "ascii8") == 0)) {
+    select_input_encoding_handler(NULL);
+    select_output_encoding_handler(NULL);
+  }
+#endif
+  return;
+}
+
+int
+is_wchar_code(wchar wc)
+{
+  return (wc < 0);
+}
+
+int
+is_wchar_singlebyte(wchar wc)
+{
+    return ((-256 < wc) && (wc < 0));
+}
+
+unsigned char
+wchar_singlebyte(wchar wc)
+{
+    if (wc >= 0)
+	return (unsigned char)wc;
+    else
+	return (unsigned char)-wc;
+}
+
+int
+wchar_code(wchar wc)
+{
+    if (wc >= 0)
+	return wc;
+    else
+	return -wc;
+}
+
+int
+make_wchar(int w)
+{
+    return -w;
+}
--- groff-1.18.1.orig/src/libs/libdriver/input.cc
+++ groff-1.18.1/src/libs/libdriver/input.cc
@@ -250,6 +250,7 @@
 
 #include "driver.h"
 #include "device.h"
+#include "encoding.h"
 
 #include <stdlib.h>
 #include <errno.h>
@@ -1439,6 +1440,19 @@
   char *subcmd_str = get_string_arg();
   char subcmd = subcmd_str[0];
   switch (subcmd) {
+#ifdef ENABLE_MULTIBYTE
+  case 'e':			// x encoding: select encoding
+    {
+      char *str_arg = get_string_arg();
+      if (str_arg == 0)
+	warning("empty argument for `x encoding' command");
+      else {
+	select_input_encoding_handler(str_arg);
+	delete str_arg;
+      }
+      break;
+    }
+#endif
   case 'f':			// x font: mount font
     {
       IntArg n = get_integer_arg();
@@ -1517,7 +1531,7 @@
   return stopped;
 }
 
-
+////////////////////////////////////////////////////////////////
 /**********************************************************************
                      exported part (by driver.h)
  **********************************************************************/
@@ -1625,6 +1639,18 @@
     if (str_arg[0] != 'i')
       fatal("the third command must be `x init'");
     delete str_arg;
+#ifdef ENABLE_MULTIBYTE
+    Char c = get_char();
+    while (is_space_or_tab(c) && c != Char('\n') && c != Char(EOF))
+	c = get_char();
+    unget_char(c);
+    if (c != Char('\n') && c != Char(EOF)) {
+	const char *tmp_encoding = get_string_arg();
+	if (tmp_encoding && *tmp_encoding)
+	    select_input_encoding_handler(tmp_encoding);
+	delete tmp_encoding;
+    }
+#endif
     skip_line_x();
   }
 
@@ -1763,6 +1789,18 @@
 	size_t i = 0;
 	while ((c = str_arg[i++]) != '\0') {
 	  EnvInt w;
+#ifdef	ENABLE_MULTIBYTE
+ 	  if (input_encoding->is_wchar_byte(c)) {
+	    int i0 = i - 1;
+ 	    wchar wc = input_encoding->make_wchar(c, (const unsigned char *)str_arg, (int *)&i);
+ 	    if (is_wchar_code(wc)) {
+	      /* XXX: singlebyte check? */
+ 	      pr->set_wchar_char(wc, str_arg, i0, i - i0, current_env, &w);
+ 	    } else {
+ 	      pr->set_ascii_char((unsigned char) c, current_env, &w);
+ 	    }
+ 	  } else
+#endif
 	  pr->set_ascii_char((unsigned char) c, current_env, &w);
 	  current_env->hpos += w;
 	}
--- groff-1.18.1.orig/src/libs/libdriver/printer.cc
+++ groff-1.18.1/src/libs/libdriver/printer.cc
@@ -27,6 +27,7 @@
 */
 
 #include "driver.h"
+#include "encoding.h"
 
 printer *pr = 0;
 
@@ -138,6 +139,24 @@
   }
 }
 
+#ifdef	ENABLE_MULTIBYTE
+void printer::set_wchar_char(wchar c, char *s, int i0, int len, const environment *env, int *widthp)
+{
+  unsigned char *buf = new unsigned char[len+1];
+  memset(buf, 0, len+1);
+  memcpy(buf, s+i0, len);
+  font *f;
+  int w;
+  int i = set_char_and_width((const char *)buf, env, &w, &f);
+  if (i != -1) {
+      set_char(c, f, env, w, (const char *)buf);
+      if (widthp)
+	  *widthp = w;
+  }
+  delete [] buf;
+}
+#endif
+
 void printer::set_special_char(const char *nm, const environment *env,
 			       int *widthp)
 {
--- groff-1.18.1.orig/src/roff/groff/groff.cc
+++ groff-1.18.1/src/roff/groff/groff.cc
@@ -107,6 +107,7 @@
   program_name = argv[0];
   static char stderr_buf[BUFSIZ];
   setbuf(stderr, stderr_buf);
+  init_encoding_handler();
   assert(NCOMMANDS <= MAX_COMMANDS);
   string Pargs, Largs, Fargs;
   int vflag = 0;
--- groff-1.18.1.orig/src/roff/groff/groff.man
+++ groff-1.18.1/src/roff/groff/groff.man
@@ -118,7 +118,7 @@
 .c --------------------------------------------------------------------
 .c ShortOpt ([char [punct]])
 .c
-.c `-c' somwhere in the text 
+.c `-c' somewhere in the text 
 .c second arg is punctuation
 .c
 .de ShortOpt
@@ -130,7 +130,7 @@
 .c --------------------------------------------------------------------
 .c LongOpt  ([name [punct]])
 .c
-.c `--name' somwhere in the text 
+.c `--name' somewhere in the text 
 .c second arg is punctuation
 .c
 .de LongOpt
@@ -314,7 +314,7 @@
 .B groff
 program allows to control the whole
 .I groff
-system by comand line options.
+system by command line options.
 .
 This is a great simplification in comparison to the classical case (which
 uses pipes only).
@@ -610,7 +610,7 @@
 .
 .
 .\" --------------------------------------------------------------------
-.SS Tranparent Options
+.SS Transparent Options
 .\" --------------------------------------------------------------------
 .
 The following options are transparently handed over to the formatter
@@ -695,7 +695,7 @@
 is much easier than
 .IR "classical roff" .
 .
-This section gives an overview of the parts that consitute the groff
+This section gives an overview of the parts that constitute the groff
 system.
 .
 It complements
@@ -948,6 +948,10 @@
 Text output using the EBCDIC code page IBM cp1047 (e.g. OS/390 Unix).
 .
 .TP
+.B nippon
+Text output using the Japanese-EUC character set.
+.
+.TP
 .B dvi
 TeX DVI format.
 .
@@ -956,6 +960,12 @@
 HTML output.
 .
 .TP
+.B ascii8
+For typewriter-like devices.  Unlike
+.BR ascii ,
+this device is 8 bit clean.  This device is intended to be used
+for codesets other than ASCII and ISO-8859-1.
+.TP
 .B latin1
 Text output using the ISO Latin-1 (ISO 8859-1) character set; see
 .BR iso_8859_1 (7).
@@ -1031,7 +1041,7 @@
 .
 .P
 Today, most printing or drawing hardware is handled by the operating
-system, by device drivers, or by software interfaces, usally accepting
+system, by device drivers, or by software interfaces, usually accepting
 PostScript.
 .
 Consequently, there isn't an urgent need for more hardware device
--- groff-1.18.1.orig/src/roff/troff/charinfo.h
+++ groff-1.18.1/src/roff/troff/charinfo.h
@@ -29,9 +29,16 @@
   macro *mac;
   unsigned char special_translation;
   unsigned char hyphenation_code;
+#ifdef ENABLE_MULTIBYTE
+  unsigned short flags;
+#else
   unsigned char flags;
+#endif
   unsigned char ascii_code;
   unsigned char asciify_code;
+#ifdef ENABLE_MULTIBYTE
+  wchar wchar_code;
+#endif
   char not_found;
   char transparent_translate;	// non-zero means translation applies
 				// to transparent throughput
@@ -47,6 +54,11 @@
     OVERLAPS_VERTICALLY = 16,
     TRANSPARENT = 32,
     NUMBERED = 64
+#ifdef	ENABLE_MULTIBYTE
+    ,
+    DONT_BREAK_BEFORE = 0x100,	// 256, pre kinsoku
+    DONT_BREAK_AFTER = 0x200	// 512, post kinsoku
+#endif
     };
   enum {
     TRANSLATE_NONE,
@@ -74,7 +86,11 @@
   int get_translation_input();
   charinfo *get_translation(int = 0);
   void set_translation(charinfo *, int, int);
+#ifdef ENABLE_MULTIBYTE
+  void set_flags(unsigned short);
+#else
   void set_flags(unsigned char);
+#endif
   void set_special_translation(int, int);
   int get_special_translation(int = 0);
   macro *set_macro(macro *, int = 0);
@@ -84,6 +100,12 @@
   int get_number();
   int numbered();
   int is_fallback();
+#ifdef	ENABLE_MULTIBYTE
+  wchar get_wchar_code();
+  void set_wchar_code(wchar);
+  int cannot_break_before(); // pre kinsoku
+  int cannot_break_after(); // post kinsoku
+#endif
   symbol *get_symbol();
 };
 
@@ -131,6 +153,18 @@
   return fallback;
 }
 
+#ifdef	ENABLE_MULTIBYTE
+inline int charinfo::cannot_break_before()
+{
+  return flags & DONT_BREAK_BEFORE;
+}
+
+inline int charinfo::cannot_break_after()
+{
+  return flags & DONT_BREAK_AFTER;
+}
+#endif
+
 inline charinfo *charinfo::get_translation(int transparent_throughput)
 {
   return (transparent_throughput && !transparent_translate
@@ -153,7 +187,18 @@
   return (translate_input ? asciify_code : 0);
 }
 
+#ifdef	ENABLE_MULTIBYTE
+inline wchar charinfo::get_wchar_code()
+{
+  return wchar_code;
+}
+#endif
+
+#ifdef	ENABLE_MULTIBYTE
+inline void charinfo::set_flags(unsigned short c)
+#else
 inline void charinfo::set_flags(unsigned char c)
+#endif
 {
   flags = c;
 }
--- groff-1.18.1.orig/src/roff/troff/env.cc
+++ groff-1.18.1/src/roff/troff/env.cc
@@ -32,6 +32,7 @@
 #include "charinfo.h"
 #include "macropath.h"
 #include "input.h"
+#include "font.h" // ENABLE_MULTIBYTE only?
 #include <math.h>
 
 symbol default_family("T");
@@ -264,6 +265,13 @@
 void environment::add_char(charinfo *ci)
 {
   int s;
+#ifdef ENABLE_MULTIBYTE
+  int fontno = get_font(); // current font #
+  int fontset_font = get_fontset_fontno(fontno, ci->get_wchar_code());
+  if (fontno >= 0 && fontno != fontset_font) {
+    change_curfont(fontset_font);
+  }
+#endif
   if (interrupted)
     ;
   // don't allow fields in dummy environments
@@ -286,11 +294,95 @@
   else {
     if (line == 0)
       start_line();
+#ifdef	ENABLE_MULTIBYTE
+    /* 
+     * XXX: NEED REWRITE TO BE MORE GENERIC
+     * This code is based on jgroff
+     * about kerning between ASCII and EUC-JP 
+     */
+    if (!ci->get_wchar_code()) {
+      /*
+       * This node is a ASCII character node.
+       */
+      if (!pre_char_is_ascii && enable_wcharkern && !hwkern.is_zero()) {
+	/*
+	 * Insert a little space node between EUC and ASCII.
+	 */
+	word_space_node *ws;
+
+	if (ci->ends_sentence() || ci->transparent() || ci->cannot_break_before())
+	  ws = new unbreakable_space_node(hwkern.to_units(), get_fill_color());
+	else
+	  ws = new word_space_node(hwkern.to_units(),
+				   get_fill_color(),
+				   new width_list(env_space_width(this),
+						  env_sentence_space_width(this)));
+	curenv->add_node(ws);
+      }
+      pre_char_is_ascii = 1;
+      pre_wchar_cannot_break_after = 0;
+    } else {
+      /*
+       * This node is a EUC charcater node.
+       */
+      if (!pre_char_is_ascii && line->get_node_type() == NODE_NEWLINE_SPACE) {
+	/*
+	 * remove a newline-node.
+	 */
+	node *ns_node = line;
+	line = line->next;
+	width_total -= ns_node->width();
+	space_total -= ns_node->nspaces();
+	delete ns_node;
+      }
+
+      if (!pre_wchar_cannot_break_after && !ci->cannot_break_before()) {
+	/*
+	 * add a zero-width-space-node before EUC charcater node.
+	 */
+	add_node(new kword_space_node(get_fill_color()));
+	met_with_kword_space = 1;
+      }
+      pre_wchar_cannot_break_after = ci->cannot_break_after();
+
+      if (pre_char_is_ascii && enable_wcharkern && !hwkern.is_zero()) {
+	/*
+	 * Insert a little space node between ASCII and EUC.
+	 */
+	unbreakable_space_node *ws =
+	  new unbreakable_space_node(hwkern.to_units(), get_fill_color());
+	curenv->add_node(ws);
+      }
+      pre_char_is_ascii = 0;
+
+      if (!vlower.is_zero()) {
+	/*
+	 * Lower a EUC charcater node.
+	 */
+	curenv->add_node(new vmotion_node(vlower.to_units(), 
+					  get_fill_color())); // lower
+      }
+    }
+#endif
     if (ci != hyphen_indicator_char)
       line = line->add_char(ci, this, &width_total, &space_total);
     else
       line = line->add_discretionary_hyphen();
+#ifdef	ENABLE_MULTIBYTE
+    enable_wcharkern = 1;
+    if (!vlower.is_zero() && ci->get_wchar_code()) {
+      /*
+       * Raise a EUC charcater node.
+       */
+      curenv->add_node(new vmotion_node(-vlower.to_units(), 
+					get_fill_color())); // raise
+    }
+#endif
   }
+#ifdef ENABLE_MULTIBYTE
+  if (fontset_font >= 0 && fontno != fontset_font)
+      change_curfont(fontno); /* restore saved font # */
+#endif
 }
 
 node *environment::make_char_node(charinfo *ci)
@@ -394,7 +486,11 @@
     width_total += x;
     return;
   }
+#ifdef ENABLE_MULTIBYTE
+  add_node(new newline_space_node(x, get_fill_color())); // This node may be removed
+#else
   add_node(new word_space_node(x, get_fill_color(), w));
+#endif
   possibly_break_line(0, spread_flag);
   spread_flag = 0;
 }
@@ -480,6 +576,35 @@
     warning(WARN_FONT, "bad font number");
 }
 
+#ifdef	ENABLE_MULTIBYTE
+void environment::change_curfont(symbol nm)
+{
+  int n = symbol_fontno(nm);
+  if (n < 0) {
+    n = next_available_font_position();
+    if (!mount_font(n, nm))
+      return;
+  }
+  fontno = n;
+}
+
+void environment::change_curfont(int n)
+{
+  if (is_good_fontno(n))
+    fontno = n;
+  else
+    error("bad font number");
+}
+
+void environment::set_encoding(symbol enc)
+{
+  if (enc.is_null() || enc.is_empty())
+    return;
+  select_input_encoding_handler(enc.contents());
+  select_output_encoding_handler(enc.contents());
+}
+#endif /* ENABLE_MULTIBYTE */
+
 void environment::set_family(symbol fam)
 {
   if (interrupted)
@@ -649,6 +774,16 @@
   control_char('.'),
   no_break_control_char('\''),
   hyphen_indicator_char(0)
+#ifdef	ENABLE_MULTIBYTE
+  ,
+  stretch_threshold(0),
+  pre_wchar_cannot_break_after(0),
+  pre_char_is_ascii(-1),
+  enable_wcharkern(0),
+  met_with_kword_space(0),
+  hwkern(font::wcharkern),
+  vlower(font::lowerwchar)
+#endif
 {
   prev_family = family = lookup_family(default_family);
   prev_fontno = fontno = 1;
@@ -739,6 +874,16 @@
   control_char(e->control_char),
   no_break_control_char(e->no_break_control_char),
   hyphen_indicator_char(e->hyphen_indicator_char)
+#ifdef	ENABLE_MULTIBYTE
+  ,
+  stretch_threshold(e->stretch_threshold),
+  pre_wchar_cannot_break_after(0),
+  pre_char_is_ascii(-1),
+  enable_wcharkern(0),
+  met_with_kword_space(0),
+  hwkern(font::wcharkern),
+  vlower(font::lowerwchar)
+#endif
 {
 }
 
@@ -1781,6 +1926,9 @@
   target_text_length = line_length - saved_indent;
   width_total = H0;
   space_total = 0;
+#ifdef	ENABLE_MULTIBYTE
+  enable_wcharkern = 0;
+#endif
 }
 
 hunits environment::get_hyphenation_space()
@@ -1819,6 +1967,23 @@
   skip_line();
 }
 
+#ifdef ENABLE_MULTIBYTE
+void stretch_threshold_request()
+{
+  int n;
+  if (has_arg() && get_integer(&n)) {
+      if (n < 0 || n > 100) {
+	  warning(WARN_RANGE, "stretch threshold value %1 out of range", n);
+      } else {
+	  curenv->stretch_threshold = n;
+      }
+  } else {
+      curenv->stretch_threshold = 0;
+  }
+  skip_line();
+}
+#endif
+
 breakpoint *environment::choose_breakpoint()
 {
   hunits x = width_total;
@@ -2014,6 +2179,30 @@
 	     // When a macro follows a paragraph in fill mode, the
 	     // current line should not be empty.
 	     || (width_total - line->width()) > target_text_length)) {
+#ifdef ENABLE_MULTIBYTE
+    if (met_with_kword_space) {
+      node *linep = line;
+      node *prep = 0;
+      while (linep->next) {
+	if (linep->next->get_node_type() == NODE_GLYPH)
+	  prep = 0;
+	else if (linep->next->get_node_type() == NODE_KWORD_SPACE)
+	  prep = linep;
+        linep = linep->next;
+      }
+      if (prep) {
+        /*
+         * delete a kword_space_node which is in the top of line.
+         */
+        linep = prep->next;
+        prep->next = linep->next;
+        width_total -= linep->width();
+        space_total -= linep->nspaces();
+        delete linep;
+      }
+      met_with_kword_space = 0;
+    }
+#endif
     hyphenate_line(start_here);
     breakpoint *bp = choose_breakpoint();
     if (bp == 0)
@@ -2026,6 +2215,15 @@
     bp->nd->split(bp->index, &pre, &post);
     *ndp = post;
     hunits extra_space_width = H0;
+#ifdef ENABLE_MULTIBYTE
+    int sv_adjust_mode = adjust_mode;
+    if (stretch_threshold) {
+	int ratio = bp->width * 100 / target_text_length;
+	if (ratio < stretch_threshold) {
+	    adjust_mode = ADJUST_LEFT;
+	}
+    }
+#endif
     switch(adjust_mode) {
     case ADJUST_BOTH:
       if (bp->nspaces != 0)
@@ -2041,6 +2239,9 @@
       saved_indent += target_text_length - bp->width;
       break;
     }
+#ifdef ENABLE_MULTIBYTE
+    adjust_mode = sv_adjust_mode;
+#endif
     distribute_space(pre, bp->nspaces, extra_space_width);
     hunits output_width = bp->width + extra_space_width;
     input_line_start -= output_width;
@@ -3237,6 +3438,9 @@
   init_request("hys", hyphenation_space_request);
   init_request("hym", hyphenation_margin_request);
   init_request("pvs", post_vertical_spacing);
+#ifdef ENABLE_MULTIBYTE
+  init_request("stt", stretch_threshold_request);
+#endif
   init_int_env_reg(".f", get_font);
   init_int_env_reg(".b", get_bold);
   init_hunits_env_reg(".i", get_indent);
--- groff-1.18.1.orig/src/roff/troff/env.h
+++ groff-1.18.1/src/roff/troff/env.h
@@ -213,6 +213,15 @@
   unsigned char control_char;
   unsigned char no_break_control_char;
   charinfo *hyphen_indicator_char;
+#ifdef	ENABLE_MULTIBYTE
+  int stretch_threshold;
+  int pre_wchar_cannot_break_after;
+  int pre_char_is_ascii;
+  int enable_wcharkern;
+  int met_with_kword_space;
+  hunits hwkern;
+  vunits vlower;
+#endif
   
   environment(symbol);
   environment(const environment *);	// for temporary environment
@@ -279,6 +288,10 @@
   void wrap_up_tab();
   void set_font(int);
   void set_font(symbol);
+#ifdef	ENABLE_MULTIBYTE
+  void change_curfont(int);
+  void change_curfont(symbol);
+#endif
   void set_family(symbol);
   void set_size(int);
   void set_char_height(int);
@@ -309,6 +322,9 @@
   const char *get_point_size_string();
   const char *get_requested_point_size_string();
   void output_pending_lines();
+#ifdef ENABLE_MULTIBYTE
+  void set_encoding(symbol);
+#endif
   
   friend void title_length();
   friend void space_size();
@@ -347,6 +363,9 @@
 #ifdef WIDOW_CONTROL
   friend void widow_control_request();
 #endif /* WIDOW_CONTROL */
+#ifdef	ENABLE_MULTIBYTE
+  friend void stretch_threshold_request();
+#endif
 
   friend void do_divert(int append, int boxing);
 };
--- groff-1.18.1.orig/src/roff/troff/input.cc
+++ groff-1.18.1/src/roff/troff/input.cc
@@ -35,6 +35,7 @@
 #include "macropath.h"
 #include "defs.h"
 #include "input.h"
+#include "encoding.h" // XXX: ukai
 
 // Needed for getpid() and isatty()
 #include "posix.h"
@@ -89,6 +90,11 @@
 charinfo *charset_table[256];
 unsigned char hpf_code_table[256];
 
+#ifdef	ENABLE_MULTIBYTE
+charinfo *wcharset_table_entry(wchar wc);
+
+#endif /* ENABLE_MULTIBYTE */
+
 static int warning_mask = DEFAULT_WARNING_MASK;
 static int inhibit_errors = 0;
 static int ignoring = 0;
@@ -148,6 +154,20 @@
 input_iterator *make_temp_iterator(const char *);
 const char *input_char_description(int);
 
+#ifdef ENABLE_MULTIBYTE
+static void
+select_encoding()
+{
+    symbol e = get_long_name(1);
+    if (e.is_null()) {
+	skip_line();
+	return;
+    }
+    curenv->set_encoding(e);
+    skip_line();
+    
+}
+#endif
 
 void set_escape_char()
 {
@@ -1524,6 +1544,19 @@
   type = TOKEN_NEWLINE;
 }
 
+#ifdef ENABLE_MULTIBYTE
+class encoding_istream_input : public encoding_istream {
+private:
+  node **np;
+public:
+  encoding_istream_input(node **n) : np(n) {};
+  ~encoding_istream_input() {};
+  int getbyte() { return input_stack::get(np); };
+  int peekbyte() { return input_stack::peek(); };
+  void ungetbyte(int ch) { return; };
+};
+#endif
+
 void token::next()
 {
   if (nd) {
@@ -1533,6 +1566,10 @@
   units x;
   for (;;) {
     node *n;
+#ifdef ENABLE_MULTIBYTE
+    encoding_istream_input einput(&n);
+#endif
+
     int cc = input_stack::get(&n);
     if (cc != escape_char || escape_char == 0) {
     handle_normal_char:
@@ -1686,8 +1723,22 @@
 	}
 	return;
       default:
+#ifdef	ENABLE_MULTIBYTE
+	wc = input_encoding->make_wchar(cc, einput);
+	if (is_wchar_code(wc)) {
+	  type = TOKEN_WCHAR;
+	  c = 0;
+	} else if (wc == ' ') {
+	  type = TOKEN_SPACE;
+	  c = cc;
+	} else {
+	  type = TOKEN_CHAR;
+	  c = cc;
+	}
+#else
 	type = TOKEN_CHAR;
 	c = cc;
+#endif
 	return;
       }
     }
@@ -2057,6 +2108,10 @@
   switch(type) {
   case TOKEN_CHAR:
     return c == t.c;
+#ifdef	ENABLE_MULTIBYTE
+  case TOKEN_WCHAR:
+    return wc == t.wc;
+#endif
   case TOKEN_SPECIAL:
     return nm == t.nm;
   case TOKEN_NUMBERED_CHAR:
@@ -2563,6 +2618,27 @@
 	}
 	break;
       }
+#ifdef	ENABLE_MULTIBYTE
+    case token::TOKEN_WCHAR:
+      {
+	wchar wch = tok.wc;
+
+	if (possibly_handle_first_page_transition())
+	  ;
+	else {
+	  for (;;) {
+	    curenv->add_char(wcharset_table_entry(wch));
+	    tok.next();
+	    if (tok.type != token::TOKEN_WCHAR)
+	      break;
+	    wch = tok.wc;
+	  }
+	  suppress_next = 1;
+	  bol = 0;
+	}
+	break;
+      }
+#endif	/* ENABLE_MULTIBYTE */
     case token::TOKEN_TRANSPARENT:
       {
 	if (bol) {
@@ -6018,6 +6094,10 @@
 {
   if (type == TOKEN_CHAR)
     return charset_table[c];
+#ifdef	ENABLE_MULTIBYTE
+  if (type == TOKEN_WCHAR)
+    return wcharset_table_entry(wc);
+#endif
   if (type == TOKEN_SPECIAL)
     return get_charinfo(nm);
   if (type == TOKEN_NUMBERED_CHAR)
@@ -6070,6 +6150,11 @@
   case TOKEN_CHAR:
     *pp = (*pp)->add_char(charset_table[c], curenv, &w, &s);
     break;
+#ifdef	ENABLE_MULTIBYTE
+  case TOKEN_WCHAR:
+    *pp = (*pp)->add_char(wcharset_table_entry(wc), curenv, &w, &s);
+    break;
+#endif
   case TOKEN_DUMMY:
     n = new dummy_node;
     break;
@@ -6142,6 +6227,11 @@
   case TOKEN_CHAR:
     curenv->add_char(charset_table[c]);
     break;
+#ifdef	ENABLE_MULTIBYTE
+  case TOKEN_WCHAR:
+    curenv->add_char(wcharset_table_entry(wc));
+    break;
+#endif
   case TOKEN_DUMMY:
     curenv->add_node(new dummy_node);
     break;
@@ -6900,6 +6990,7 @@
   if (!safer_flag)
     mac_path = &macro_path;
   set_string(".T", device);
+  init_encoding_handler();
   init_charset_table();
   init_hpf_code_table();
   if (!font::load_desc())
@@ -6924,6 +7015,9 @@
     // In the DESC file a font name of 0 (zero) means leave this
     // position empty.
     if (strcmp(font::font_name_table[i], "0") != 0)
+#ifdef ENABLE_MULTIBYTE
+      if (!font::is_on_demand(i))
+#endif
       mount_font(j, symbol(font::font_name_table[i]));
   curdiv = topdiv = new top_level_diversion;
   if (nflag)
@@ -7081,6 +7175,9 @@
   init_request("ecs", save_escape_char);
   init_request("el", else_request);
   init_request("em", end_macro);
+#ifdef ENABLE_MULTIBYTE
+  init_request("encoding", select_encoding);
+#endif
   init_request("eo", escape_off);
   init_request("ex", exit_request);
   init_request("fchar", define_fallback_character);
@@ -7533,12 +7630,92 @@
 
 dictionary charinfo_dictionary(501);
 
+#ifdef ENABLE_MULTIBYTE
+struct charinfo_list {
+  struct charinfo_list *next;
+  charinfo *ci;
+} *wcharset_table = NULL;
+
+/* XXX: use more efficient method? */
+static charinfo*
+lookup_wcharset_table(wchar wc)
+{
+  struct charinfo_list *cl;
+  for (cl = wcharset_table; cl; cl = cl->next) {
+    if (cl->ci && cl->ci->get_wchar_code() == wc)
+      return cl->ci;
+  }
+  return NULL;
+}
+
+static void
+add_wcharset_table(charinfo *ci)
+{
+  struct charinfo_list *cl = new struct charinfo_list;
+  cl->next = wcharset_table;
+  cl->ci = ci;
+  wcharset_table = cl;
+}
+
+charinfo *wcharset_table_entry(wchar wc)
+{
+  if (! is_wchar_code(wc))
+    return NULL;
+  charinfo *cp = lookup_wcharset_table(wc);
+  if (cp == NULL) {
+    int i = wchar_code(wc);
+    char buf[16];
+    if (i > 0x100)
+      sprintf(buf, "u%04X", i);
+    else {
+      cp = get_charinfo_by_number(i);
+      if (cp != NULL)
+	return cp;
+      sprintf(buf, "char%d", i); // ???
+    }
+    symbol nm = symbol(buf);
+    cp = new charinfo(nm);
+    (void)charinfo_dictionary.lookup(nm, cp);
+    cp->set_wchar_code(wc);
+    add_wcharset_table(cp);
+  }
+  return cp;
+}
+
+static charinfo *
+wchar_charinfo(symbol nm)
+{
+  const char *p = nm.contents();
+  if (*p != 'u') {
+    return NULL;
+  }
+  char *pp;
+  wchar wc = make_wchar(strtol(p + 1, &pp, 16));
+  if (pp < p + 5)
+      return NULL;
+  charinfo *cp = lookup_wcharset_table(wc);
+  if (cp)
+    return cp;
+  /* create on demand */
+  cp = new charinfo(nm);
+  cp->set_wchar_code(wc);
+  add_wcharset_table(cp);
+  return cp;
+}
+#endif
+
 charinfo *get_charinfo(symbol nm)
 {
   void *p = charinfo_dictionary.lookup(nm);
   if (p != 0)
     return (charinfo *)p;
+#ifdef ENABLE_MULTIBYTE
+  charinfo *cp = wchar_charinfo(nm);
+  if (cp == NULL)
+    cp = new charinfo(nm);
+#else
   charinfo *cp = new charinfo(nm);
+#endif
   (void)charinfo_dictionary.lookup(nm, cp);
   return cp;
 }
@@ -7548,6 +7725,9 @@
 charinfo::charinfo(symbol s)
 : translation(0), mac(0), special_translation(TRANSLATE_NONE),
   hyphenation_code(0), flags(0), ascii_code(0), asciify_code(0),
+#ifdef ENABLE_MULTIBYTE
+  wchar_code(0),
+#endif
   not_found(0), transparent_translate(1), translate_input(0),
   fallback(0), nm(s)
 {
@@ -7592,6 +7772,14 @@
   asciify_code = c;
 }
 
+#ifdef ENABLE_MULTIBYTE
+void charinfo::set_wchar_code(wchar wc)
+{
+  wchar_code = wc;
+  index = wc; /* XXX: wchar code == index */
+}
+#endif
+
 macro *charinfo::set_macro(macro *m, int f)
 {
   macro *tem = mac;
@@ -7647,6 +7835,13 @@
 int font::name_to_index(const char *nm)
 {
   charinfo *ci;
+#ifdef	ENABLE_MULTIBYTE
+  int i = 1;
+  wchar wc = input_encoding->make_wchar(nm[0], (const unsigned char *)nm, &i);
+  if (is_wchar_code(wc)) {
+    ci = wcharset_table_entry(wc);
+  } else
+#endif
   if (nm[1] == 0)
     ci = charset_table[nm[0] & 0xff];
   else if (nm[0] == '\\' && nm[2] == 0)
@@ -7663,3 +7858,10 @@
 {
   return get_charinfo_by_number(n)->get_index();
 }
+
+#ifdef	ENABLE_MULTIBYTE
+int font::wchar_index(wchar wc)
+{
+  return(wcharset_table_entry(wc)->get_index());
+}
+#endif
--- groff-1.18.1.orig/src/roff/troff/node.cc
+++ groff-1.18.1/src/roff/troff/node.cc
@@ -38,6 +38,7 @@
 #include "input.h"
 #include "div.h"
 #include "geometry.h"
+#include "encoding.h"
 
 #include "nonposix.h"
 
@@ -745,8 +746,15 @@
   int current_font_number;
   symbol *font_position;
   int nfont_positions;
+#ifdef ENABLE_MULTIBYTE
+  const char *current_encoding;
+#endif
   enum { TBUF_SIZE = 256 };
+#ifdef	ENABLE_MULTIBYTE
+  wchar tbuf[TBUF_SIZE];
+#else
   char tbuf[TBUF_SIZE];
+#endif
   int tbuf_len;
   int tbuf_kern;
   int begun_page;
@@ -756,6 +764,9 @@
   void put(int i);
   void put(unsigned int i);
   void put(const char *s);
+#ifdef	ENABLE_MULTIBYTE
+  void putw(const wchar wc);
+#endif
   void set_font(tfont *tf);
   void flush_tbuf();
 public:
@@ -799,6 +810,13 @@
   putc(c, fp);
 }
 
+#ifdef	ENABLE_MULTIBYTE
+inline void troff_output_file::putw(wchar wc)
+{
+  output_encoding->put_wchar(wc, fp);
+}
+#endif
+
 inline void troff_output_file::put(unsigned char c)
 {
   putc(c, fp);
@@ -956,7 +974,11 @@
   check_output_limits(hpos, vpos - current_size);
 
   for (int i = 0; i < tbuf_len; i++)
+#ifdef ENABLE_MULTIBYTE
+    putw(tbuf[i]);
+#else
     put(tbuf[i]);
+#endif
   put('\n');
   tbuf_len = 0;
 }
@@ -988,7 +1010,13 @@
     flush_tbuf();
     set_font(tf);
   }
+#ifdef ENABLE_MULTIBYTE
+  wchar c = ci->get_wchar_code();
+  if (c == '\0')
+    c = ci->get_ascii_code();
+#else
   char c = ci->get_ascii_code();
+#endif
   if (c == '\0') {
     flush_tbuf();
     do_motion();
@@ -1014,7 +1042,8 @@
   }
   else if (tcommand_flag) {
     if (tbuf_len > 0 && hpos == output_hpos && vpos == output_vpos
-	&& gcol == current_glyph_color && fcol == current_fill_color
+	&& (!gcol || gcol == current_glyph_color)
+	&& (!fcol || fcol == current_fill_color)
 	&& kk == tbuf_kern
 	&& tbuf_len < TBUF_SIZE) {
       check_charinfo(tf, ci);
@@ -1039,17 +1068,26 @@
     check_charinfo(tf, ci);
     // check_output_limits(output_hpos, output_vpos);
     if (vpos == output_vpos
-	&& gcol == current_glyph_color && fcol == current_fill_color
+	&& (!gcol || gcol == current_glyph_color)
+	&& (!fcol || fcol == current_fill_color)
 	&& n > 0 && n < 100 && !force_motion) {
       put(char(n/10 + '0'));
       put(char(n%10 + '0'));
+#ifdef ENABLE_MULTIBYTE
+      putw(c);
+#else
       put(c);
+#endif
       output_hpos = hpos;
     }
     else {
       do_motion();
       put('c');
+#ifdef ENABLE_MULTIBYTE
+      putw(c);
+#else
       put(c);
+#endif
     }
     hpos += w.to_units() + kk;
   }
@@ -1063,7 +1101,13 @@
     return;
   if (tf != current_tfont)
     set_font(tf);
+#ifdef	ENABLE_MULTIBYTE
+  wchar c = ci->get_wchar_code();
+  if (c == '\0')
+    c = ci->get_ascii_code();
+#else
   char c = ci->get_ascii_code();
+#endif
   if (c == '\0') {
     do_motion();
     glyph_color(gcol);
@@ -1087,11 +1131,16 @@
   else {
     int n = hpos - output_hpos;
     if (vpos == output_vpos
-	&& gcol == current_glyph_color && fcol == current_fill_color
+	&& (!gcol || gcol == current_glyph_color)
+	&& (!fcol || fcol == current_fill_color)
 	&& n > 0 && n < 100) {
       put(char(n/10 + '0'));
       put(char(n%10 + '0'));
+#ifdef ENABLE_MULTIBYTE
+      putw(c);
+#else
       put(c);
+#endif
       output_hpos = hpos;
     }
     else {
@@ -1099,13 +1148,26 @@
       glyph_color(gcol);
       fill_color(fcol);
       put('c');
+#ifdef ENABLE_MULTIBYTE
+      putw(c);
+#else
       put(c);
+#endif
     }
   }
 }
 
 void troff_output_file::set_font(tfont *tf)
 {
+#ifdef ENABLE_MULTIBYTE
+  /* XXX */
+  if (current_encoding != output_encoding->name()) {
+    put("x encoding ");
+    put(output_encoding->name());
+    put('\n');
+    current_encoding = output_encoding->name();
+  }
+#endif
   if (current_tfont == tf)
     return;
   int n = tf->get_input_position();
@@ -1162,7 +1224,7 @@
 
 void troff_output_file::fill_color(color *col)
 {
-  if ((current_fill_color == col) || !color_flag)
+  if (!col || current_fill_color == col || !color_flag)
     return;
   flush_tbuf();
   put("DF");
@@ -1210,7 +1272,7 @@
 
 void troff_output_file::glyph_color(color *col)
 {
-  if ((current_glyph_color == col) || !color_flag)
+  if (!col || current_glyph_color == col || !color_flag)
     return;
   flush_tbuf();
   put("m");
@@ -1497,7 +1559,17 @@
   put(' ');
   put(vresolution);
   put('\n');
+#ifdef ENABLE_MULTIBYTE
+  current_encoding = output_encoding->name();
+  put("x init");
+  if (current_encoding && *current_encoding != '\0') {
+      put(' ');
+      put(current_encoding);
+  }
+  put('\n');
+#else
   put("x init\n");
+#endif
 }
 
 /* output_file */
@@ -1777,6 +1849,9 @@
   int same(node *);
   const char *type();
   int force_tprint();
+#ifdef	ENABLE_MULTIBYTE
+  node_type get_node_type();
+#endif
 };
 
 glyph_node *glyph_node::free_list = 0;
@@ -1802,6 +1877,9 @@
   int same(node *);
   const char *type();
   int force_tprint();
+#ifdef	ENABLE_MULTIBYTE
+  node_type get_node_type();
+#endif
 };
 
 class kern_pair_node : public node {
@@ -5225,6 +5303,55 @@
   return 0;
 }
 
+#ifdef	ENABLE_MULTIBYTE
+kword_space_node::kword_space_node(color *c, node *x) : word_space_node(0, c, new width_list(0, 0), x)
+{}
+
+node *kword_space_node::copy()
+{
+    return new kword_space_node(col);
+}
+newline_space_node::newline_space_node(hunits d, color *c, node *x) : word_space_node(d, c, new width_list(0, 0), x)
+{}
+
+node *newline_space_node::copy()
+{
+    return new newline_space_node(n, col);
+}
+
+const char *kword_space_node::type()
+{
+  return "kword_space_node";
+}
+const char *newline_space_node::type()
+{
+  return "newline_space_node";
+}
+
+node_type node::get_node_type()
+{
+    return NODE_ANOTHER;
+}
+node_type glyph_node::get_node_type()
+{
+    return NODE_GLYPH;
+}
+
+node_type ligature_node::get_node_type()
+{
+    return NODE_ANOTHER;
+}
+
+node_type kword_space_node::get_node_type()
+{
+    return NODE_KWORD_SPACE;
+}
+node_type newline_space_node::get_node_type()
+{
+    return NODE_NEWLINE_SPACE;
+}
+#endif
+
 int unbreakable_space_node::same(node *nd)
 {
   return n == ((unbreakable_space_node *)nd)->n
@@ -5625,6 +5752,28 @@
     return 0;
 }
 
+#ifdef ENABLE_MULTIBYTE
+int get_fontset_fontno(int n, wchar wc)
+{
+  if (n >= 0 && n < font_table_size && font_table[n] != 0) {
+    /* XXX: external_name should be used? */
+    int fn = font::get_fontset_font(font_table[n]->get_name().contents(), wc);
+    if (fn >= 0) {
+      symbol nm(font::font_name_table[fn]);
+      int nn = symbol_fontno(nm);
+      if (nn < 0) {
+	nn = next_available_font_position();
+	if (!mount_font(nn, nm)) {
+	  return -1; /* XXX */
+	}
+      }
+      return nn;
+    }
+  }
+  return n;
+}
+#endif
+
 hunits env_digit_width(environment *env)
 {
   node *n = make_glyph_node(charset_table['0'], env);
--- groff-1.18.1.orig/src/roff/troff/node.h
+++ groff-1.18.1/src/roff/troff/node.h
@@ -20,6 +20,8 @@
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
 
+#include "config.h"
+
 struct hyphen_list {
   unsigned char hyphen;
   unsigned char breakable;
@@ -31,6 +33,9 @@
 void hyphenate(hyphen_list *, unsigned);
 
 enum hyphenation_type { HYPHEN_MIDDLE, HYPHEN_BOUNDARY, HYPHEN_INHIBIT };
+#ifdef	ENABLE_MULTIBYTE
+enum node_type {NODE_GLYPH, NODE_KWORD_SPACE, NODE_NEWLINE_SPACE, NODE_ANOTHER};
+#endif
 
 class ascii_output_file;
 
@@ -106,6 +111,9 @@
 
   virtual int same(node *) = 0;
   virtual const char *type() = 0;
+#ifdef	ENABLE_MULTIBYTE
+  virtual node_type get_node_type();
+#endif
 };
 
 inline node::node()
@@ -212,6 +220,24 @@
   int force_tprint();
 };
 
+#ifdef	ENABLE_MULTIBYTE
+class kword_space_node : public word_space_node {
+public:
+  kword_space_node(color *, node * = 0);
+  node *copy();
+  const char *type();
+  node_type get_node_type();
+};
+
+class newline_space_node : public word_space_node {
+public:
+  newline_space_node(hunits, color *, node * = 0);
+  node *copy();
+  const char *type();
+  node_type get_node_type();
+};
+#endif
+
 class unbreakable_space_node : public word_space_node {
   unbreakable_space_node(hunits, int, color *, node * = 0);
 public:
@@ -538,6 +564,9 @@
 node *copy_node_list(node *);
 
 int get_bold_fontno(int f);
+#ifdef ENABLE_MULTIBYTE
+int get_fontset_fontno(int f, wchar wc);
+#endif
 
 inline hyphen_list::hyphen_list(unsigned char code, hyphen_list *p)
 : hyphen(0), breakable(0), hyphenation_code(code), next(p)
@@ -595,3 +624,4 @@
 
 font_family *lookup_family(symbol);
 symbol get_font_name(int, environment *);
+
--- groff-1.18.1.orig/src/roff/troff/token.h
+++ groff-1.18.1/src/roff/troff/token.h
@@ -28,12 +28,18 @@
   symbol nm;
   node *nd;
   unsigned char c;
+#ifdef	ENABLE_MULTIBYTE
+  wchar wc;
+#endif
   int val;
   units dim;
   enum token_type {
     TOKEN_BACKSPACE,
     TOKEN_BEGIN_TRAP,
     TOKEN_CHAR,			// a normal printing character
+#ifdef	ENABLE_MULTIBYTE
+    TOKEN_WCHAR,		// a multibyte character
+#endif
     TOKEN_DUMMY,		// \&
     TOKEN_EMPTY,		// this is the initial value
     TOKEN_END_TRAP,
--- groff-1.18.1.orig/src/roff/troff/troff.h
+++ groff-1.18.1/src/roff/troff/troff.h
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
+#include "encoding.h"
 #include "assert.h"
 #include "color.h"
 #include "device.h"
--- groff-1.18.1.orig/src/roff/nroff/nroff.man
+++ groff-1.18.1/src/roff/nroff/nroff.man
@@ -53,8 +53,10 @@
 command using groff.
 Only 
 .BR ascii ,
+.BR ascii8 ,
 .BR latin1 ,
 .BR utf8 ,
+.BR nippon ,
 and
 .B cp1047
 are valid arguments for the
--- groff-1.18.1.orig/src/roff/nroff/nroff.sh
+++ groff-1.18.1/src/roff/nroff/nroff.sh
@@ -12,6 +12,8 @@
     T=-Tlatin1 ;;
   IBM-1047)
     T=-Tcp1047 ;;
+  EUC-JP)
+    T=-Tnippon ;;
   *)
     case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
       *.UTF-8)
@@ -20,6 +22,8 @@
         T=-Tlatin1 ;;
       *.IBM-1047)
         T=-Tcp1047 ;;
+      ja_JP.ujis | ja_JP.eucJP)
+	T=-Tnippon ;;
       *)
         case "$LESSCHARSET" in
           utf-8)
@@ -28,8 +32,10 @@
             T=-Tlatin1 ;;
           cp1047)
             T=-Tcp1047 ;;
+          japanese)
+	    T=-Tnippon ;;
           *)
-            T=-Tascii ;;
+            T=-Tascii8 ;;
           esac ;;
      esac ;;
 esac
@@ -52,7 +58,7 @@
       exit 1 ;;
     -[iptSUC] | -[mrno]*)
       opts="$opts $1" ;;
-    -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047)
+    -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon)
       T=$1 ;;
     -T*)
       # ignore other devices
--- groff-1.18.1.orig/src/preproc/eqn/eqn.y
+++ groff-1.18.1/src/preproc/eqn/eqn.y
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include "encoding.h" /* XXX */
 #include "lib.h"
 #include "box.h"
 extern int non_empty_flag;
--- groff-1.18.1.orig/src/preproc/eqn/lex.cc
+++ groff-1.18.1/src/preproc/eqn/lex.cc
@@ -23,6 +23,7 @@
 #include "eqn_tab.h"
 #include "stringclass.h"
 #include "ptable.h"
+#include "encoding.h"
 
 struct definition {
   char is_macro;
@@ -375,6 +376,11 @@
 	lex_error("invalid input character code %1", c);
       else {
 	line += char(c);
+#ifdef	ENABLE_MULTIBYTE
+	if (input_encoding->is_wchar_byte(c)) {
+	  line += char(getc(fp));
+	}
+#endif
 	if (c == '\n') 
 	  break;
       }
--- groff-1.18.1.orig/src/preproc/eqn/main.cc
+++ groff-1.18.1/src/preproc/eqn/main.cc
@@ -258,6 +258,7 @@
   program_name = argv[0];
   static char stderr_buf[BUFSIZ];
   setbuf(stderr, stderr_buf);
+  init_encoding_handler();
   int opt;
   int load_startup_file = 1;
   static const struct option long_options[] = {
--- groff-1.18.1.orig/src/preproc/eqn/text.cc
+++ groff-1.18.1/src/preproc/eqn/text.cc
@@ -21,13 +21,20 @@
 #include "eqn.h"
 #include "pbox.h"
 #include "ptable.h"
+#include "encoding.h"
 
 class char_box : public simple_box {
   unsigned char c;
+#ifdef	ENABLE_MULTIBYTE
+  wchar wc;
+#endif
   char next_is_italic;
   char prev_is_italic;
 public:
   char_box(unsigned char);
+#ifdef	ENABLE_MULTIBYTE
+  char_box(unsigned char, wchar);
+#endif
   void debug_print();
   void output();
   int is_char();
@@ -165,11 +172,22 @@
 }
 
 char_box::char_box(unsigned char cc)
-: c(cc), next_is_italic(0), prev_is_italic(0)
+: c(cc),
+#ifdef	ENABLE_MULTIBYTE
+  wc(cc),
+#endif
+  next_is_italic(0), prev_is_italic(0)
 {
   spacing_type = char_table[c].spacing_type;
 }
 
+#ifdef	ENABLE_MULTIBYTE
+char_box::char_box(unsigned char cc, wchar wc)
+: c(cc), wc(wc), next_is_italic(0), prev_is_italic(0)
+{
+}
+#endif
+
 void char_box::hint(unsigned flags)
 {
   if (flags & HINT_PREV_IS_ITALIC)
@@ -188,7 +206,11 @@
   if (c == '\\')
     fputs("\\e", stdout);
   else
+#ifdef	ENABLE_MULTIBYTE
+    output_encoding->put_wchar(wc, stdout);
+#else
     putchar(c);
+#endif
   if (!next_is_italic)
     fputs("\\/", stdout);
   else
@@ -497,6 +519,14 @@
       break;
     default:
     normal_char:
+#ifdef	ENABLE_MULTIBYTE
+      if (input_encoding->is_wchar_byte(c)) {
+        int i = 1;
+	wchar wc = input_encoding->make_wchar(c, (unsigned char *)s, &i);
+	b = new char_box('A', wc); // char_info of wc is same the 'A'.
+	s += i;
+      } else
+#endif
       b = new char_box(c);
       break;
     }
--- groff-1.18.1.orig/src/preproc/html/pre-html.cc
+++ groff-1.18.1/src/preproc/html/pre-html.cc
@@ -63,6 +63,10 @@
 #define DEFAULT_IMAGE_RES        100   // number of pixels per inch resolution
 #define IMAGE_BOARDER_PIXELS       0
 #define INLINE_LEADER_CHAR      '\\'
+#define A4_LENGTH             841890   // taken from devps/Makefile.sub
+#define LETTER_LENGTH         792000   // taken from devps/Makefile.sub
+#define A4_OFFSET                  0
+#define LETTER_OFFSET             50   // 50/72 of an inch
 
 #define TRANSPARENT  "-background white -transparent white"
 #define MIN_ALPHA_BITS             0
@@ -104,6 +108,7 @@
 static char *macroset_template= NULL;           // image template passed to troff by -D
 static int   troff_arg        = 0;              // troff arg index
 static char *image_dir        = NULL;           // user specified image directory
+static char *gsPaper          = NULL;           // the paper size that gs must use
 static int   textAlphaBits    = MAX_ALPHA_BITS;
 static int   graphicAlphaBits = MAX_ALPHA_BITS;
 static char *antiAlias        = NULL;           // antialias arguments we pass to gs.
@@ -211,6 +216,54 @@
 }
 
 /*
+ *  get_papersize - returns an integer determining the paper length from
+ *  devps/DESC
+ */
+
+static int get_papersize (void)
+{
+  char *pathp;
+  FILE *f;
+  int res;
+  f = font_path.open_file("devps/DESC", &pathp);
+  if (f == 0)
+    fatal("can't open devps/DESC");
+  while (get_line(f)) {
+    int n = sscanf(linebuf, "paperlength %d", &res);
+    if (n >= 1) {
+      fclose(f);
+      return res;
+    }
+    if (!strncmp(linebuf, "papersize", 9)) {
+      double length;
+      char *p = linebuf + 9;
+      while (*p == ' ' || *p == '\t')
+        p++;
+      for (p = strtok(p, " \t"); p; p = strtok(0, " \t")) {
+        if (font::scan_papersize(p, 0, &length, 0)) {
+          fclose(f);
+          return int(length * postscriptRes + 0.5);
+        }
+      }
+      fatal("bad argument to `papersize' keyword in devps/DESC");
+    }
+  }
+  fatal("can't find `papersize' or `paperlength' keyword in devps/DESC");
+  return 0;
+}
+
+/*
+ *  determine_vertical_offset - works out the default vertical offset from
+ *                              the page length
+ */
+
+static void determine_vertical_offset (void)
+{
+  vertical_offset = ((A4_LENGTH-get_papersize())*72)/postscriptRes;
+  gsPaper = "-sPAPERSIZE=a4";
+}
+
+/*
  *  html_system - a wrapper for system()
  */
 
@@ -1469,6 +1522,7 @@
   int ok=1;
 
   postscriptRes = get_resolution();
+  determine_vertical_offset();
   i = scanArguments(argc, argv);
   setupAntiAlias();
   checkImageDir();
--- groff-1.18.1.orig/src/devices/grops/ps.cc
+++ groff-1.18.1/src/devices/grops/ps.cc
@@ -24,6 +24,7 @@
 #include "cset.h"
 #include "nonposix.h"
 #include "paper.h"
+#include "encoding.h"
 
 #include "ps.h"
 #include <time.h>
@@ -193,12 +194,23 @@
   return *this;
 }
 
+#ifdef ENABLE_MULTIBYTE
+ps_output &ps_output::put_string(const wchar *s, int n)
+#else
 ps_output &ps_output::put_string(const char *s, int n)
+#endif
 {
   int len = 0;
   int i;
   for (i = 0; i < n; i++) {
+#ifdef ENABLE_MULTIBYTE
+    wchar wc = s[i];
+    char c = 0;
+    if (is_wchar_singlebyte(wc))
+      c = wchar_singlebyte(wc);
+#else
     char c = s[i];
+#endif
     if (is_ascii(c) && csprint(c)) {
       if (c == '(' || c == ')' || c == '\\')
 	len += 2;
@@ -224,8 +236,13 @@
 	putc('\n', fp);
 	col = 0;
       }
+#ifdef	ENABLE_MULTIBYTE
+      int nb = output_encoding->put_wchar(s[i], fp, "%02x");
+      col += nb * 2;
+#else
       fprintf(fp, "%02x", s[i] & 0377);
       col += 2;
+#endif
     }
     putc('>', fp);
     col++;
@@ -396,6 +413,9 @@
   int encoding_index;
   char *encoding;
   char *reencoded_name;
+#ifdef ENABLE_MULTIBYTE
+  char *encodingname;
+#endif
   ~ps_font();
   void handle_unknown_font_command(const char *command, const char *arg,
 				   const char *filename, int lineno);
@@ -414,6 +434,9 @@
 
 ps_font::ps_font(const char *nm)
 : font(nm), encoding_index(-1), encoding(0), reencoded_name(0)
+#ifdef ENABLE_MULTIBYTE
+  , encodingname(0)
+#endif
 {
 }
 
@@ -421,6 +444,9 @@
 {
   a_delete encoding;
   a_delete reencoded_name;
+#ifdef ENABLE_MULTIBYTE
+  a_delete encodingname;
+#endif
 }
 
 void ps_font::handle_unknown_font_command(const char *command, const char *arg,
@@ -433,6 +459,15 @@
     else
       encoding = strsave(arg);
   }
+#ifdef ENABLE_MULTIBYTE
+  if (strcmp(command, "encodingname") == 0) {
+    if (arg == 0)
+      error_with_file_and_line(filename, lineno,
+			       "`encodingname' command requires an argument");
+    else
+      encodingname = strsave(arg);
+  }
+#endif
 }
 
 static void handle_unknown_desc_command(const char *command, const char *arg,
@@ -487,7 +522,11 @@
   int paper_length;
   int equalise_spaces;
   enum { SBUF_SIZE = 256 };
+#ifdef	ENABLE_MULTIBYTE
+  wchar sbuf[SBUF_SIZE];
+#else
   char sbuf[SBUF_SIZE];
+#endif
   int sbuf_len;
   int sbuf_start_hpos;
   int sbuf_vpos;
@@ -606,7 +645,11 @@
 {
   if (i == space_char_index || invis_count > 0)
     return;
+#ifdef	ENABLE_MULTIBYTE
+  wchar code = f->get_code(i);
+#else
   unsigned char code = f->get_code(i);
+#endif
   style sty(f, env->size, env->height, env->slant);
   if (sty.slant != 0) {
     if (sty.slant > 80 || sty.slant < -80) {
@@ -763,6 +806,14 @@
     if (sty == defined_styles[i]) {
       sprintf(buf, "F%d", i);
       out.put_symbol(buf);
+#ifdef ENABLE_MULTIBYTE
+      char *encodingname = ((ps_font *)sty.f)->encodingname;
+      if (encodingname != 0) {
+	select_output_encoding_handler(encodingname);
+      } else {
+	select_output_encoding_handler("LATIN1");
+      }
+#endif
       return;
     }
   if (ndefined_styles >= MAX_DEFINED_STYLES)
@@ -772,6 +823,14 @@
   const char *psname = sty.f->get_internal_name();
   if (psname == 0)
     fatal("no internalname specified for font `%1'", sty.f->get_name());
+#ifdef ENABLE_MULTIBYTE
+  char *encodingname = ((ps_font *)sty.f)->encodingname;
+  if (encodingname != 0) {
+    select_output_encoding_handler(encodingname);
+  } else {
+    select_output_encoding_handler("LATIN1");
+  }
+#endif
   char *encoding = ((ps_font *)sty.f)->encoding;
   if (encoding != 0) {
     char *s = ((ps_font *)sty.f)->reencoded_name;
@@ -1555,6 +1614,7 @@
   string env;
   static char stderr_buf[BUFSIZ];
   setbuf(stderr, stderr_buf);
+  init_encoding_handler();
   int c;
   static const struct option long_options[] = {
     { "help", no_argument, 0, CHAR_MAX + 1 },
--- groff-1.18.1.orig/src/devices/grops/ps.h
+++ groff-1.18.1/src/devices/grops/ps.h
@@ -18,10 +18,16 @@
 with groff; see the file COPYING.  If not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 
+#include "encoding.h" // XXX
+
 class ps_output {
 public:
   ps_output(FILE *, int max_line_length);
+#ifdef	ENABLE_MULTIBYTE
+  ps_output &put_string(const wchar *, int);
+#else
   ps_output &put_string(const char *, int);
+#endif
   ps_output &put_number(int);
   ps_output &put_fix_number(int);
   ps_output &put_float(double);
--- groff-1.18.1.orig/src/devices/grotty/grotty.man
+++ groff-1.18.1/src/devices/grotty/grotty.man
@@ -50,7 +50,9 @@
 command
 with a
 .BR \-Tascii ,
-.B \-Tlatin1
+.BR \-Tascii8 ,
+.BR \-Tlatin1 ,
+.B \-Tnippon
 or
 .B \-Tutf8
 option on ASCII based systems, and with
@@ -235,8 +237,10 @@
 .I name
 is the name of the device, usually
 .BR ascii ,
+.BR ascii8 ,
 .BR latin1 ,
 .BR utf8 ,
+.B  nippon
 or
 .BR cp1047 .
 .TP
@@ -315,10 +319,20 @@
 device.
 .
 .TP
+.B @FONTDIR@/devascii8/DESC
+Device description file for
+.B ascii8
+device.
+.TP
 .B @FONTDIR@/devlatin1/DESC
 Device description file for
 .B latin1
 device.
+.TP
+.B @FONTDIR@/devnippon/DESC
+Device description file for
+.B nippon
+device.
 .
 .TP
 .BI @FONTDIR@/devlatin1/ F
--- groff-1.18.1.orig/src/devices/grotty/tty.cc
+++ groff-1.18.1/src/devices/grotty/tty.cc
@@ -20,6 +20,7 @@
 
 #include "driver.h"
 #include "device.h"
+#include "encoding.h"
 
 extern "C" const char *Version_string;
 
@@ -51,8 +52,18 @@
   HDRAW_MODE = 0x08,
   CU_MODE = 0x10,
   COLOR_CHANGE = 0x20
+#ifdef ENABLE_MULTIBYTE
+  , WCHAR_MODE = 0x100
+#endif
 };
 
+#ifdef ENABLE_MULTIBYTE
+# ifdef putchar
+#  undef putchar
+# endif
+#define putchar(wc)	output_encoding->put_wchar((wc), stdout)
+#endif
+
 // Mode to use for bold-underlining.
 static unsigned char bold_underline_mode = BOLD_MODE|UNDERLINE_MODE;
 
@@ -89,6 +100,7 @@
   static tty_font *load_tty_font(const char *);
 };
 
+
 tty_font *tty_font::load_tty_font(const char *s)
 {
   tty_font *f = new tty_font(s);
@@ -98,8 +110,26 @@
   }
   const char *num = f->get_internal_name();
   long n;
+#ifdef ENABLE_MULTIBYTE
+  if (num != 0) {
+    n = strtol(num, 0, 0);
+    switch (n) {
+    case 1:
+      f->mode = int(UNDERLINE_MODE);
+      break;
+    case 2:
+    case 5:
+      f->mode = int(BOLD_MODE);
+      break;
+    case 3:
+      f->mode = int(BOLD_MODE|UNDERLINE_MODE);
+      break;
+    }
+  }
+#else
   if (num != 0 && (n = strtol(num, 0, 0)) != 0)
     f->mode = int(n & (BOLD_MODE|UNDERLINE_MODE));
+#endif
   if (!underline_flag)
     f->mode &= ~UNDERLINE_MODE;
   if (!bold_flag)
@@ -135,6 +165,9 @@
   short hpos;
   unsigned int code;
   unsigned char mode;
+#ifdef ENABLE_MULTIBYTE
+  short cols;
+#endif
   unsigned char back_color_idx;
   unsigned char fore_color_idx;
   void *operator new(size_t);
@@ -184,7 +217,7 @@
   void make_underline();
   void make_bold(unsigned int);
   unsigned char color_to_idx(color *col);
-  void add_char(unsigned int, int, int, color *, color *, unsigned char);
+  void add_char(unsigned int, int, int, color *, color *, font *, unsigned char);
 public:
   tty_printer(const char *device);
   ~tty_printer();
@@ -193,7 +226,7 @@
   void special(char *arg, const environment *env, char type);
   void change_color(const environment *env);
   void change_fill_color(const environment *env);
-  void put_char(unsigned int);
+  int put_char(unsigned int);
   void put_color(unsigned char, int);
   void begin_page(int) { }
   void end_page(int page_length);
@@ -203,6 +236,10 @@
 tty_printer::tty_printer(const char *device) : cached_v(0)
 {
   is_utf8 = !strcmp(device, "utf8");
+#ifdef ENABLE_MULTIBYTE
+  if (is_utf8)
+      select_output_encoding_handler("UTF-8");
+#endif
   tty_colors[0].set_rgb(0,			// black
  			0,
 			0);
@@ -242,8 +279,18 @@
 void tty_printer::make_underline()
 {
   if (old_drawing_scheme) {
+#if 0 /* def ENABLE_MULTIBYTE XXX: not necessary? */
+    if ((p->mode & WCHAR_MODE)) {
+	putchar('_'); putchar('_');
+	putchar('\b'); putchar('\b');
+    } else {
+	putchar('_');
+	putchar('\b');
+    }
+#else
     putchar('_');
     putchar('\b');
+#endif
   }
   else {
     if (!is_underline) {
@@ -285,17 +332,25 @@
 void tty_printer::set_char(int i, font *f, const environment *env,
 			   int w, const char *name)
 {
+#ifdef ENABLE_MULTIBYTE
+  if (is_wchar_code(i)) {
+    add_char(wchar_code(i), env->hpos, env->vpos, env->col, env->fill, 
+	     f, ((tty_font *)f)->get_mode());
+    return;
+  }
+#endif
   if (w != font::hor)
     fatal("width of character not equal to horizontal resolution");
   add_char(f->get_code(i),
 	   env->hpos, env->vpos,
 	   env->col, env->fill,
-	   ((tty_font *)f)->get_mode());
+	   f, ((tty_font *)f)->get_mode());
 }
 
 void tty_printer::add_char(unsigned int c,
 			   int h, int v,
 			   color *fore, color *back,
+			   font *curfont,
 			   unsigned char mode)
 {
 #if 0
@@ -338,6 +393,16 @@
   g->code = c;
   g->fore_color_idx = color_to_idx(fore);
   g->back_color_idx = color_to_idx(back);
+#ifdef ENABLE_MULTIBYTE
+  if (is_wchar_code(c))
+    mode |= WCHAR_MODE;
+  if (curfont && curfont->contains(c)) {
+      int gw0 = curfont->get_space_width(font::unitwidth);
+      int gw = curfont->get_width(c, font::unitwidth);
+      g->cols = gw/gw0;
+  } else
+      g->cols = 1;	/* XXX */
+#endif
   g->mode = mode;
 
   // The list will be reversed later.  After reversal, it must be in
@@ -357,7 +422,7 @@
 void tty_printer::special(char *arg, const environment *env, char type)
 {
   if (type == 'u') {
-    add_char(*arg - '0', env->hpos, env->vpos, env->col, env->fill, CU_MODE);
+    add_char(*arg - '0', env->hpos, env->vpos, env->col, env->fill, get_font_from_index(env->fontno), CU_MODE);
     return;
   }
   if (type != 'p')
@@ -395,12 +460,12 @@
 
 void tty_printer::change_color(const environment *env)
 {
-  add_char(0, env->hpos, env->vpos, env->col, env->fill, COLOR_CHANGE);
+  add_char(0, env->hpos, env->vpos, env->col, env->fill, get_font_from_index(env->fontno), COLOR_CHANGE);
 }
 
 void tty_printer::change_fill_color(const environment *env)
 {
-  add_char(0, env->hpos, env->vpos, env->col, env->fill, COLOR_CHANGE);
+  add_char(0, env->hpos, env->vpos, env->col, env->fill, get_font_from_index(env->fontno), COLOR_CHANGE);
 }
 
 void tty_printer::draw(int code, int *p, int np, const environment *env)
@@ -420,7 +485,7 @@
       len = -len;
     }
     while (len >= 0) {
-      add_char('|', env->hpos, v, env->col, env->fill, VDRAW_MODE);
+      add_char('|', env->hpos, v, env->col, env->fill, get_font_from_index(env->fontno), VDRAW_MODE);
       len -= font::vert;
       v += font::vert;
     }
@@ -434,18 +499,24 @@
       len = -len;
     }
     while (len >= 0) {
-      add_char('-', h, env->vpos, env->col, env->fill, HDRAW_MODE);
+      add_char('-', h, env->vpos, env->col, env->fill, get_font_from_index(env->fontno), HDRAW_MODE);
       len -= font::hor;
       h += font::hor;
     }
   }
 }
 
-void tty_printer::put_char(unsigned int wc)
+int tty_printer::put_char(unsigned int wc)
 {
+#ifdef ENABLE_MULTIBYTE
+  if (wc >= 0x80) {
+    return output_encoding->put_wchar(make_wchar(wc), stdout);
+  }
+#else
   if (is_utf8 && wc >= 0x80) {
     char buf[6 + 1];
     int count;
+    int len;
     char *p = buf;
     if (wc < 0x800)
       count = 1, *p = (unsigned char)((wc >> 6) | 0xc0);
@@ -458,14 +529,18 @@
     else if (wc <= 0x7fffffff)
       count = 5, *p = (unsigned char)((wc >> 30) | 0xfC);
     else
-      return;
+      return 0;
+    len = count;
     do *++p = (unsigned char)(((wc >> (6 * --count)) & 0x3f) | 0x80);
       while (count > 0);
     *++p = '\0';
     putstring(buf);
+    return len;
   }
+#endif
   else
     putchar(wc);
+  return 1;
 }
 
 void tty_printer::put_color(unsigned char color_index, int back)
@@ -629,7 +704,11 @@
 	}
       }
       put_char(p->code);
+#ifdef ENABLE_MULTIBYTE
+      hpos += p->cols;
+#else
       hpos++;
+#endif
     }
     if (!old_drawing_scheme
 	&& (is_bold || is_underline
@@ -667,6 +746,7 @@
   if (getenv("GROFF_NO_SGR"))
     old_drawing_scheme = 1;
   setbuf(stderr, stderr_buf);
+  init_encoding_handler();
   int c;
   static const struct option long_options[] = {
     { "help", no_argument, 0, CHAR_MAX + 1 },
--- groff-1.18.1.orig/src/devices/grodvi/dvi.cc
+++ groff-1.18.1/src/devices/grodvi/dvi.cc
@@ -21,6 +21,7 @@
 
 #include "driver.h"
 #include "nonposix.h"
+#include "encoding.h" 
 
 extern "C" const char *Version_string;
 
@@ -104,6 +105,9 @@
 struct output_font {
   dvi_font *f;
   int point_size;
+#ifdef	ENABLE_MULTIBYTE
+  const char *sf;		// subfont name
+#endif
   output_font() : f(0) { }
 };
 
@@ -121,6 +125,9 @@
   output_font output_font_table[FONTS_MAX];
   font *cur_font;
   int cur_point_size;
+#ifdef ENABLE_MULTIBYTE
+  const char *cur_subfont;
+#endif
   color cur_color;
   int pushed;
   int pushed_h;
@@ -341,9 +348,18 @@
   if (*env->col != cur_color)
     set_color(env->col);
   int code = f->get_code(index);
+#ifdef ENABLE_MULTIBYTE
+  const char *sf = f->get_subfont_name(index);
+  if (env->size != cur_point_size || f != cur_font ||
+     (sf != cur_subfont && strcmp(sf, cur_subfont))) {
+#else
   if (env->size != cur_point_size || f != cur_font) {
+#endif
     cur_font = f;
     cur_point_size = env->size;
+#ifdef ENABLE_MULTIBYTE
+    cur_subfont = sf;
+#endif
     int i;
     for (i = 0;; i++) {
       if (i >= FONTS_MAX) {
@@ -352,9 +368,16 @@
       if (output_font_table[i].f == 0) {
 	output_font_table[i].f = (dvi_font *)cur_font;
 	output_font_table[i].point_size = cur_point_size;
+#ifdef	ENABLE_MULTIBYTE
+	output_font_table[i].sf = cur_subfont;
+#endif
 	define_font(i);
       }
       if (output_font_table[i].f == cur_font
+#ifdef	ENABLE_MULTIBYTE
+	  && (output_font_table[i].sf == cur_subfont ||
+	      strcmp(output_font_table[i].sf, cur_subfont) == 0)
+#endif
 	  && output_font_table[i].point_size == cur_point_size)
 	break;
     }
@@ -398,7 +421,13 @@
   out4(f->checksum);
   out4(output_font_table[i].point_size*RES_7227);
   out4(int((double(f->design_size)/(1<<20))*RES_7227*100 + .5));
+#ifdef	ENABLE_MULTIBYTE
+  const char *nm;
+  if (!(nm = output_font_table[i].sf))
+    nm = f->get_internal_name();
+#else
   const char *nm = f->get_internal_name();
+#endif
   out1(0);
   out_string(nm);
 }
@@ -889,6 +918,7 @@
   program_name = argv[0];
   static char stderr_buf[BUFSIZ];
   setbuf(stderr, stderr_buf);
+  init_encoding_handler();
   int c;
   static const struct option long_options[] = {
     { "help", no_argument, 0, CHAR_MAX + 1 },
--- groff-1.18.1.orig/src/devices/grohtml/html.h
+++ groff-1.18.1/src/devices/grohtml/html.h
@@ -49,6 +49,9 @@
 class simple_output {
 public:
   simple_output(FILE *, int max_line_length);
+#ifdef ENABLE_MULTIBYTE
+  simple_output &put_string(const wchar *, int);
+#endif
   simple_output &put_string(const char *, int);
   simple_output &put_string(const char *s);
   simple_output &put_string(const string &s);
--- groff-1.18.1.orig/src/devices/grohtml/post-html.cc
+++ groff-1.18.1/src/devices/grohtml/post-html.cc
@@ -29,6 +29,7 @@
 #include "html.h"
 #include "html-text.h"
 #include "html-table.h"
+#include "encoding.h" // XXX: ukai
 
 #include <time.h>
 
@@ -280,6 +281,9 @@
 public:
   char_buffer();
   ~char_buffer();
+#ifdef ENABLE_MULTIBYTE
+  char  *add_string(const wchar *, unsigned int);
+#endif
   char  *add_string(const char *, unsigned int);
   char  *add_string(const string &);
 private:
@@ -301,6 +305,43 @@
   }
 }
 
+#ifdef ENABLE_MULTIBYTE
+char *char_buffer::add_string (const wchar *s, unsigned int length)
+{
+  int i=0;
+  unsigned int old_used;
+
+  if (tail == 0) {
+    tail = new char_block;
+    head = tail;
+  } else {
+    if (tail->used + length*2 + 1 > char_block::SIZE) {
+      tail->next = new char_block;
+      tail       = tail->next;
+    }
+  }
+  // at this point we have a tail which is ready for the string.
+  if (tail->used + length*2 + 1 > char_block::SIZE) {
+    fatal("need to increase char_block::SIZE");
+  }
+
+  old_used = tail->used;
+  do {
+    length -= output_encoding->put_wchar(s[i], (unsigned char *)tail->buffer, &tail->used, length*2);
+    i++;
+  } while (length>0);
+
+  // add terminating nul character
+
+  tail->buffer[tail->used] = '\0';
+  tail->used++;
+
+  // and return start of new string
+
+  return( &tail->buffer[old_used] );
+}
+#endif
+
 char *char_buffer::add_string (const char *s, unsigned int length)
 {
   int i=0;
@@ -320,6 +361,7 @@
   }
 
   old_used = tail->used;
+  /* XXX: encoding - ukai */
   do {
     tail->buffer[tail->used] = s[i];
     tail->used++;
@@ -1917,6 +1959,15 @@
 
     current_paragraph->do_para(&html, "", indentation, pageoffset, linelength);
   }
+#if 0 // def ENABLE_MULTIBYTE /* XXX */
+  else if (strcmp(fontname, "M") == 0) {
+    current_paragraph->done_bold();
+    current_paragraph->done_italic();
+    current_paragraph->done_tt();
+  } else if (strcmp(fontname, "G") == 0) {
+    current_paragraph->do_bold();
+  }
+#endif
 }
 
 void html_printer::determine_header_level (int level)
@@ -2948,6 +2999,11 @@
     current_paragraph->done_italic();
     current_paragraph->done_tt();
   }
+#ifdef ENABLE_MULTIBYTE
+  else if (strcmp(fontname, "G") == 0) {
+    current_paragraph->done_bold();
+  }
+#endif
 }
 
 /*
@@ -2992,6 +3048,15 @@
     current_paragraph->do_italic();
     current_paragraph->do_bold();
   }
+#ifdef ENABLE_MULTIBYTE
+  else if (strcmp(fontname, "M") == 0) {
+    current_paragraph->done_bold();
+    current_paragraph->done_italic();
+    current_paragraph->done_tt();
+  } else if (strcmp(fontname, "G") == 0) {
+    current_paragraph->do_bold();
+  }
+#endif
 }
 
 /*
@@ -3331,7 +3396,23 @@
 
   last_sbuf_length = sbuf.length();
   if (html_glyph == NULL)
+#ifdef ENABLE_MULTIBYTE
+    {
+      if (is_wchar_code(code)) {
+	int mblen = output_encoding->max_wchar_len();
+	unsigned char *wbuf = new unsigned char[mblen];
+	int i = 0, j = 0;
+	output_encoding->put_wchar(code, wbuf, &j, mblen);
+	for (i = 0; i < j; i++) {
+	  sbuf += wbuf[i];
+	}
+      }
+      else
+	sbuf += ((char)code);
+    }
+#else
     sbuf += ((char)code);
+#endif
   else
     sbuf += html_glyph;
 }
@@ -3445,12 +3526,12 @@
     return;
   
   flush_sbuf();
+  sbuf_style = sty; /* XXX? */
   add_to_sbuf(i, name);
   sbuf_end_hpos = env->hpos + w;
   sbuf_start_hpos = env->hpos;
   sbuf_prev_hpos = env->hpos;
   sbuf_vpos = env->vpos;
-  sbuf_style = sty;
   sbuf_kern = 0;
 }
 
@@ -3659,6 +3740,7 @@
   program_name = argv[0];
   static char stderr_buf[BUFSIZ];
   setbuf(stderr, stderr_buf);
+  init_encoding_handler();
   int c;
   static const struct option long_options[] = {
     { "help", no_argument, 0, CHAR_MAX + 1 },
--- groff-1.18.1.orig/src/xditview/Dvi.c
+++ groff-1.18.1/src/xditview/Dvi.c
@@ -4,6 +4,8 @@
 #endif /* lint */
 #endif /* SABER */
 
+#include "config.h"
+
 /*
  * Dvi.c - Dvi display widget
  *
@@ -49,6 +51,8 @@
 NBI	-adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\
 S	-adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
 SS	-adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
+M	-misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0\n\
+G	-misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0\
 ";
 
 #define offset(field) XtOffset(DviWidget, field)
@@ -94,6 +98,20 @@
 
 static void		SaveToFile ();
 
+/* font.c */
+extern void ParseFontMap();
+extern void DestroyFontMap();
+extern void ForgetFonts();
+
+/* page.c */
+extern void DestroyFileMap();
+extern int SearchPagePosition();
+extern void FileSeek();
+extern void ForgetPagePositions();
+
+/* parse.c */
+extern int ParseInput();
+
 DviClassRec dviClassRec = {
 {
 	&widgetClassRec,		/* superclass		  */	
@@ -406,6 +424,7 @@
 	return ret;
 }
 
+void
 SetDevice (dw, name)
 	DviWidget	dw;
 	char 		*name;
@@ -559,6 +578,9 @@
 	DviWidgetClass super = (DviWidgetClass) wc->core_class.superclass;
 	if (wc->command_class.save == InheritSaveToFile)
 		wc->command_class.save = super->command_class.save;
+#ifdef ENABLE_MULTIBYTE
+	DviInitLocale();
+#endif
 }
 	
 /*
--- groff-1.18.1.orig/src/xditview/DviChar.c
+++ groff-1.18.1/src/xditview/DviChar.c
@@ -5,7 +5,10 @@
  * font indexes and back
  */
 
-#include   "DviChar.h"
+#include <stdlib.h>
+#include "config.h"
+#include "DviChar.h"
+#include "encoding.h"
 
 extern char *xmalloc();
 
@@ -21,7 +24,7 @@
 static int	standard_maps_loaded = 0;
 static void	load_standard_maps ();
 static int	hash_name ();
-static		dispose_hash(), compute_hash();
+static void	dispose_hash(), compute_hash();
 
 DviCharNameMap *
 DviFindMap (encoding)
@@ -58,7 +61,7 @@
 	compute_hash (map);
 }
 
-static
+static void
 dispose_hash (map)
 	DviCharNameMap	*map;
 {
@@ -88,7 +91,7 @@
 	return i;
 }
 
-static
+static void
 compute_hash (map)
 	DviCharNameMap	*map;
 {
@@ -120,7 +123,10 @@
 {
 	int		i;
 	DviCharNameHash	*h;
-
+#ifdef ENABLE_MULTIBYTE
+	if (map->char_index)
+	    return (*map->char_index)(map, name);
+#endif
 	i = hash_name (name) % DVI_HASH_SIZE;
 	for (h = map->buckets[i]; h; h=h->next)
 		if (!strcmp (h->name, name))
@@ -128,9 +134,47 @@
 	return -1;
 }
 
+#ifdef ENABLE_MULTIBYTE
+#include <X11/Xlib.h>
+void
+DviChar2XChar2b(int c, XChar2b *xc)
+{
+    /* XXX: can we assume 'c' is EUC-JP ? */
+	xc->byte1 = (c >> 8) & 0x7f;
+	xc->byte2 = (c) &0x7f;
+	return;
+}
+
+int
+DviCharIndexJISX0208_1983(map, name)
+	DviCharNameMap	*map;
+	char		*name;
+{
+    /* XXX: can we assume name points EUC-JP chars? */
+	unsigned char ub = *name, lb = *(name + 1);
+	int wc;
+	wc = (name[0] & 0xff) << 8;
+	wc |= (name[1] & 0xff);
+	return(wc);
+}
+
+static DviCharNameMap JISX0208_1983_0_map = {
+	"jisx0208.1983-0",
+	0,
+	DviChar2XChar2b,
+	DviCharIndexJISX0208_1983,
+{
+{	"DummyEntry",		/* 0 */},
+}};
+#endif
+
 static DviCharNameMap ISO8859_1_map = {
 	"iso8859-1",
 	0,
+#ifdef ENABLE_MULTIBYTE
+	0,
+	0,
+#endif
 {
 {	0,			/* 0 */},
 {	0,			/* 1 */},
@@ -393,6 +437,10 @@
 static DviCharNameMap Adobe_Symbol_map = {
 	"adobe-fontspecific",
 	1,
+#ifdef ENABLE_MULTIBYTE
+	0,
+	0,
+#endif
 {
 {	0,					/* 0 */},
 {	0,					/* 1 */},
@@ -659,4 +707,7 @@
 	standard_maps_loaded = 1;
 	DviRegisterMap (&ISO8859_1_map);
 	DviRegisterMap (&Adobe_Symbol_map);
+#ifdef ENABLE_MULTIBYTE
+	DviRegisterMap (&JISX0208_1983_0_map);
+#endif
 }
--- groff-1.18.1.orig/src/xditview/DviChar.h
+++ groff-1.18.1/src/xditview/DviChar.h
@@ -10,6 +10,8 @@
  * CharSetRegistry from the CharSetEncoding
  */
 
+#include "config.h"
+
 # define DVI_MAX_SYNONYMS	10
 # define DVI_MAP_SIZE		256
 # define DVI_HASH_SIZE		256
@@ -23,6 +25,10 @@
 typedef struct _dviCharNameMap {
     char		*encoding;
     int			special;
+#ifdef ENABLE_MULTIBYTE
+    void (*char2XChar2b)(/* int c, XChar2b *xc */);
+    int (*char_index)(/* struct _dviCharNameMap *map, char *name */);
+#endif
     char		*dvi_names[DVI_MAP_SIZE][DVI_MAX_SYNONYMS];
     DviCharNameHash	*buckets[DVI_HASH_SIZE];
 } DviCharNameMap;
--- groff-1.18.1.orig/src/xditview/DviP.h
+++ groff-1.18.1/src/xditview/DviP.h
@@ -8,6 +8,7 @@
 
 #ifndef _XtDviP_h
 #define _XtDviP_h
+#include "config.h"
 
 #include "Dvi.h"
 #include "DviChar.h"
@@ -89,9 +90,17 @@
 #define DVI_CHAR_CACHE_SIZE	1024
 
 typedef struct _dviCharCache {
+#ifdef ENABLE_MULTIBYTE
+	XTextItem16	cache[DVI_TEXT_CACHE_SIZE];
+#else
 	XTextItem	cache[DVI_TEXT_CACHE_SIZE];
+#endif
 	char		adjustable[DVI_TEXT_CACHE_SIZE];
+#ifdef ENABLE_MULTIBYTE
+	XChar2b		char_cache[DVI_CHAR_CACHE_SIZE];
+#else
 	char		char_cache[DVI_CHAR_CACHE_SIZE];
+#endif
 	int		index;
 	int		max;
 	int		char_index;
@@ -182,6 +191,7 @@
 	int		word_flag;
 } DviPart;
 
+extern int DviGetAndPut();
 #define DviGetIn(dw,cp)\
     (dw->dvi.tmpFile ? (\
 	DviGetAndPut (dw, cp) \
@@ -228,6 +238,11 @@
 extern DeviceFont	*QueryDeviceFont ();
 
 extern char *GetWord(), *GetLine();
+
+#ifdef ENABLE_MULTIBYTE
+extern void DviInitLocale();
+extern int DviGEtCharacter();
+#endif
 #endif /* _XtDviP_h */
 
 
--- groff-1.18.1.orig/src/xditview/GXditview-ad.h
+++ groff-1.18.1/src/xditview/GXditview-ad.h
@@ -50,3 +50,24 @@
 "GXditview.promptShell.promptDialog.cancel.label: Cancel",
 "GXditview.promptShell.promptDialog.cancel.translations: #override \
 	<BtnUp>:	Cancel() unset()",
+"GXditview*fontMap: \
+TR	-adobe-times-medium-r-normal--*-100-*-*-*-*-iso8859-1\\n\
+TI	-adobe-times-medium-i-normal--*-100-*-*-*-*-iso8859-1\\n\
+TB	-adobe-times-bold-r-normal--*-100-*-*-*-*-iso8859-1\\n\
+TBI	-adobe-times-bold-i-normal--*-100-*-*-*-*-iso8859-1\\n\
+CR	-adobe-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1\\n\
+CI	-adobe-courier-medium-o-normal--*-100-*-*-*-*-iso8859-1\\n\
+CB	-adobe-courier-bold-r-normal--*-100-*-*-*-*-iso8859-1\\n\
+CBI	-adobe-courier-bold-o-normal--*-100-*-*-*-*-iso8859-1\\n\
+HR	-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1\\n\
+HI	-adobe-helvetica-medium-o-normal--*-100-*-*-*-*-iso8859-1\\n\
+HB	-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1\\n\
+HBI	-adobe-helvetica-bold-o-normal--*-100-*-*-*-*-iso8859-1\\n\
+NR	-adobe-new century schoolbook-medium-r-normal--*-100-*-*-*-*-iso8859-1\\n\
+NI	-adobe-new century schoolbook-medium-i-normal--*-100-*-*-*-*-iso8859-1\\n\
+NB	-adobe-new century schoolbook-bold-r-normal--*-100-*-*-*-*-iso8859-1\\n\
+NBI	-adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\\n\
+S	-adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\\n\
+SS	-adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\\n\
+M	-misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0\\n\
+G	-misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0",
--- groff-1.18.1.orig/src/xditview/GXditview.ad
+++ groff-1.18.1/src/xditview/GXditview.ad
@@ -55,3 +55,25 @@
 GXditview.promptShell.promptDialog.cancel.label: Cancel
 GXditview.promptShell.promptDialog.cancel.translations: #override \
 	<BtnUp>:	Cancel() unset()
+
+GXditview*fontMap: \
+TR	-adobe-times-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
+TI	-adobe-times-medium-i-normal--*-100-*-*-*-*-iso8859-1\n\
+TB	-adobe-times-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
+TBI	-adobe-times-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\
+CR	-adobe-courier-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
+CI	-adobe-courier-medium-o-normal--*-100-*-*-*-*-iso8859-1\n\
+CB	-adobe-courier-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
+CBI	-adobe-courier-bold-o-normal--*-100-*-*-*-*-iso8859-1\n\
+HR	-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
+HI	-adobe-helvetica-medium-o-normal--*-100-*-*-*-*-iso8859-1\n\
+HB	-adobe-helvetica-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
+HBI	-adobe-helvetica-bold-o-normal--*-100-*-*-*-*-iso8859-1\n\
+NR	-adobe-new century schoolbook-medium-r-normal--*-100-*-*-*-*-iso8859-1\n\
+NI	-adobe-new century schoolbook-medium-i-normal--*-100-*-*-*-*-iso8859-1\n\
+NB	-adobe-new century schoolbook-bold-r-normal--*-100-*-*-*-*-iso8859-1\n\
+NBI	-adobe-new century schoolbook-bold-i-normal--*-100-*-*-*-*-iso8859-1\n\
+S	-adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
+SS	-adobe-symbol-medium-r-normal--*-100-*-*-*-*-adobe-fontspecific\n\
+M	-misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0\n\
+G	-misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0
--- groff-1.18.1.orig/src/xditview/XFontName.c
+++ groff-1.18.1/src/xditview/XFontName.c
@@ -225,6 +225,7 @@
 	return True;
 }
 
+Bool
 XCopyFontName (name1, name2, fontNameAttributes)
 	XFontName	*name1, *name2;
 	unsigned int	fontNameAttributes;
--- groff-1.18.1.orig/src/xditview/device.c
+++ groff-1.18.1/src/xditview/device.c
@@ -2,10 +2,12 @@
 
 #include <stdio.h>
 #include <ctype.h>
+#include <stdlib.h>
 
 #include <X11/Xos.h>
 #include <X11/Intrinsic.h>
 
+#include "config.h"
 #include "device.h"
 
 #ifndef FONTPATH
@@ -48,6 +50,9 @@
     Device *dev;
     struct charinfo *char_table[CHAR_TABLE_SIZE];
     struct charinfo *code_table[256];
+#ifdef ENABLE_MULTIBYTE
+    struct charrange *range;
+#endif
 };
 
 struct charinfo {
@@ -71,6 +76,15 @@
 static struct charinfo *add_char();
 static int read_charset_section();
 static char *canonicalize_name();
+#ifdef ENABLE_MULTIBYTE
+struct charrange {
+	struct charrange *next;
+	int width;
+	int start_code;
+	int end_code;
+};
+static void add_charrange();
+#endif
 
 static
 Device *new_device(name)
@@ -256,6 +270,9 @@
 	f->char_table[i] = 0;
     for (i = 0; i < 256; i++)
 	f->code_table[i] = 0;
+#ifdef ENABLE_MULTIBYTE
+    f->range = 0;
+#endif
     return f;
 }
 
@@ -267,6 +284,15 @@
 
     if (!f)
 	return;
+#ifdef ENABLE_MULTIBYTE
+    {
+	struct charrange *cp, *cp2;
+	for (cp = f->range; cp != NULL; cp = cp2) {
+		cp2 = cp->next;
+		XtFree((char *)cp);
+	}
+    }
+#endif
     XtFree(f->name);
     for (i = 0; i < CHAR_TABLE_SIZE; i++) {
 	struct charinfo *ptr = f->char_table[i];
@@ -342,6 +368,20 @@
 {
     struct charinfo *p;
 
+#ifdef ENABLE_MULTIBYTE
+    int wc;
+    extern DviWCharP();
+    if (DviWCharP(name, &wc)) {
+	    struct charrange *rp;
+	    for (rp = f->range; rp != NULL; rp = rp->next) {
+		    if (rp->start_code <= wc && wc <= rp->end_code) {
+			    *widthp = scale_round(rp->width, ps, 
+						  f->dev->unitwidth);
+			    return 1;
+		    }
+	    }
+    }
+#endif
     name = canonicalize_name(name);
     for (p = f->char_table[hash_name(name) % CHAR_TABLE_SIZE];; p = p->next) {
 	if (!p)
@@ -424,6 +464,22 @@
     return ci;
 }
 
+#ifdef ENABLE_MULTIBYTE
+static void
+add_charrange(f, width, start_code, end_code)
+    DeviceFont *f;
+    int width, start_code, end_code;
+{
+	struct charrange *ci;
+	ci = (struct charrange *)XtMalloc(sizeof(struct charrange));
+	ci->start_code = start_code;
+	ci->end_code = end_code;
+	ci->width = width;
+	ci->next = f->range;
+	f->range = ci;
+}
+#endif
+
 /* Return non-zero for success. */
 
 static
@@ -439,11 +495,31 @@
 	int width;
 	int code;
 	char *p;
+#ifdef ENABLE_MULTIBYTE
+	int scode, ecode;
+#endif
 
 	current_lineno++;
 	name = strtok(buf, WS);
 	if (!name)
 	    continue;		/* ignore blank lines */
+#ifdef ENABLE_MULTIBYTE
+	if (sscanf(name, "u%X..u%X", &scode, &ecode) == 2) {
+		p = strtok((char *)0, WS);
+		if (!p)
+			break;
+		if (sscanf(p, "%d", &width) != 1) {
+			error("bad width field");
+			return 0;
+		}
+		p = strtok((char *)0, WS);
+		if (!p) {
+			error("missing type field");
+			return 0;
+		}
+		add_charrange(f, width, scode, ecode); 
+	} else {
+#endif
 	p = strtok((char *)0, WS);
 	if (!p)			/* end of charset section */
 	    break;
@@ -479,6 +555,9 @@
 	    }
 	    last_charinfo = add_char(f, name, width, code);
 	}
+#ifdef ENABLE_MULTIBYTE
+	}
+#endif
     }
     return 1;
 }
@@ -559,7 +638,7 @@
 FILE *open_device_file(device_name, file_name, result)
      char *device_name, *file_name, **result;
 {
-  char *buf, *path;
+  char *buf;
   FILE *fp;
 
   buf = XtMalloc(3 + strlen(device_name) + 1 + strlen(file_name) + 1);
--- groff-1.18.1.orig/src/xditview/draw.c
+++ groff-1.18.1/src/xditview/draw.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <math.h>
+#include "config.h"
 
 /* math.h on a Sequent doesn't define M_PI, apparently */
 #ifndef M_PI
@@ -17,6 +18,7 @@
 #endif
 
 #include "DviP.h"
+#include "encoding.h" /* XXX */
 
 #define DeviceToX(dw, n) ((int)((n) * (dw)->dvi.scale_factor + .5))
 #define XPos(dw) (DeviceToX((dw), (dw)->dvi.state->x - \
@@ -25,6 +27,10 @@
 
 static int FakeCharacter();
 
+/* font.c */
+extern int MaxFontPosition();
+
+void
 HorizontalMove(dw, delta)
 	DviWidget	dw;
 	int		delta;
@@ -32,6 +38,7 @@
 	dw->dvi.state->x += delta;
 }
 
+void
 HorizontalGoto(dw, NewPosition)
 	DviWidget	dw;
 	int		NewPosition;
@@ -39,6 +46,7 @@
 	dw->dvi.state->x = NewPosition;
 }
 
+void
 VerticalMove(dw, delta)
 	DviWidget	dw;
 	int		delta;
@@ -46,6 +54,7 @@
 	dw->dvi.state->y += delta;
 }
 
+void
 VerticalGoto(dw, NewPosition)
 	DviWidget	dw;
 	int		NewPosition;
@@ -53,6 +62,7 @@
 	dw->dvi.state->y = NewPosition;
 }
 
+void
 AdjustCacheDeltas (dw)
 	DviWidget	dw;
 {
@@ -94,14 +104,21 @@
 		}
 }
 
+void
 FlushCharCache (dw)
 	DviWidget	dw;
 {
 	if (dw->dvi.cache.char_index != 0) {
 		AdjustCacheDeltas (dw);
+#ifdef ENABLE_MULTIBYTE
+		XDrawText16 (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
+			   dw->dvi.cache.start_x, dw->dvi.cache.start_y,
+			   dw->dvi.cache.cache, dw->dvi.cache.index + 1);
+#else
 		XDrawText (XtDisplay (dw), XtWindow (dw), dw->dvi.normal_GC,
 			   dw->dvi.cache.start_x, dw->dvi.cache.start_y,
 			   dw->dvi.cache.cache, dw->dvi.cache.index + 1);
+#endif
 	}	
 	dw->dvi.cache.index = 0;
 	dw->dvi.cache.max = DVI_TEXT_CACHE_SIZE;
@@ -115,6 +132,7 @@
 	dw->dvi.cache.start_y = dw->dvi.cache.y = YPos (dw);
 }
 
+void
 Newline (dw)
 	DviWidget	dw;
 {
@@ -123,6 +141,7 @@
 	dw->dvi.word_flag = 0;
 }
 
+void
 Word (dw)
 	DviWidget	dw;
 {
@@ -135,7 +154,6 @@
     :\
 	(fi)->max_bounds.width\
 )
- 
 
 static
 int charExists (fi, c)
@@ -152,14 +170,25 @@
 		|| p->ascent != 0 || p->descent != 0 || p->attributes != 0);
 }
 
-static
+static void
+#ifdef ENABLE_MULTIBYTE
+DoCharacter (dw, c, wid, char2xchar2b)
+#else
 DoCharacter (dw, c, wid)
+#endif
 	DviWidget dw;
 	int c;
 	int wid;    /* width in device units */
+#ifdef ENABLE_MULTIBYTE
+	void (*char2xchar2b)();
+#endif
 {
 	register XFontStruct	*font;
+#ifdef ENABLE_MULTIBYTE
+	register XTextItem16	*text;
+#else
 	register XTextItem	*text;
+#endif
 	int	x, y;
 	
 	x = XPos(dw);
@@ -225,9 +254,25 @@
 			text->font = None;
 		dw->dvi.cache.x += text->delta;
 	}
+#ifdef ENABLE_MULTIBYTE
+	if (charExists(font, c) || char2xchar2b) {
+#else
 	if (charExists(font, c)) {
+#endif
 		int w;
+#ifdef ENABLE_MULTIBYTE
+		if (char2xchar2b) {
+		    (*char2xchar2b)(c,
+				    &dw->dvi.cache.char_cache[dw->dvi.cache.char_index++]);
+		} else {
+			dw->dvi.cache.char_cache[dw->dvi.cache.char_index].
+				byte1 =	(unsigned char)'\0';
+			dw->dvi.cache.char_cache[dw->dvi.cache.char_index++].
+				byte2 =	(unsigned char)c;
+		}
+#else
 		dw->dvi.cache.char_cache[dw->dvi.cache.char_index++] = (char) c;
+#endif
 		++text->nchars;
 		w = charWidth(font, c);
 		dw->dvi.cache.x += w;
@@ -291,7 +336,11 @@
 	if (map)
 		c = DviCharIndex (map, buf);
 	if (c >= 0)
+#ifdef ENABLE_MULTIBYTE
+		DoCharacter (dw, c, wid, map->char2XChar2b);
+#else
 		DoCharacter (dw, c, wid);
+#endif
 	else
 		(void) FakeCharacter (dw, buf, wid);
 	dw->dvi.state->font_number = prevFont;
@@ -345,6 +394,7 @@
 	return 1;
 }
 
+void
 PutNumberedCharacter (dw, c)
 	DviWidget dw;
 	int c;
@@ -387,13 +437,14 @@
 	}
 }
 
+void
 ClearPage (dw)
 	DviWidget	dw;
 {
 	XClearWindow (XtDisplay (dw), XtWindow (dw));
 }
 
-static
+static void
 setGC (dw)
 	DviWidget	dw;
 {
@@ -417,7 +468,7 @@
 	}
 }
 
-static
+static void
 setFillGC (dw)
 	DviWidget	dw;
 {
@@ -444,6 +495,7 @@
 	}
 }
 
+void
 DrawLine (dw, x, y)
 	DviWidget	dw;
 	int		x, y;
@@ -459,6 +511,7 @@
 		   xp + DeviceToX (dw, x), yp + DeviceToX (dw, y));
 }
 
+void
 DrawCircle (dw, diam)
 	DviWidget	dw;
 	int		diam;
@@ -473,6 +526,7 @@
 		  d, d, 0, 64*360);
 }
 
+void
 DrawFilledCircle (dw, diam)
 	DviWidget	dw;
 	int		diam;
@@ -490,6 +544,7 @@
 		  d, d, 0, 64*360);
 }
 
+void
 DrawEllipse (dw, a, b)
 	DviWidget	dw;
 	int		a, b;
@@ -501,6 +556,7 @@
 		  DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360);
 }
 
+void
 DrawFilledEllipse (dw, a, b)
 	DviWidget	dw;
 	int		a, b;
@@ -515,6 +571,7 @@
 		  DeviceToX (dw, a), DeviceToX (dw, b), 0, 64*360);
 }
 
+void
 DrawArc (dw, x0, y0, x1, y1)
 	DviWidget	dw;
 	int		x0, y0, x1, y1;
@@ -541,6 +598,7 @@
 		  rad*2, rad*2, angle1, angle2);
 }
 
+void
 DrawPolygon (dw, v, n)
 	DviWidget	dw;
 	int		*v;
@@ -572,7 +630,7 @@
 	XtFree((char *)p);
 }
 
-
+void
 DrawFilledPolygon (dw, v, n)
 	DviWidget	dw;
 	int		*v;
@@ -608,7 +666,7 @@
 
 #define POINTS_MAX 10000
 
-static
+static void
 appendPoint(points, pointi, x, y)
 	XPoint	*points;
 	int	*pointi;
@@ -623,7 +681,7 @@
 
 #define FLATNESS 1
 
-static
+static void
 flattenCurve(points, pointi, x2, y2, x3, y3, x4, y4)
 	XPoint	*points;
 	int	*pointi;
@@ -659,7 +717,7 @@
 	}
 }
 
-
+void
 DrawSpline (dw, v, n)
 	DviWidget	dw;
 	int		*v;
--- groff-1.18.1.orig/src/xditview/font.c
+++ groff-1.18.1/src/xditview/font.c
@@ -9,10 +9,16 @@
 #include <X11/StringDefs.h>
 #include <stdio.h>
 #include <ctype.h>
+#include <stdlib.h>
 #include "DviP.h"
 #include "XFontName.h"
 
-static DisposeFontSizes();
+static void DisposeFontSizes();
+void DestroyFontMap();
+
+/* XFontName.c */
+extern Bool XParseFontName();
+extern Bool XFormatFontName();
 
 static char *
 savestr (s)
@@ -115,7 +121,7 @@
 # define SizePosition		8
 # define EncodingPosition	13
 
-static
+static int
 ConvertFontNameToSize (n)
 	char	*n;
 {
@@ -191,7 +197,7 @@
 	return sizes;
 }
 
-static
+static void
 DisposeFontSizes (dw, fs)
 	DviWidget	dw;
 	DviFontSizeList	*fs;
@@ -263,6 +269,7 @@
 	return f;
 }
 
+void
 ForgetFonts (dw)
 	DviWidget dw;
 {
@@ -322,6 +329,7 @@
 }
 #endif
 
+void
 ParseFontMap (dw)
 	DviWidget	dw;
 {
@@ -357,6 +365,7 @@
 	dw->dvi.font_map = fm;
 }
 
+void
 DestroyFontMap (font_map)
 	DviFontMap	*font_map;
 {
@@ -374,6 +383,7 @@
 
 /* ARGSUSED */
 
+void
 SetFontPosition (dw, position, dvi_name, extra)
 	DviWidget	dw;
 	int		position;
--- groff-1.18.1.orig/src/xditview/lex.c
+++ groff-1.18.1/src/xditview/lex.c
@@ -2,8 +2,10 @@
 #include <X11/IntrinsicP.h>
 #include <X11/StringDefs.h>
 #include <stdio.h>
+#include "config.h"
 #include "DviP.h"
 
+int
 DviGetAndPut(dw, cp)
     DviWidget	dw;
     int		*cp;
@@ -67,6 +69,7 @@
 	return Buffer;
 } 
 
+int
 GetNumber(dw)
 	DviWidget	dw;
 {
@@ -90,6 +93,98 @@
 		DviUngetC(dw, c);
 	return i;
 }
+
+#ifdef ENABLE_MULTIBYTE
+#include <locale.h>
+#include <langinfo.h>
+#include <iconv.h>
+#include <errno.h>
+
+static iconv_t icd;
+void
+DviInitLocale()
+{
+	char *enc;
+	setlocale(LC_ALL, "");
+	enc = nl_langinfo(CODESET);
+	icd = iconv_open("UCS-2BE", enc);
+}
+
+int
+DviGetCharacter(dw, cp)
+	DviWidget	dw;
+	char   *cp;
+{
+	char inbuf[8];
+	char outbuf[8];
+	char *inp, *outp;
+	size_t inbytesleft, outbytesleft = 8;
+	int i = 0;
+	int j;
+	int wc = 0;
+	int c;
+	size_t r;
+
+	while (wc == 0) {
+		DviGetC(dw, &c);
+		if (c == EOF)
+			return EOF;
+		inbuf[i++] = c;
+		inbytesleft = i;
+		outbytesleft = BUFSIZ;
+		inp = inbuf;
+		outp = outbuf;
+		r = iconv(icd, &inp, &inbytesleft, &outp, &outbytesleft);
+		if (r == (size_t)-1) {
+			if (errno == EILSEQ) {
+				/* illegal sequence */
+			} else if (errno == EINVAL) {
+				/* incomplete sequence */
+				continue;
+			} else if (errno == E2BIG) {
+				/* no room to output? */
+				
+			}
+			DviUngetC(dw, c);
+		}
+		/* ok - pass inbuf to cp */
+		for (j = 0; j < i; j++) {
+			cp[j] = inbuf[j];
+		}
+		cp[j] = '\0';
+		return i;
+	}
+	/* NOT REACHED */
+}
+
+int
+DviWCharP(char *name, int *wc)
+{
+	char outbuf[BUFSIZ];
+	char *inp, *outp;
+	int inbytesleft, outbytesleft;
+	size_t r;
+	*wc = 0;
+	inp = name;
+	inbytesleft = strlen(name);
+	outp = outbuf;
+	outbytesleft = sizeof(outbuf)-1;
+	r = iconv(icd, &inp, &inbytesleft, &outp, &outbytesleft);
+	if (r < 0) {
+		return 0;
+	}
+	/* UCS-2 check */
+	if (outbuf + 2 != outp) {
+		return 0;
+	}
+	for (inp = outbuf; inp < outp; inp++) {
+		*wc <<= 8;
+		*wc |= (*inp) & 0x0ff;
+	}
+	return 1;
+}
+
+#endif
 	
 /*
 Local Variables:
--- groff-1.18.1.orig/src/xditview/page.c
+++ groff-1.18.1/src/xditview/page.c
@@ -28,6 +28,7 @@
 	return m;
 }
 
+void
 DestroyFileMap (m)
 	DviFileMap	*m;
 {
@@ -39,6 +40,7 @@
 	}
 }
 
+void
 ForgetPagePositions (dw)
 	DviWidget	dw;
 {
@@ -46,6 +48,7 @@
 	dw->dvi.file_map = 0;
 }
 
+void
 RememberPagePosition(dw, number)
 	DviWidget	dw;
 	int		number;
@@ -64,6 +67,7 @@
 		m->position = ftell (dw->dvi.file);
 }
 
+int
 SearchPagePosition (dw, number)
 	DviWidget	dw;
 	int		number;
@@ -75,6 +79,7 @@
 	return m->position;
 }
 
+void
 FileSeek(dw, position)
 DviWidget	dw;
 long		position;
--- groff-1.18.1.orig/src/xditview/parse.c
+++ groff-1.18.1/src/xditview/parse.c
@@ -9,15 +9,49 @@
 #include <X11/StringDefs.h>
 #include <stdio.h>
 #include <ctype.h>
+#include "config.h"
 #include "DviP.h"
+#include "encoding.h"
 
 static int StopSeen = 0;
-static ParseDrawFunction(), ParseDeviceControl();
-static push_env(), pop_env();
+static void ParseDrawFunction(), ParseDeviceControl();
+static void push_env(), pop_env();
+
+/* draw.c */
+extern int PutCharacter();
+extern int PutNumberedCharacter();
+extern void HorizontalGoto();
+extern void Word();
+extern void VerticalGoto();
+extern void VerticalMove();
+extern void FlushCharCache();
+extern void Newline();
+extern void DrawLine();
+extern void DrawCircle();
+extern void DrawFilledCircle();
+extern void DrawEllipse();
+extern void DrawFilledEllipse();
+extern void DrawArc();
+extern void DrawPolygon();
+extern void DrawFilledPolygon();
+extern void DrawSpline();
+
+/* Dvi.c */
+extern void SetDevice();
+
+/* page.c */
+extern void RememberPagePosition();
+
+/* font.c */
+extern void SetFontPosition();
+
+/* lex.c */
+extern int GetNumber();
 
 #define HorizontalMove(dw, delta)	((dw)->dvi.state->x += (delta))
 
 
+int
 ParseInput(dw)
     register DviWidget	dw;
 {
@@ -57,11 +91,17 @@
 					   DviGetC(dw,&otherc)-'0');
 			/* fall through */
 		case 'c':	/* single ascii character */
+#ifdef ENABLE_MULTIBYTE
+			DviGetCharacter(dw, Buffer);
+			if (Buffer[0] == ' ')
+			    break;
+#else
 			DviGetC(dw,&c);
 		    	if (c == ' ')
 			    break;
 			Buffer[0] = c;
 			Buffer[1] = '\0';
+#endif
 			(void) PutCharacter (dw, Buffer);
 			break;
 		case 'C':
@@ -69,10 +109,15 @@
 			(void) PutCharacter (dw, Buffer);
 			break;
 		case 't':
+#ifdef ENABLE_MULTIBYTE
+			while (DviGetCharacter(dw, Buffer) != EOF
+			       && Buffer[0] != ' ' && Buffer[0] != '\n') {
+#else
 			Buffer[1] = '\0';
 			while (DviGetC (dw, &c) != EOF
 			       && c != ' ' && c != '\n') {
 				Buffer[0] = c;
+#endif
 				HorizontalMove (dw, PutCharacter (dw, Buffer));
 			}
 			break;
@@ -158,7 +203,7 @@
 	}
 }
 
-static
+static void
 push_env(dw)
 	DviWidget	dw;
 {
@@ -177,7 +222,7 @@
 	dw->dvi.state = new;
 }
 
-static
+static void
 pop_env(dw)
 	DviWidget	dw;
 {
@@ -188,7 +233,7 @@
 	XtFree ((char *) old);
 }
 
-static
+static void
 InitTypesetter (dw)
 	DviWidget	dw;
 {
@@ -200,7 +245,7 @@
 
 #define DRAW_ARGS_MAX 128
 
-static
+static void
 ParseDrawFunction(dw, buf)
 DviWidget	dw;
 char		*buf;
@@ -284,13 +329,12 @@
 	}
 } 
 
-static
+static void
 ParseDeviceControl(dw)				/* Parse the x commands */
 	DviWidget	dw;
 {
         char str[20], str1[50];
 	int c, n;
-	extern int LastPage, CurrentPage;
 
 	GetWord (dw, str, 20);
 	switch (str[0]) {			/* crude for now */
--- groff-1.18.1.orig/src/xditview/xditview.c
+++ groff-1.18.1/src/xditview/xditview.c
@@ -46,6 +46,7 @@
 #include <X11/Xaw/SimpleMenu.h>
 #include <X11/Xaw/SmeBSB.h>
 
+#include <stdlib.h>
 #include <signal.h>
 
 #include "Dvi.h"
@@ -101,7 +102,7 @@
  * Report the syntax for calling xditview.
  */
 
-static
+static void
 Syntax(call)
 	char *call;
 {
@@ -126,12 +127,12 @@
     char    *name;
     void    (*function)();
 } menuEntries[] = {
-    "nextPage",	    NextPage,
-    "previousPage", PreviousPage,
-    "selectPage",   SelectPage,
-    "print",	    Print,
-    "openFile",	    OpenFile,
-    "quit",	    Quit,
+    {"nextPage",    NextPage},
+    {"previousPage",PreviousPage},
+    {"selectPage",  SelectPage},
+    {"print",	    Print},
+    {"openFile",    OpenFile},
+    {"quit",	    Quit},
 };
 
 static void	NextPageAction(), PreviousPageAction(), SelectPageAction();
@@ -139,17 +140,18 @@
 static void	AcceptAction(), CancelAction();
 static void	PrintAction();
 static void	RerasterizeAction();
+static void     MakePrompt();
 
 XtActionsRec xditview_actions[] = {
-    "NextPage",	    NextPageAction,
-    "PreviousPage", PreviousPageAction,
-    "SelectPage",   SelectPageAction,
-    "Print",	    PrintAction,
-    "OpenFile",	    OpenFileAction,
-    "Rerasterize",  RerasterizeAction,
-    "Quit",	    QuitAction,
-    "Accept",	    AcceptAction,
-    "Cancel",	    CancelAction,
+    {"NextPage",     NextPageAction},
+    {"PreviousPage", PreviousPageAction},
+    {"SelectPage",   SelectPageAction},
+    {"Print",	     PrintAction},
+    {"OpenFile",     OpenFileAction},
+    {"Rerasterize",  RerasterizeAction},
+    {"Quit",	     QuitAction},
+    {"Accept",	     AcceptAction},
+    {"Cancel",	     CancelAction},
 };
 
 #define MenuNextPage		0
@@ -318,6 +320,7 @@
 
 static char fileBuf[1024];
 
+static void
 ResetMenuEntry (entry)
     Widget  entry;
 {
@@ -516,6 +519,7 @@
     CancelAction (widget, event, params, num_params);
 }
 
+static void
 MakePrompt(centerw, prompt, func, def)
 Widget	centerw;
 char *prompt;
--- groff-1.18.1.orig/src/xditview/xtotroff.c
+++ groff-1.18.1/src/xditview/xtotroff.c
@@ -2,6 +2,7 @@
  * xtotroff
  *
  * convert X font metrics into troff font metrics
+ * XXX: ENABLE_MULTIBYTE may not work yet
  */
 
 #include	<X11/Xlib.h>
@@ -10,6 +11,7 @@
 #include	<unistd.h>
 #include	<stdlib.h>
 #include	<fcntl.h>
+#include	"config.h"
 #include	"XFontName.h"
 #include	"DviChar.h"
 
@@ -171,6 +173,47 @@
 			fprintf (out, "spacewidth %d\n", w);
 	}
 	fprintf (out, "charset\n");
+#if 0 /* def	ENABLE_MULTIBYTE */
+	if (fi->min_byte1 != 0 || fi->max_byte1 != 0) {
+		/*
+		 * 2 byte code font.
+		 */
+		int N;
+		int D = fi->max_char_or_byte2 -	fi->min_char_or_byte2 + 1;
+		int max = (fi->max_byte1 - fi->min_byte1 + 1) *
+			(fi->max_char_or_byte2 - fi->min_char_or_byte2 + 1);
+		unsigned byte1;
+		unsigned byte2;
+		unsigned int euc_code;
+
+		for (N = 0; N < max; N++) {
+			byte1 = N / D + fi->min_byte1;
+			byte2 = N % D + fi->min_char_or_byte2;
+			euc_code = ((byte1 << 8) | byte2) & 0xffff | 0x8080;
+			wid = fi->max_bounds.width;
+			fputc(byte1 & 0xff | 0x80, out);/* output EUC code */
+			fputc(byte2 & 0xff | 0x80, out);/* output EUC code */
+			fprintf (out, "\t%d", wid);
+			if (groff_flag) {
+				int	param[5];
+				param[0] = fi->max_bounds.ascent;
+				param[1] = fi->max_bounds.descent;
+				param[2] = 0 /* charRBearing (fi, c) - wid */;
+				param[3] = 0 /* charLBearing (fi, c) */;
+				param[4] = 0; /* XXX */
+				for (j = 0; j < 5; j++)
+					if (param[j] < 0)
+						param[j] = 0;
+				for (j = 4; j >= 0; j--)
+					if (param[j] != 0)
+						break;
+				for (k = 0; k <= j; k++)
+					fprintf (out, ",%d", param[k]);
+			}
+			fprintf (out, "\t0\t%#x\n", euc_code);
+		}
+	} else
+#endif /* ENABLE_MULTIBYTE */
 	for (c = fi->min_char_or_byte2; c <= fi->max_char_or_byte2; c++) {
 		char *name = DviCharName (char_map,c,0);
 		if (charExists (fi, c) && (groff_flag || name)) {
--- groff-1.18.1.orig/src/xditview/FontMap.jisx0208
+++ groff-1.18.1/src/xditview/FontMap.jisx0208
@@ -0,0 +1,2 @@
+M	-misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0
+G	-misc-fixed-medium-r-normal--*-100-*-*-*-*-jisx0208.1983-0
--- groff-1.18.1.orig/src/xditview/encoding.h
+++ groff-1.18.1/src/xditview/encoding.h
@@ -0,0 +1,31 @@
+// -*- C++ -*-
+/* Copyright (c) 2001 Fumitoshi UKAI <ukai@debian.or.jp>
+
+This file is part of groff.
+
+groff is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+
+#ifndef ENCODING_H
+#define ENCODING_H
+
+#include "config.h"
+
+#ifdef ENABLE_MULTIBYTE
+typedef unsigned int wchar;
+#else
+typedef char wchar;
+#endif
+
+#endif
--- groff-1.18.1.orig/src/xditview/config.h
+++ groff-1.18.1/src/xditview/config.h
@@ -0,0 +1,4 @@
+#ifndef _config_h
+#include "../include/config.h"
+#define _config_h
+#endif
--- groff-1.18.1.orig/font/devps/DESC.in
+++ groff-1.18.1/font/devps/DESC.in
@@ -1,11 +1,33 @@
 res 72000
 hor 1
 vert 1
+lowerwchar 300
+wcharkern 400
 sizescale 1000
 unitwidth 1000
 sizes 1000-10000000 0
 styles R I B BI
 family T
-fonts 9 0 0 0 0 0 SS S ZD ZDR
+fonts 11 0 0 0 0 0 SS S ZD ZDR M G
+fontset B G 2E00..9FFF
+fontset AB G 2E00..9FFF
+fontset BMB G 2E00..9FFF
+fontset CB G 2E00..9FFF
+fontset HB G 2E00..9FFF
+fontset HNB G 2E00..9FFF
+fontset NB G 2E00..9FFF
+fontset PB G 2E00..9FFF
+fontset TB G 2E00..9FFF
+fontset - M 2E00..9FFF
+fontset B G FF00..FFEF
+fontset AB G FF00..FFEF
+fontset BMB G FF00..FFEF
+fontset CB G FF00..FFEF
+fontset HB G FF00..FFEF
+fontset HNB G FF00..FFEF
+fontset NB G FF00..FFEF
+fontset PB G FF00..FFEF
+fontset TB G FF00..FFEF
+fontset - M FF00..FFEF
 tcommand
 postpro grops
--- groff-1.18.1.orig/font/devps/Makefile.sub
+++ groff-1.18.1/font/devps/Makefile.sub
@@ -2,23 +2,23 @@
 DISTFILES=text.enc download \
   S ZD ZDR SS AB ABI AI AR BMB BMBI BMI BMR \
   CB CBI CI CR HB HBI HI HR HNB HNBI HNI HNR \
-  NB NBI NI NR PB PBI PI PR TB TBI TI TR ZCMI
+  NB NBI NI NR PB PBI PI PR TB TBI TI TR ZCMI M G
 PSFILES=prologue symbolsl.pfa zapfdr.pfa
 DEVGENFILES=generate/Makefile generate/afmname generate/dingbats.map \
   generate/dingbats.rmap generate/lgreekmap generate/symbol.sed \
   generate/symbolchars generate/symbolsl.afm generate/textmap
 DEVFILES=DESC $(PSFILES) $(DISTFILES) $(DEVGENFILES)
 
-CLEANADD=DESC $(PSFILES)
+CLEANADD=DESC $(PSFILES) M G
 
 DESC: DESC.in
 	-rm -f DESC
 	cat $(srcdir)/DESC.in >DESC
 	echo broken $(BROKEN_SPOOLER_FLAGS) >>DESC
 	if test "$(PAGE)" = A4; then \
-	  echo "papersize a4" >>DESC; \
+	  echo "papersize /etc/papersize a4" >>DESC; \
 	else \
-	  echo "papersize letter" >>DESC; \
+	  echo "papersize /etc/papersize letter" >>DESC; \
 	fi
 	test -z '$(PSPRINT)' ||	echo print '$(PSPRINT)' >>DESC
 
@@ -33,3 +33,14 @@
 $(PSFILES):
 	-rm -f $@
 	sed -f $(srcdir)/psstrip.sed $? >$@
+
+M: M.proto
+	@echo Making M
+	@-rm -f M
+	@cp M.proto M
+
+G: M
+	@echo Making G
+	@-rm -f G
+	@sed -e 's/name M/name G/' \
+	    -e 's/internalname Ryumin-Light-EUC-H/internalname GothicBBB-Medium-EUC-H/' M > G
--- groff-1.18.1.orig/font/devps/M.proto
+++ groff-1.18.1/font/devps/M.proto
@@ -0,0 +1,9 @@
+name M
+internalname Ryumin-Light-EUC-H
+spacewidth 250
+encodingname EUC-JP
+charset
+u2E00..u9FFF 1000 3
+uFF00..uFF5F 1000 3
+uFF60..uFF9F 500 3
+uFFA0..uFFEF 1000 3
--- groff-1.18.1.orig/font/devdvi/DESC.in
+++ groff-1.18.1/font/devdvi/DESC.in
@@ -6,6 +6,10 @@
 sizes 500-1000000 0
 styles R I B BI
 family T
-fonts 13 0 0 0 0 0 0 0 0 0 MI S EX CW
+fonts 15 0 0 0 0 0 0 0 0 0 MI S EX CW M G
+fontset B G 100..FFFF
+fontset HB G 100..FFFF
+fontset SB G 100..FFFF
+fontset - M 100..FFFF
 tcommand
 postpro grodvi
--- groff-1.18.1.orig/font/devdvi/Makefile.sub
+++ groff-1.18.1/font/devdvi/Makefile.sub
@@ -3,15 +3,68 @@
   TR TI TB TBI CW CWI HR HI HB HBI \
   TREC TIEC TBEC TBIEC CWEC CWIEC HREC HIEC HBEC HBIEC \
   TRTC TITC TBTC TBITC CWTC CWITC HRTC HITC HBTC HBITC \
-  MI S EX SA SB \
+  MI S EX SA SB M G \
   generate/CompileFonts generate/Makefile \
   generate/msam.map generate/msbm.map \
   generate/texb.map generate/texex.map generate/texi.map generate/texmi.map \
   generate/texr.map generate/texsy.map generate/textt.map \
   generate/ec.map generate/tc.map
 
-CLEANADD=DESC
+CLEANADD=DESC M G
 
 DESC: DESC.in
 	cat $(srcdir)/DESC.in >DESC
 	test -z '$(DVIPRINT)' || echo print '$(DVIPRINT)' >>DESC
+ 
+M: M.proto-$(DVIFORMAT)
+	@echo Making $@
+	@-rm -f $@
+	cp M.proto-$(DVIFORMAT) M
+#	@if [ x$(DVIFORMAT) = xNTT ]; then \
+#	sed -e 's/	F	/	959887,808326,151561	1	/' \
+#	    -e 's/:0$$/:dmjsy10/' \
+#	    -e 's/:1$$/:dmjroma10/' \
+#	    -e 's/:2$$/:dmjhira10/' \
+#	    -e 's/:3$$/:dmjkata10/' \
+#	    -e 's/:4$$/:dmjgreek10/' \
+#	    -e 's/:5$$/:dmjrussian10/' \
+#	    -e 's/:6$$/:dmjkeisen10/' \
+#	    -e 's/:a$$/:dmjka10/' \
+#	    -e 's/:b$$/:dmjkb10/' \
+#	    -e 's/:c$$/:dmjkc10/' \
+#	    -e 's/:d$$/:dmjkd10/' \
+#	    -e 's/:e$$/:dmjke10/' \
+#	    -e 's/:f$$/:dmjkf10/' \
+#	    -e 's/:g$$/:dmjkg10/' \
+#	    -e 's/:h$$/:dmjkh10/' \
+#	    -e 's/:i$$/:dmjki10/' \
+#	    -e 's/:j$$/:dmjkj10/' \
+#	    -e 's/:k$$/:dmjkk10/' \
+#	    -e 's/:l$$/:dmjkl10/' \
+#	    -e 's/:m$$/:dmjkm10/' \
+#	    -e 's/:n$$/:dmjkn10/' \
+#	    -e 's/:o$$/:dmjko10/' \
+#	    -e 's/:p$$/:dmjkp10/' \
+#	    -e 's/:q$$/:dmjkq10/' \
+#	    -e 's/:r$$/:dmjkr10/' \
+#	    -e 's/:s$$/:dmjks10/' \
+#	    -e 's/:t$$/:dmjkt10/' \
+#	    -e 's/:u$$/:dmjku10/' \
+#	    -e 's/:v$$/:dmjkv10/' \
+#	    -e 's/:w$$/:dmjkw10/' \
+#	    -e 's/:x$$/:dmjkx10/' \
+#	    -e 's/:y$$/:dmjky10/' \
+#	    -e 's/:z$$/:dmjkz10/' \
+#	    < M.proto-NTT > M ;\
+#	else \
+#	../devnippon/createM -jis "1006514,815360,145600" 1 < M.proto-ASCII | \
+#	    sed -f FixMetric.sed > M ;\
+#	fi
+	
+G: M
+	@echo Making $@
+	@-rm -f $@
+	@sed -e 's/name M/name G/' \
+	     -e 's/dmj/dgj/' \
+	     -e 's/internalname min10/internalname goth10/' \
+	     < M > G
--- groff-1.18.1.orig/font/devdvi/FixMetric.sed
+++ groff-1.18.1/font/devdvi/FixMetric.sed
@@ -0,0 +1,77 @@
+s/1006514,.*0x212b$/370845,815360,145600	1	0x212b/
+s/1006514,.*0x212c$/370845,815360,145600	1	0x212c/
+s/1006514,.*0x2126$/370845,815360,145600	1	0x2126/
+s/1006514,.*0x2127$/370845,815360,145600	1	0x2127/
+s/1006514,.*0x2128$/370845,815360,145600	1	0x2128/
+s/1006514,.*0x212a$/370845,815360,145600	1	0x212a/
+s/1006514,.*0x212d$/370845,815360,145600	1	0x212d/
+s/1006514,.*0x212e$/370845,815360,145600	1	0x212e/
+s/1006514,.*0x213e$/370845,815360,145600	1	0x213e/
+s/1006514,.*0x2142$/370845,815360,145600	1	0x2142/
+s/1006514,.*0x2143$/370845,815360,145600	1	0x2143/
+s/1006514,.*0x2146$/370845,815360,145600	1	0x2146/
+s/1006514,.*0x2147$/370845,815360,145600	1	0x2147/
+s/1006514,.*0x2124$/370845,815360,145600	1	0x2124/
+s/1006514,.*0x2125$/370845,815360,145600	1	0x2125/
+s/1006514,.*0x214b$/528496,815360,145600	1	0x214b/
+s/1006514,.*0x214d$/528496,815360,145600	1	0x214d/
+s/1006514,.*0x214f$/528496,815360,145600	1	0x214f/
+s/1006514,.*0x2151$/528496,815360,145600	1	0x2151/
+s/1006514,.*0x2153$/528496,815360,145600	1	0x2153/
+s/1006514,.*0x2155$/528496,815360,145600	1	0x2155/
+s/1006514,.*0x2157$/528496,815360,145600	1	0x2157/
+s/1006514,.*0x2159$/528496,815360,145600	1	0x2159/
+s/1006514,.*0x215b$/528496,815360,145600	1	0x215b/
+s/1006514,.*0x2129$/528496,815360,145600	1	0x2129/
+s/1006514,.*0x212f$/528496,815360,145600	1	0x212f/
+s/1006514,.*0x2130$/528496,815360,145600	1	0x2130/
+s/1006514,.*0x2133$/528496,815360,145600	1	0x2133/
+s/1006514,.*0x2135$/528496,815360,145600	1	0x2135/
+s/1006514,.*0x2148$/528496,815360,145600	1	0x2148/
+s/1006514,.*0x2149$/528496,815360,145600	1	0x2149/
+s/1006514,.*0x216b$/528496,815360,145600	1	0x216b/
+s/1006514,.*0x216c$/528496,815360,145600	1	0x216c/
+s/1006514,.*0x216d$/528496,815360,145600	1	0x216d/
+s/1006514,.*0x2178$/528496,815360,145600	1	0x2178/
+s/1006514,.*0x214a$/528496,815360,145600	1	0x214a/
+s/1006514,.*0x214c$/528496,815360,145600	1	0x214c/
+s/1006514,.*0x214e$/528496,815360,145600	1	0x214e/
+s/1006514,.*0x2150$/528496,815360,145600	1	0x2150/
+s/1006514,.*0x2152$/528496,815360,145600	1	0x2152/
+s/1006514,.*0x2154$/528496,815360,145600	1	0x2154/
+s/1006514,.*0x2156$/528496,815360,145600	1	0x2156/
+s/1006514,.*0x2158$/528496,815360,145600	1	0x2158/
+s/1006514,.*0x215a$/528496,815360,145600	1	0x215a/
+s/1006514,.*0x2122$/528496,815360,145600	1	0x2122/
+s/1006514,.*0x2123$/528496,815360,145600	1	0x2123/
+s/1006514,.*0x2136$/783741,815360,145600	1	0x2136/
+s/1006514,.*0x2137$/783741,815360,145600	1	0x2137/
+s/1006514,.*0x2139$/783741,815360,145600	1	0x2139/
+s/1006514,.*0x2168$/783741,815360,145600	1	0x2168/
+s/1006514,.*0x2169$/783741,815360,145600	1	0x2169/
+s/1006514,.*0x216a$/783741,815360,145600	1	0x216a/
+s/1006514,.*0x2170$/783741,815360,145600	1	0x2170/
+s/1006514,.*0x2171$/783741,815360,145600	1	0x2171/
+s/1006514,.*0x2172$/783741,815360,145600	1	0x2172/
+s/1006514,.*0x2421$/783741,815360,145600	1	0x2421/
+s/1006514,.*0x2423$/783741,815360,145600	1	0x2423/
+s/1006514,.*0x2425$/783741,815360,145600	1	0x2425/
+s/1006514,.*0x2427$/783741,815360,145600	1	0x2427/
+s/1006514,.*0x2429$/783741,815360,145600	1	0x2429/
+s/1006514,.*0x2443$/783741,815360,145600	1	0x2443/
+s/1006514,.*0x2463$/783741,815360,145600	1	0x2463/
+s/1006514,.*0x2465$/783741,815360,145600	1	0x2465/
+s/1006514,.*0x2467$/783741,815360,145600	1	0x2467/
+s/1006514,.*0x246e$/783741,815360,145600	1	0x246e/
+s/1006514,.*0x2521$/783741,815360,145600	1	0x2521/
+s/1006514,.*0x2523$/783741,815360,145600	1	0x2523/
+s/1006514,.*0x2525$/783741,815360,145600	1	0x2525/
+s/1006514,.*0x2527$/783741,815360,145600	1	0x2527/
+s/1006514,.*0x2529$/783741,815360,145600	1	0x2529/
+s/1006514,.*0x2543$/783741,815360,145600	1	0x2543/
+s/1006514,.*0x2563$/783741,815360,145600	1	0x2563/
+s/1006514,.*0x2565$/783741,815360,145600	1	0x2565/
+s/1006514,.*0x2567$/783741,815360,145600	1	0x2567/
+s/1006514,.*0x256e$/783741,815360,145600	1	0x256e/
+s/1006514,.*0x2575$/783741,815360,145600	1	0x2575/
+s/1006514,.*0x2576$/783741,815360,145600	1	0x2576/
--- groff-1.18.1.orig/font/devdvi/M.proto-ASCII
+++ groff-1.18.1/font/devdvi/M.proto-ASCII
@@ -0,0 +1,4 @@
+name M
+internalname min10
+checksum -375402250
+designsize 10485760
--- groff-1.18.1.orig/font/devdvi/M.proto-NTT
+++ groff-1.18.1/font/devdvi/M.proto-NTT
@@ -0,0 +1,6882 @@
+name M
+internalname dmj10
+checksum 0
+designsize 10485760
+charset
+ 	F	1:0
+、	F	2:0
+。	F	3:0
+,	F	4:0
+.	F	5:0
+・	F	6:0
+:	F	7:0
+;	F	8:0
+?	F	9:0
+!	F	10:0
+゛	F	11:0
+゜	F	12:0
+´	F	13:0
+`	F	14:0
+¨	F	15:0
+^	F	16:0
+ ̄	F	17:0
+_	F	18:0
+ヽ	F	19:0
+ヾ	F	20:0
+ゝ	F	21:0
+ゞ	F	22:0
+〃	F	23:0
+仝	F	24:0
+々	F	25:0
+〆	F	26:0
+〇	F	27:0
+ー	F	28:0
+―	F	29:0
+‐	F	30:0
+/	F	31:0
+\	F	32:0
+〜	F	33:0
+‖	F	34:0
+|	F	35:0
+…	F	36:0
+‥	F	37:0
+‘	F	38:0
+’	F	39:0
+“	F	40:0
+”	F	41:0
+(	F	42:0
+)	F	43:0
+〔	F	44:0
+〕	F	45:0
+[	F	46:0
+]	F	47:0
+{	F	48:0
+}	F	49:0
+〈	F	50:0
+〉	F	51:0
+《	F	52:0
+》	F	53:0
+「	F	54:0
+」	F	55:0
+『	F	56:0
+』	F	57:0
+【	F	58:0
+】	F	59:0
++	F	60:0
+−	F	61:0
+±	F	62:0
+×	F	63:0
+÷	F	64:0
+=	F	65:0
+≠	F	66:0
+<	F	67:0
+>	F	68:0
+≦	F	69:0
+≧	F	70:0
+∞	F	71:0
+∴	F	72:0
+♂	F	73:0
+♀	F	74:0
+°	F	75:0
+′	F	76:0
+″	F	77:0
+℃	F	78:0
+¥	F	79:0
+$	F	80:0
+¢	F	81:0
+£	F	82:0
+%	F	83:0
+#	F	84:0
+&	F	85:0
+*	F	86:0
+@	F	87:0
+§	F	88:0
+☆	F	89:0
+★	F	90:0
+○	F	91:0
+●	F	92:0
+◎	F	93:0
+◇	F	94:0
+◆	F	101:0
+□	F	102:0
+■	F	103:0
+△	F	104:0
+▲	F	105:0
+▽	F	106:0
+▼	F	107:0
+※	F	108:0
+〒	F	109:0
+→	F	110:0
+←	F	111:0
+↑	F	112:0
+↓	F	113:0
+〓	F	114:0
+∈	F	126:0
+∋	F	127:0
+⊆	F	128:0
+⊇	F	129:0
+⊂	F	130:0
+⊃	F	131:0
+∪	F	132:0
+∩	F	133:0
+∧	F	142:0
+∨	F	143:0
+¬	F	144:0
+⇒	F	145:0
+⇔	F	146:0
+∀	F	147:0
+∃	F	148:0
+∠	F	160:0
+⊥	F	161:0
+⌒	F	162:0
+∂	F	163:0
+∇	F	164:0
+≡	F	165:0
+≒	F	166:0
+≪	F	167:0
+≫	F	168:0
+√	F	169:0
+∽	F	170:0
+∝	F	171:0
+∵	F	172:0
+∫	F	173:0
+∬	F	174:0
+Å	F	182:0
+‰	F	183:0
+♯	F	184:0
+♭	F	185:0
+♪	F	186:0
+†	F	187:0
+‡	F	188:0
+¶	F	189:0
+◯	F	194:0
+0	F	48:1
+1	F	49:1
+2	F	50:1
+3	F	51:1
+4	F	52:1
+5	F	53:1
+6	F	54:1
+7	F	55:1
+8	F	56:1
+9	F	57:1
+A	F	65:1
+B	F	66:1
+C	F	67:1
+D	F	68:1
+E	F	69:1
+F	F	70:1
+G	F	71:1
+H	F	72:1
+I	F	73:1
+J	F	74:1
+K	F	75:1
+L	F	76:1
+M	F	77:1
+N	F	78:1
+O	F	79:1
+P	F	80:1
+Q	F	81:1
+R	F	82:1
+S	F	83:1
+T	F	84:1
+U	F	85:1
+V	F	86:1
+W	F	87:1
+X	F	88:1
+Y	F	89:1
+Z	F	90:1
+a	F	97:1
+b	F	98:1
+c	F	99:1
+d	F	100:1
+e	F	101:1
+f	F	102:1
+g	F	103:1
+h	F	104:1
+i	F	105:1
+j	F	106:1
+k	F	107:1
+l	F	108:1
+m	F	109:1
+n	F	110:1
+o	F	111:1
+p	F	112:1
+q	F	113:1
+r	F	114:1
+s	F	115:1
+t	F	116:1
+u	F	117:1
+v	F	118:1
+w	F	119:1
+x	F	120:1
+y	F	121:1
+z	F	122:1
+ぁ	F	1:2
+あ	F	2:2
+ぃ	F	3:2
+い	F	4:2
+ぅ	F	5:2
+う	F	6:2
+ぇ	F	7:2
+え	F	8:2
+ぉ	F	9:2
+お	F	10:2
+か	F	11:2
+が	F	12:2
+き	F	13:2
+ぎ	F	14:2
+く	F	15:2
+ぐ	F	16:2
+け	F	17:2
+げ	F	18:2
+こ	F	19:2
+ご	F	20:2
+さ	F	21:2
+ざ	F	22:2
+し	F	23:2
+じ	F	24:2
+す	F	25:2
+ず	F	26:2
+せ	F	27:2
+ぜ	F	28:2
+そ	F	29:2
+ぞ	F	30:2
+た	F	31:2
+だ	F	32:2
+ち	F	33:2
+ぢ	F	34:2
+っ	F	35:2
+つ	F	36:2
+づ	F	37:2
+て	F	38:2
+で	F	39:2
+と	F	40:2
+ど	F	41:2
+な	F	42:2
+に	F	43:2
+ぬ	F	44:2
+ね	F	45:2
+の	F	46:2
+は	F	47:2
+ば	F	48:2
+ぱ	F	49:2
+ひ	F	50:2
+び	F	51:2
+ぴ	F	52:2
+ふ	F	53:2
+ぶ	F	54:2
+ぷ	F	55:2
+へ	F	56:2
+べ	F	57:2
+ぺ	F	58:2
+ほ	F	59:2
+ぼ	F	60:2
+ぽ	F	61:2
+ま	F	62:2
+み	F	63:2
+む	F	64:2
+め	F	65:2
+も	F	66:2
+ゃ	F	67:2
+や	F	68:2
+ゅ	F	69:2
+ゆ	F	70:2
+ょ	F	71:2
+よ	F	72:2
+ら	F	73:2
+り	F	74:2
+る	F	75:2
+れ	F	76:2
+ろ	F	77:2
+ゎ	F	78:2
+わ	F	79:2
+ゐ	F	80:2
+ゑ	F	81:2
+を	F	82:2
+ん	F	83:2
+ァ	F	1:3
+ア	F	2:3
+ィ	F	3:3
+イ	F	4:3
+ゥ	F	5:3
+ウ	F	6:3
+ェ	F	7:3
+エ	F	8:3
+ォ	F	9:3
+オ	F	10:3
+カ	F	11:3
+ガ	F	12:3
+キ	F	13:3
+ギ	F	14:3
+ク	F	15:3
+グ	F	16:3
+ケ	F	17:3
+ゲ	F	18:3
+コ	F	19:3
+ゴ	F	20:3
+サ	F	21:3
+ザ	F	22:3
+シ	F	23:3
+ジ	F	24:3
+ス	F	25:3
+ズ	F	26:3
+セ	F	27:3
+ゼ	F	28:3
+ソ	F	29:3
+ゾ	F	30:3
+タ	F	31:3
+ダ	F	32:3
+チ	F	33:3
+ヂ	F	34:3
+ッ	F	35:3
+ツ	F	36:3
+ヅ	F	37:3
+テ	F	38:3
+デ	F	39:3
+ト	F	40:3
+ド	F	41:3
+ナ	F	42:3
+ニ	F	43:3
+ヌ	F	44:3
+ネ	F	45:3
+ノ	F	46:3
+ハ	F	47:3
+バ	F	48:3
+パ	F	49:3
+ヒ	F	50:3
+ビ	F	51:3
+ピ	F	52:3
+フ	F	53:3
+ブ	F	54:3
+プ	F	55:3
+ヘ	F	56:3
+ベ	F	57:3
+ペ	F	58:3
+ホ	F	59:3
+ボ	F	60:3
+ポ	F	61:3
+マ	F	62:3
+ミ	F	63:3
+ム	F	64:3
+メ	F	65:3
+モ	F	66:3
+ャ	F	67:3
+ヤ	F	68:3
+ュ	F	69:3
+ユ	F	70:3
+ョ	F	71:3
+ヨ	F	72:3
+ラ	F	73:3
+リ	F	74:3
+ル	F	75:3
+レ	F	76:3
+ロ	F	77:3
+ヮ	F	78:3
+ワ	F	79:3
+ヰ	F	80:3
+ヱ	F	81:3
+ヲ	F	82:3
+ン	F	83:3
+ヴ	F	84:3
+ヵ	F	85:3
+ヶ	F	86:3
+Α	F	1:4
+Β	F	2:4
+Γ	F	3:4
+Δ	F	4:4
+Ε	F	5:4
+Ζ	F	6:4
+Η	F	7:4
+Θ	F	8:4
+Ι	F	9:4
+Κ	F	10:4
+Λ	F	11:4
+Μ	F	12:4
+Ν	F	13:4
+Ξ	F	14:4
+Ο	F	15:4
+Π	F	16:4
+Ρ	F	17:4
+Σ	F	18:4
+Τ	F	19:4
+Υ	F	20:4
+Φ	F	21:4
+Χ	F	22:4
+Ψ	F	23:4
+Ω	F	24:4
+α	F	33:4
+β	F	34:4
+γ	F	35:4
+δ	F	36:4
+ε	F	37:4
+ζ	F	38:4
+η	F	39:4
+θ	F	40:4
+ι	F	41:4
+κ	F	42:4
+λ	F	43:4
+μ	F	44:4
+ν	F	45:4
+ξ	F	46:4
+ο	F	47:4
+π	F	48:4
+ρ	F	49:4
+σ	F	50:4
+τ	F	51:4
+υ	F	52:4
+φ	F	53:4
+χ	F	54:4
+ψ	F	55:4
+ω	F	56:4
+А	F	1:5
+Б	F	2:5
+В	F	3:5
+Г	F	4:5
+Д	F	5:5
+Е	F	6:5
+Ё	F	7:5
+Ж	F	8:5
+З	F	9:5
+И	F	10:5
+Й	F	11:5
+К	F	12:5
+Л	F	13:5
+М	F	14:5
+Н	F	15:5
+О	F	16:5
+П	F	17:5
+Р	F	18:5
+С	F	19:5
+Т	F	20:5
+У	F	21:5
+Ф	F	22:5
+Х	F	23:5
+Ц	F	24:5
+Ч	F	25:5
+Ш	F	26:5
+Щ	F	27:5
+Ъ	F	28:5
+Ы	F	29:5
+Ь	F	30:5
+Э	F	31:5
+Ю	F	32:5
+Я	F	33:5
+а	F	49:5
+б	F	50:5
+в	F	51:5
+г	F	52:5
+д	F	53:5
+е	F	54:5
+ё	F	55:5
+ж	F	56:5
+з	F	57:5
+и	F	58:5
+й	F	59:5
+к	F	60:5
+л	F	61:5
+м	F	62:5
+н	F	63:5
+о	F	64:5
+п	F	65:5
+р	F	66:5
+с	F	67:5
+т	F	68:5
+у	F	69:5
+ф	F	70:5
+х	F	71:5
+ц	F	72:5
+ч	F	73:5
+ш	F	74:5
+щ	F	75:5
+ъ	F	76:5
+ы	F	77:5
+ь	F	78:5
+э	F	79:5
+ю	F	80:5
+я	F	81:5
+─	F	1:6
+│	F	2:6
+┌	F	3:6
+┐	F	4:6
+┘	F	5:6
+└	F	6:6
+├	F	7:6
+┬	F	8:6
+┤	F	9:6
+┴	F	10:6
+┼	F	11:6
+━	F	12:6
+┃	F	13:6
+┏	F	14:6
+┓	F	15:6
+┛	F	16:6
+┗	F	17:6
+┣	F	18:6
+┳	F	19:6
+┫	F	20:6
+┻	F	21:6
+╋	F	22:6
+┠	F	23:6
+┯	F	24:6
+┨	F	25:6
+┷	F	26:6
+┿	F	27:6
+┝	F	28:6
+┰	F	29:6
+┥	F	30:6
+┸	F	31:6
+╂	F	32:6
+亜	F	0:a
+唖	F	1:a
+娃	F	2:a
+阿	F	3:a
+哀	F	4:a
+愛	F	5:a
+挨	F	6:a
+姶	F	7:a
+逢	F	8:a
+葵	F	9:a
+茜	F	10:a
+穐	F	11:a
+悪	F	12:a
+握	F	13:a
+渥	F	14:a
+旭	F	15:a
+葦	F	16:a
+芦	F	17:a
+鯵	F	18:a
+梓	F	19:a
+圧	F	20:a
+斡	F	21:a
+扱	F	22:a
+宛	F	23:a
+姐	F	24:a
+虻	F	25:a
+飴	F	26:a
+絢	F	27:a
+綾	F	28:a
+鮎	F	29:a
+或	F	30:a
+粟	F	31:a
+袷	F	32:a
+安	F	33:a
+庵	F	34:a
+按	F	35:a
+暗	F	36:a
+案	F	37:a
+闇	F	38:a
+鞍	F	39:a
+杏	F	40:a
+以	F	41:a
+伊	F	42:a
+位	F	43:a
+依	F	44:a
+偉	F	45:a
+囲	F	46:a
+夷	F	47:a
+委	F	48:a
+威	F	49:a
+尉	F	50:a
+惟	F	51:a
+意	F	52:a
+慰	F	53:a
+易	F	54:a
+椅	F	55:a
+為	F	56:a
+畏	F	57:a
+異	F	58:a
+移	F	59:a
+維	F	60:a
+緯	F	61:a
+胃	F	62:a
+萎	F	63:a
+衣	F	64:a
+謂	F	65:a
+違	F	66:a
+遺	F	67:a
+医	F	68:a
+井	F	69:a
+亥	F	70:a
+域	F	71:a
+育	F	72:a
+郁	F	73:a
+磯	F	74:a
+一	F	75:a
+壱	F	76:a
+溢	F	77:a
+逸	F	78:a
+稲	F	79:a
+茨	F	80:a
+芋	F	81:a
+鰯	F	82:a
+允	F	83:a
+印	F	84:a
+咽	F	85:a
+員	F	86:a
+因	F	87:a
+姻	F	88:a
+引	F	89:a
+飲	F	90:a
+淫	F	91:a
+胤	F	92:a
+蔭	F	93:a
+院	F	94:a
+陰	F	95:a
+隠	F	96:a
+韻	F	97:a
+吋	F	98:a
+右	F	99:a
+宇	F	100:a
+烏	F	101:a
+羽	F	102:a
+迂	F	103:a
+雨	F	104:a
+卯	F	105:a
+鵜	F	106:a
+窺	F	107:a
+丑	F	108:a
+碓	F	109:a
+臼	F	110:a
+渦	F	111:a
+嘘	F	112:a
+唄	F	113:a
+欝	F	114:a
+蔚	F	115:a
+鰻	F	116:a
+姥	F	117:a
+厩	F	118:a
+浦	F	119:a
+瓜	F	120:a
+閏	F	121:a
+噂	F	122:a
+云	F	123:a
+運	F	124:a
+雲	F	125:a
+荏	F	126:a
+餌	F	127:a
+叡	F	128:a
+営	F	129:a
+嬰	F	130:a
+影	F	131:a
+映	F	132:a
+曳	F	133:a
+栄	F	134:a
+永	F	135:a
+泳	F	136:a
+洩	F	137:a
+瑛	F	138:a
+盈	F	139:a
+穎	F	140:a
+頴	F	141:a
+英	F	142:a
+衛	F	143:a
+詠	F	144:a
+鋭	F	145:a
+液	F	146:a
+疫	F	147:a
+益	F	148:a
+駅	F	149:a
+悦	F	150:a
+謁	F	151:a
+越	F	152:a
+閲	F	153:a
+榎	F	154:a
+厭	F	155:a
+円	F	156:a
+園	F	157:a
+堰	F	158:a
+奄	F	159:a
+宴	F	160:a
+延	F	161:a
+怨	F	162:a
+掩	F	163:a
+援	F	164:a
+沿	F	165:a
+演	F	166:a
+炎	F	167:a
+焔	F	168:a
+煙	F	169:a
+燕	F	170:a
+猿	F	171:a
+縁	F	172:a
+艶	F	173:a
+苑	F	174:a
+薗	F	175:a
+遠	F	176:a
+鉛	F	177:a
+鴛	F	178:a
+塩	F	179:a
+於	F	180:a
+汚	F	181:a
+甥	F	182:a
+凹	F	183:a
+央	F	184:a
+奥	F	185:a
+往	F	186:a
+応	F	187:a
+押	F	188:a
+旺	F	189:a
+横	F	190:a
+欧	F	191:a
+殴	F	192:a
+王	F	193:a
+翁	F	194:a
+襖	F	195:a
+鴬	F	196:a
+鴎	F	197:a
+黄	F	198:a
+岡	F	199:a
+沖	F	200:a
+荻	F	201:a
+億	F	202:a
+屋	F	203:a
+憶	F	204:a
+臆	F	205:a
+桶	F	206:a
+牡	F	207:a
+乙	F	208:a
+俺	F	209:a
+卸	F	210:a
+恩	F	211:a
+温	F	212:a
+穏	F	213:a
+音	F	214:a
+下	F	215:a
+化	F	216:a
+仮	F	217:a
+何	F	218:a
+伽	F	219:a
+価	F	220:a
+佳	F	221:a
+加	F	222:a
+可	F	223:a
+嘉	F	224:a
+夏	F	225:a
+嫁	F	226:a
+家	F	227:a
+寡	F	228:a
+科	F	229:a
+暇	F	230:a
+果	F	231:a
+架	F	232:a
+歌	F	233:a
+河	F	234:a
+火	F	235:a
+珂	F	236:a
+禍	F	237:a
+禾	F	238:a
+稼	F	239:a
+箇	F	240:a
+花	F	241:a
+苛	F	242:a
+茄	F	243:a
+荷	F	244:a
+華	F	245:a
+菓	F	246:a
+蝦	F	247:a
+課	F	248:a
+嘩	F	249:a
+貨	F	250:a
+迦	F	251:a
+過	F	252:a
+霞	F	253:a
+蚊	F	254:a
+俄	F	255:a
+峨	F	0:b
+我	F	1:b
+牙	F	2:b
+画	F	3:b
+臥	F	4:b
+芽	F	5:b
+蛾	F	6:b
+賀	F	7:b
+雅	F	8:b
+餓	F	9:b
+駕	F	10:b
+介	F	11:b
+会	F	12:b
+解	F	13:b
+回	F	14:b
+塊	F	15:b
+壊	F	16:b
+廻	F	17:b
+快	F	18:b
+怪	F	19:b
+悔	F	20:b
+恢	F	21:b
+懐	F	22:b
+戒	F	23:b
+拐	F	24:b
+改	F	25:b
+魁	F	26:b
+晦	F	27:b
+械	F	28:b
+海	F	29:b
+灰	F	30:b
+界	F	31:b
+皆	F	32:b
+絵	F	33:b
+芥	F	34:b
+蟹	F	35:b
+開	F	36:b
+階	F	37:b
+貝	F	38:b
+凱	F	39:b
+劾	F	40:b
+外	F	41:b
+咳	F	42:b
+害	F	43:b
+崖	F	44:b
+慨	F	45:b
+概	F	46:b
+涯	F	47:b
+碍	F	48:b
+蓋	F	49:b
+街	F	50:b
+該	F	51:b
+鎧	F	52:b
+骸	F	53:b
+浬	F	54:b
+馨	F	55:b
+蛙	F	56:b
+垣	F	57:b
+柿	F	58:b
+蛎	F	59:b
+鈎	F	60:b
+劃	F	61:b
+嚇	F	62:b
+各	F	63:b
+廓	F	64:b
+拡	F	65:b
+撹	F	66:b
+格	F	67:b
+核	F	68:b
+殻	F	69:b
+獲	F	70:b
+確	F	71:b
+穫	F	72:b
+覚	F	73:b
+角	F	74:b
+赫	F	75:b
+較	F	76:b
+郭	F	77:b
+閣	F	78:b
+隔	F	79:b
+革	F	80:b
+学	F	81:b
+岳	F	82:b
+楽	F	83:b
+額	F	84:b
+顎	F	85:b
+掛	F	86:b
+笠	F	87:b
+樫	F	88:b
+橿	F	89:b
+梶	F	90:b
+鰍	F	91:b
+潟	F	92:b
+割	F	93:b
+喝	F	94:b
+恰	F	95:b
+括	F	96:b
+活	F	97:b
+渇	F	98:b
+滑	F	99:b
+葛	F	100:b
+褐	F	101:b
+轄	F	102:b
+且	F	103:b
+鰹	F	104:b
+叶	F	105:b
+椛	F	106:b
+樺	F	107:b
+鞄	F	108:b
+株	F	109:b
+兜	F	110:b
+竃	F	111:b
+蒲	F	112:b
+釜	F	113:b
+鎌	F	114:b
+噛	F	115:b
+鴨	F	116:b
+栢	F	117:b
+茅	F	118:b
+萱	F	119:b
+粥	F	120:b
+刈	F	121:b
+苅	F	122:b
+瓦	F	123:b
+乾	F	124:b
+侃	F	125:b
+冠	F	126:b
+寒	F	127:b
+刊	F	128:b
+勘	F	129:b
+勧	F	130:b
+巻	F	131:b
+喚	F	132:b
+堪	F	133:b
+姦	F	134:b
+完	F	135:b
+官	F	136:b
+寛	F	137:b
+干	F	138:b
+幹	F	139:b
+患	F	140:b
+感	F	141:b
+慣	F	142:b
+憾	F	143:b
+換	F	144:b
+敢	F	145:b
+柑	F	146:b
+桓	F	147:b
+棺	F	148:b
+款	F	149:b
+歓	F	150:b
+汗	F	151:b
+漢	F	152:b
+澗	F	153:b
+潅	F	154:b
+環	F	155:b
+甘	F	156:b
+監	F	157:b
+看	F	158:b
+竿	F	159:b
+管	F	160:b
+簡	F	161:b
+緩	F	162:b
+缶	F	163:b
+翰	F	164:b
+肝	F	165:b
+艦	F	166:b
+莞	F	167:b
+観	F	168:b
+諌	F	169:b
+貫	F	170:b
+還	F	171:b
+鑑	F	172:b
+間	F	173:b
+閑	F	174:b
+関	F	175:b
+陥	F	176:b
+韓	F	177:b
+館	F	178:b
+舘	F	179:b
+丸	F	180:b
+含	F	181:b
+岸	F	182:b
+巌	F	183:b
+玩	F	184:b
+癌	F	185:b
+眼	F	186:b
+岩	F	187:b
+翫	F	188:b
+贋	F	189:b
+雁	F	190:b
+頑	F	191:b
+顔	F	192:b
+願	F	193:b
+企	F	194:b
+伎	F	195:b
+危	F	196:b
+喜	F	197:b
+器	F	198:b
+基	F	199:b
+奇	F	200:b
+嬉	F	201:b
+寄	F	202:b
+岐	F	203:b
+希	F	204:b
+幾	F	205:b
+忌	F	206:b
+揮	F	207:b
+机	F	208:b
+旗	F	209:b
+既	F	210:b
+期	F	211:b
+棋	F	212:b
+棄	F	213:b
+機	F	214:b
+帰	F	215:b
+毅	F	216:b
+気	F	217:b
+汽	F	218:b
+畿	F	219:b
+祈	F	220:b
+季	F	221:b
+稀	F	222:b
+紀	F	223:b
+徽	F	224:b
+規	F	225:b
+記	F	226:b
+貴	F	227:b
+起	F	228:b
+軌	F	229:b
+輝	F	230:b
+飢	F	231:b
+騎	F	232:b
+鬼	F	233:b
+亀	F	234:b
+偽	F	235:b
+儀	F	236:b
+妓	F	237:b
+宜	F	238:b
+戯	F	239:b
+技	F	240:b
+擬	F	241:b
+欺	F	242:b
+犠	F	243:b
+疑	F	244:b
+祇	F	245:b
+義	F	246:b
+蟻	F	247:b
+誼	F	248:b
+議	F	249:b
+掬	F	250:b
+菊	F	251:b
+鞠	F	252:b
+吉	F	253:b
+吃	F	254:b
+喫	F	255:b
+桔	F	0:c
+橘	F	1:c
+詰	F	2:c
+砧	F	3:c
+杵	F	4:c
+黍	F	5:c
+却	F	6:c
+客	F	7:c
+脚	F	8:c
+虐	F	9:c
+逆	F	10:c
+丘	F	11:c
+久	F	12:c
+仇	F	13:c
+休	F	14:c
+及	F	15:c
+吸	F	16:c
+宮	F	17:c
+弓	F	18:c
+急	F	19:c
+救	F	20:c
+朽	F	21:c
+求	F	22:c
+汲	F	23:c
+泣	F	24:c
+灸	F	25:c
+球	F	26:c
+究	F	27:c
+窮	F	28:c
+笈	F	29:c
+級	F	30:c
+糾	F	31:c
+給	F	32:c
+旧	F	33:c
+牛	F	34:c
+去	F	35:c
+居	F	36:c
+巨	F	37:c
+拒	F	38:c
+拠	F	39:c
+挙	F	40:c
+渠	F	41:c
+虚	F	42:c
+許	F	43:c
+距	F	44:c
+鋸	F	45:c
+漁	F	46:c
+禦	F	47:c
+魚	F	48:c
+亨	F	49:c
+享	F	50:c
+京	F	51:c
+供	F	52:c
+侠	F	53:c
+僑	F	54:c
+兇	F	55:c
+競	F	56:c
+共	F	57:c
+凶	F	58:c
+協	F	59:c
+匡	F	60:c
+卿	F	61:c
+叫	F	62:c
+喬	F	63:c
+境	F	64:c
+峡	F	65:c
+強	F	66:c
+彊	F	67:c
+怯	F	68:c
+恐	F	69:c
+恭	F	70:c
+挟	F	71:c
+教	F	72:c
+橋	F	73:c
+況	F	74:c
+狂	F	75:c
+狭	F	76:c
+矯	F	77:c
+胸	F	78:c
+脅	F	79:c
+興	F	80:c
+蕎	F	81:c
+郷	F	82:c
+鏡	F	83:c
+響	F	84:c
+饗	F	85:c
+驚	F	86:c
+仰	F	87:c
+凝	F	88:c
+尭	F	89:c
+暁	F	90:c
+業	F	91:c
+局	F	92:c
+曲	F	93:c
+極	F	94:c
+玉	F	95:c
+桐	F	96:c
+粁	F	97:c
+僅	F	98:c
+勤	F	99:c
+均	F	100:c
+巾	F	101:c
+錦	F	102:c
+斤	F	103:c
+欣	F	104:c
+欽	F	105:c
+琴	F	106:c
+禁	F	107:c
+禽	F	108:c
+筋	F	109:c
+緊	F	110:c
+芹	F	111:c
+菌	F	112:c
+衿	F	113:c
+襟	F	114:c
+謹	F	115:c
+近	F	116:c
+金	F	117:c
+吟	F	118:c
+銀	F	119:c
+九	F	120:c
+倶	F	121:c
+句	F	122:c
+区	F	123:c
+狗	F	124:c
+玖	F	125:c
+矩	F	126:c
+苦	F	127:c
+躯	F	128:c
+駆	F	129:c
+駈	F	130:c
+駒	F	131:c
+具	F	132:c
+愚	F	133:c
+虞	F	134:c
+喰	F	135:c
+空	F	136:c
+偶	F	137:c
+寓	F	138:c
+遇	F	139:c
+隅	F	140:c
+串	F	141:c
+櫛	F	142:c
+釧	F	143:c
+屑	F	144:c
+屈	F	145:c
+掘	F	146:c
+窟	F	147:c
+沓	F	148:c
+靴	F	149:c
+轡	F	150:c
+窪	F	151:c
+熊	F	152:c
+隈	F	153:c
+粂	F	154:c
+栗	F	155:c
+繰	F	156:c
+桑	F	157:c
+鍬	F	158:c
+勲	F	159:c
+君	F	160:c
+薫	F	161:c
+訓	F	162:c
+群	F	163:c
+軍	F	164:c
+郡	F	165:c
+卦	F	166:c
+袈	F	167:c
+祁	F	168:c
+係	F	169:c
+傾	F	170:c
+刑	F	171:c
+兄	F	172:c
+啓	F	173:c
+圭	F	174:c
+珪	F	175:c
+型	F	176:c
+契	F	177:c
+形	F	178:c
+径	F	179:c
+恵	F	180:c
+慶	F	181:c
+慧	F	182:c
+憩	F	183:c
+掲	F	184:c
+携	F	185:c
+敬	F	186:c
+景	F	187:c
+桂	F	188:c
+渓	F	189:c
+畦	F	190:c
+稽	F	191:c
+系	F	192:c
+経	F	193:c
+継	F	194:c
+繋	F	195:c
+罫	F	196:c
+茎	F	197:c
+荊	F	198:c
+蛍	F	199:c
+計	F	200:c
+詣	F	201:c
+警	F	202:c
+軽	F	203:c
+頚	F	204:c
+鶏	F	205:c
+芸	F	206:c
+迎	F	207:c
+鯨	F	208:c
+劇	F	209:c
+戟	F	210:c
+撃	F	211:c
+激	F	212:c
+隙	F	213:c
+桁	F	214:c
+傑	F	215:c
+欠	F	216:c
+決	F	217:c
+潔	F	218:c
+穴	F	219:c
+結	F	220:c
+血	F	221:c
+訣	F	222:c
+月	F	223:c
+件	F	224:c
+倹	F	225:c
+倦	F	226:c
+健	F	227:c
+兼	F	228:c
+券	F	229:c
+剣	F	230:c
+喧	F	231:c
+圏	F	232:c
+堅	F	233:c
+嫌	F	234:c
+建	F	235:c
+憲	F	236:c
+懸	F	237:c
+拳	F	238:c
+捲	F	239:c
+検	F	240:c
+権	F	241:c
+牽	F	242:c
+犬	F	243:c
+献	F	244:c
+研	F	245:c
+硯	F	246:c
+絹	F	247:c
+県	F	248:c
+肩	F	249:c
+見	F	250:c
+謙	F	251:c
+賢	F	252:c
+軒	F	253:c
+遣	F	254:c
+鍵	F	255:c
+険	F	0:d
+顕	F	1:d
+験	F	2:d
+鹸	F	3:d
+元	F	4:d
+原	F	5:d
+厳	F	6:d
+幻	F	7:d
+弦	F	8:d
+減	F	9:d
+源	F	10:d
+玄	F	11:d
+現	F	12:d
+絃	F	13:d
+舷	F	14:d
+言	F	15:d
+諺	F	16:d
+限	F	17:d
+乎	F	18:d
+個	F	19:d
+古	F	20:d
+呼	F	21:d
+固	F	22:d
+姑	F	23:d
+孤	F	24:d
+己	F	25:d
+庫	F	26:d
+弧	F	27:d
+戸	F	28:d
+故	F	29:d
+枯	F	30:d
+湖	F	31:d
+狐	F	32:d
+糊	F	33:d
+袴	F	34:d
+股	F	35:d
+胡	F	36:d
+菰	F	37:d
+虎	F	38:d
+誇	F	39:d
+跨	F	40:d
+鈷	F	41:d
+雇	F	42:d
+顧	F	43:d
+鼓	F	44:d
+五	F	45:d
+互	F	46:d
+伍	F	47:d
+午	F	48:d
+呉	F	49:d
+吾	F	50:d
+娯	F	51:d
+後	F	52:d
+御	F	53:d
+悟	F	54:d
+梧	F	55:d
+檎	F	56:d
+瑚	F	57:d
+碁	F	58:d
+語	F	59:d
+誤	F	60:d
+護	F	61:d
+醐	F	62:d
+乞	F	63:d
+鯉	F	64:d
+交	F	65:d
+佼	F	66:d
+侯	F	67:d
+候	F	68:d
+倖	F	69:d
+光	F	70:d
+公	F	71:d
+功	F	72:d
+効	F	73:d
+勾	F	74:d
+厚	F	75:d
+口	F	76:d
+向	F	77:d
+后	F	78:d
+喉	F	79:d
+坑	F	80:d
+垢	F	81:d
+好	F	82:d
+孔	F	83:d
+孝	F	84:d
+宏	F	85:d
+工	F	86:d
+巧	F	87:d
+巷	F	88:d
+幸	F	89:d
+広	F	90:d
+庚	F	91:d
+康	F	92:d
+弘	F	93:d
+恒	F	94:d
+慌	F	95:d
+抗	F	96:d
+拘	F	97:d
+控	F	98:d
+攻	F	99:d
+昂	F	100:d
+晃	F	101:d
+更	F	102:d
+杭	F	103:d
+校	F	104:d
+梗	F	105:d
+構	F	106:d
+江	F	107:d
+洪	F	108:d
+浩	F	109:d
+港	F	110:d
+溝	F	111:d
+甲	F	112:d
+皇	F	113:d
+硬	F	114:d
+稿	F	115:d
+糠	F	116:d
+紅	F	117:d
+紘	F	118:d
+絞	F	119:d
+綱	F	120:d
+耕	F	121:d
+考	F	122:d
+肯	F	123:d
+肱	F	124:d
+腔	F	125:d
+膏	F	126:d
+航	F	127:d
+荒	F	128:d
+行	F	129:d
+衡	F	130:d
+講	F	131:d
+貢	F	132:d
+購	F	133:d
+郊	F	134:d
+酵	F	135:d
+鉱	F	136:d
+砿	F	137:d
+鋼	F	138:d
+閤	F	139:d
+降	F	140:d
+項	F	141:d
+香	F	142:d
+高	F	143:d
+鴻	F	144:d
+剛	F	145:d
+劫	F	146:d
+号	F	147:d
+合	F	148:d
+壕	F	149:d
+拷	F	150:d
+濠	F	151:d
+豪	F	152:d
+轟	F	153:d
+麹	F	154:d
+克	F	155:d
+刻	F	156:d
+告	F	157:d
+国	F	158:d
+穀	F	159:d
+酷	F	160:d
+鵠	F	161:d
+黒	F	162:d
+獄	F	163:d
+漉	F	164:d
+腰	F	165:d
+甑	F	166:d
+忽	F	167:d
+惚	F	168:d
+骨	F	169:d
+狛	F	170:d
+込	F	171:d
+此	F	172:d
+頃	F	173:d
+今	F	174:d
+困	F	175:d
+坤	F	176:d
+墾	F	177:d
+婚	F	178:d
+恨	F	179:d
+懇	F	180:d
+昏	F	181:d
+昆	F	182:d
+根	F	183:d
+梱	F	184:d
+混	F	185:d
+痕	F	186:d
+紺	F	187:d
+艮	F	188:d
+魂	F	189:d
+些	F	190:d
+佐	F	191:d
+叉	F	192:d
+唆	F	193:d
+嵯	F	194:d
+左	F	195:d
+差	F	196:d
+査	F	197:d
+沙	F	198:d
+瑳	F	199:d
+砂	F	200:d
+詐	F	201:d
+鎖	F	202:d
+裟	F	203:d
+坐	F	204:d
+座	F	205:d
+挫	F	206:d
+債	F	207:d
+催	F	208:d
+再	F	209:d
+最	F	210:d
+哉	F	211:d
+塞	F	212:d
+妻	F	213:d
+宰	F	214:d
+彩	F	215:d
+才	F	216:d
+採	F	217:d
+栽	F	218:d
+歳	F	219:d
+済	F	220:d
+災	F	221:d
+采	F	222:d
+犀	F	223:d
+砕	F	224:d
+砦	F	225:d
+祭	F	226:d
+斎	F	227:d
+細	F	228:d
+菜	F	229:d
+裁	F	230:d
+載	F	231:d
+際	F	232:d
+剤	F	233:d
+在	F	234:d
+材	F	235:d
+罪	F	236:d
+財	F	237:d
+冴	F	238:d
+坂	F	239:d
+阪	F	240:d
+堺	F	241:d
+榊	F	242:d
+肴	F	243:d
+咲	F	244:d
+崎	F	245:d
+埼	F	246:d
+碕	F	247:d
+鷺	F	248:d
+作	F	249:d
+削	F	250:d
+咋	F	251:d
+搾	F	252:d
+昨	F	253:d
+朔	F	254:d
+柵	F	255:d
+窄	F	0:e
+策	F	1:e
+索	F	2:e
+錯	F	3:e
+桜	F	4:e
+鮭	F	5:e
+笹	F	6:e
+匙	F	7:e
+冊	F	8:e
+刷	F	9:e
+察	F	10:e
+拶	F	11:e
+撮	F	12:e
+擦	F	13:e
+札	F	14:e
+殺	F	15:e
+薩	F	16:e
+雑	F	17:e
+皐	F	18:e
+鯖	F	19:e
+捌	F	20:e
+錆	F	21:e
+鮫	F	22:e
+皿	F	23:e
+晒	F	24:e
+三	F	25:e
+傘	F	26:e
+参	F	27:e
+山	F	28:e
+惨	F	29:e
+撒	F	30:e
+散	F	31:e
+桟	F	32:e
+燦	F	33:e
+珊	F	34:e
+産	F	35:e
+算	F	36:e
+纂	F	37:e
+蚕	F	38:e
+讃	F	39:e
+賛	F	40:e
+酸	F	41:e
+餐	F	42:e
+斬	F	43:e
+暫	F	44:e
+残	F	45:e
+仕	F	46:e
+仔	F	47:e
+伺	F	48:e
+使	F	49:e
+刺	F	50:e
+司	F	51:e
+史	F	52:e
+嗣	F	53:e
+四	F	54:e
+士	F	55:e
+始	F	56:e
+姉	F	57:e
+姿	F	58:e
+子	F	59:e
+屍	F	60:e
+市	F	61:e
+師	F	62:e
+志	F	63:e
+思	F	64:e
+指	F	65:e
+支	F	66:e
+孜	F	67:e
+斯	F	68:e
+施	F	69:e
+旨	F	70:e
+枝	F	71:e
+止	F	72:e
+死	F	73:e
+氏	F	74:e
+獅	F	75:e
+祉	F	76:e
+私	F	77:e
+糸	F	78:e
+紙	F	79:e
+紫	F	80:e
+肢	F	81:e
+脂	F	82:e
+至	F	83:e
+視	F	84:e
+詞	F	85:e
+詩	F	86:e
+試	F	87:e
+誌	F	88:e
+諮	F	89:e
+資	F	90:e
+賜	F	91:e
+雌	F	92:e
+飼	F	93:e
+歯	F	94:e
+事	F	95:e
+似	F	96:e
+侍	F	97:e
+児	F	98:e
+字	F	99:e
+寺	F	100:e
+慈	F	101:e
+持	F	102:e
+時	F	103:e
+次	F	104:e
+滋	F	105:e
+治	F	106:e
+爾	F	107:e
+璽	F	108:e
+痔	F	109:e
+磁	F	110:e
+示	F	111:e
+而	F	112:e
+耳	F	113:e
+自	F	114:e
+蒔	F	115:e
+辞	F	116:e
+汐	F	117:e
+鹿	F	118:e
+式	F	119:e
+識	F	120:e
+鴫	F	121:e
+竺	F	122:e
+軸	F	123:e
+宍	F	124:e
+雫	F	125:e
+七	F	126:e
+叱	F	127:e
+執	F	128:e
+失	F	129:e
+嫉	F	130:e
+室	F	131:e
+悉	F	132:e
+湿	F	133:e
+漆	F	134:e
+疾	F	135:e
+質	F	136:e
+実	F	137:e
+蔀	F	138:e
+篠	F	139:e
+偲	F	140:e
+柴	F	141:e
+芝	F	142:e
+屡	F	143:e
+蕊	F	144:e
+縞	F	145:e
+舎	F	146:e
+写	F	147:e
+射	F	148:e
+捨	F	149:e
+赦	F	150:e
+斜	F	151:e
+煮	F	152:e
+社	F	153:e
+紗	F	154:e
+者	F	155:e
+謝	F	156:e
+車	F	157:e
+遮	F	158:e
+蛇	F	159:e
+邪	F	160:e
+借	F	161:e
+勺	F	162:e
+尺	F	163:e
+杓	F	164:e
+灼	F	165:e
+爵	F	166:e
+酌	F	167:e
+釈	F	168:e
+錫	F	169:e
+若	F	170:e
+寂	F	171:e
+弱	F	172:e
+惹	F	173:e
+主	F	174:e
+取	F	175:e
+守	F	176:e
+手	F	177:e
+朱	F	178:e
+殊	F	179:e
+狩	F	180:e
+珠	F	181:e
+種	F	182:e
+腫	F	183:e
+趣	F	184:e
+酒	F	185:e
+首	F	186:e
+儒	F	187:e
+受	F	188:e
+呪	F	189:e
+寿	F	190:e
+授	F	191:e
+樹	F	192:e
+綬	F	193:e
+需	F	194:e
+囚	F	195:e
+収	F	196:e
+周	F	197:e
+宗	F	198:e
+就	F	199:e
+州	F	200:e
+修	F	201:e
+愁	F	202:e
+拾	F	203:e
+洲	F	204:e
+秀	F	205:e
+秋	F	206:e
+終	F	207:e
+繍	F	208:e
+習	F	209:e
+臭	F	210:e
+舟	F	211:e
+蒐	F	212:e
+衆	F	213:e
+襲	F	214:e
+讐	F	215:e
+蹴	F	216:e
+輯	F	217:e
+週	F	218:e
+酋	F	219:e
+酬	F	220:e
+集	F	221:e
+醜	F	222:e
+什	F	223:e
+住	F	224:e
+充	F	225:e
+十	F	226:e
+従	F	227:e
+戎	F	228:e
+柔	F	229:e
+汁	F	230:e
+渋	F	231:e
+獣	F	232:e
+縦	F	233:e
+重	F	234:e
+銃	F	235:e
+叔	F	236:e
+夙	F	237:e
+宿	F	238:e
+淑	F	239:e
+祝	F	240:e
+縮	F	241:e
+粛	F	242:e
+塾	F	243:e
+熟	F	244:e
+出	F	245:e
+術	F	246:e
+述	F	247:e
+俊	F	248:e
+峻	F	249:e
+春	F	250:e
+瞬	F	251:e
+竣	F	252:e
+舜	F	253:e
+駿	F	254:e
+准	F	255:e
+循	F	0:f
+旬	F	1:f
+楯	F	2:f
+殉	F	3:f
+淳	F	4:f
+準	F	5:f
+潤	F	6:f
+盾	F	7:f
+純	F	8:f
+巡	F	9:f
+遵	F	10:f
+醇	F	11:f
+順	F	12:f
+処	F	13:f
+初	F	14:f
+所	F	15:f
+暑	F	16:f
+曙	F	17:f
+渚	F	18:f
+庶	F	19:f
+緒	F	20:f
+署	F	21:f
+書	F	22:f
+薯	F	23:f
+藷	F	24:f
+諸	F	25:f
+助	F	26:f
+叙	F	27:f
+女	F	28:f
+序	F	29:f
+徐	F	30:f
+恕	F	31:f
+鋤	F	32:f
+除	F	33:f
+傷	F	34:f
+償	F	35:f
+勝	F	36:f
+匠	F	37:f
+升	F	38:f
+召	F	39:f
+哨	F	40:f
+商	F	41:f
+唱	F	42:f
+嘗	F	43:f
+奨	F	44:f
+妾	F	45:f
+娼	F	46:f
+宵	F	47:f
+将	F	48:f
+小	F	49:f
+少	F	50:f
+尚	F	51:f
+庄	F	52:f
+床	F	53:f
+廠	F	54:f
+彰	F	55:f
+承	F	56:f
+抄	F	57:f
+招	F	58:f
+掌	F	59:f
+捷	F	60:f
+昇	F	61:f
+昌	F	62:f
+昭	F	63:f
+晶	F	64:f
+松	F	65:f
+梢	F	66:f
+樟	F	67:f
+樵	F	68:f
+沼	F	69:f
+消	F	70:f
+渉	F	71:f
+湘	F	72:f
+焼	F	73:f
+焦	F	74:f
+照	F	75:f
+症	F	76:f
+省	F	77:f
+硝	F	78:f
+礁	F	79:f
+祥	F	80:f
+称	F	81:f
+章	F	82:f
+笑	F	83:f
+粧	F	84:f
+紹	F	85:f
+肖	F	86:f
+菖	F	87:f
+蒋	F	88:f
+蕉	F	89:f
+衝	F	90:f
+裳	F	91:f
+訟	F	92:f
+証	F	93:f
+詔	F	94:f
+詳	F	95:f
+象	F	96:f
+賞	F	97:f
+醤	F	98:f
+鉦	F	99:f
+鍾	F	100:f
+鐘	F	101:f
+障	F	102:f
+鞘	F	103:f
+上	F	104:f
+丈	F	105:f
+丞	F	106:f
+乗	F	107:f
+冗	F	108:f
+剰	F	109:f
+城	F	110:f
+場	F	111:f
+壌	F	112:f
+嬢	F	113:f
+常	F	114:f
+情	F	115:f
+擾	F	116:f
+条	F	117:f
+杖	F	118:f
+浄	F	119:f
+状	F	120:f
+畳	F	121:f
+穣	F	122:f
+蒸	F	123:f
+譲	F	124:f
+醸	F	125:f
+錠	F	126:f
+嘱	F	127:f
+埴	F	128:f
+飾	F	129:f
+拭	F	130:f
+植	F	131:f
+殖	F	132:f
+燭	F	133:f
+織	F	134:f
+職	F	135:f
+色	F	136:f
+触	F	137:f
+食	F	138:f
+蝕	F	139:f
+辱	F	140:f
+尻	F	141:f
+伸	F	142:f
+信	F	143:f
+侵	F	144:f
+唇	F	145:f
+娠	F	146:f
+寝	F	147:f
+審	F	148:f
+心	F	149:f
+慎	F	150:f
+振	F	151:f
+新	F	152:f
+晋	F	153:f
+森	F	154:f
+榛	F	155:f
+浸	F	156:f
+深	F	157:f
+申	F	158:f
+疹	F	159:f
+真	F	160:f
+神	F	161:f
+秦	F	162:f
+紳	F	163:f
+臣	F	164:f
+芯	F	165:f
+薪	F	166:f
+親	F	167:f
+診	F	168:f
+身	F	169:f
+辛	F	170:f
+進	F	171:f
+針	F	172:f
+震	F	173:f
+人	F	174:f
+仁	F	175:f
+刃	F	176:f
+塵	F	177:f
+壬	F	178:f
+尋	F	179:f
+甚	F	180:f
+尽	F	181:f
+腎	F	182:f
+訊	F	183:f
+迅	F	184:f
+陣	F	185:f
+靭	F	186:f
+笥	F	187:f
+諏	F	188:f
+須	F	189:f
+酢	F	190:f
+図	F	191:f
+厨	F	192:f
+逗	F	193:f
+吹	F	194:f
+垂	F	195:f
+帥	F	196:f
+推	F	197:f
+水	F	198:f
+炊	F	199:f
+睡	F	200:f
+粋	F	201:f
+翠	F	202:f
+衰	F	203:f
+遂	F	204:f
+酔	F	205:f
+錐	F	206:f
+錘	F	207:f
+随	F	208:f
+瑞	F	209:f
+髄	F	210:f
+崇	F	211:f
+嵩	F	212:f
+数	F	213:f
+枢	F	214:f
+趨	F	215:f
+雛	F	216:f
+据	F	217:f
+杉	F	218:f
+椙	F	219:f
+菅	F	220:f
+頗	F	221:f
+雀	F	222:f
+裾	F	223:f
+澄	F	224:f
+摺	F	225:f
+寸	F	226:f
+世	F	227:f
+瀬	F	228:f
+畝	F	229:f
+是	F	230:f
+凄	F	231:f
+制	F	232:f
+勢	F	233:f
+姓	F	234:f
+征	F	235:f
+性	F	236:f
+成	F	237:f
+政	F	238:f
+整	F	239:f
+星	F	240:f
+晴	F	241:f
+棲	F	242:f
+栖	F	243:f
+正	F	244:f
+清	F	245:f
+牲	F	246:f
+生	F	247:f
+盛	F	248:f
+精	F	249:f
+聖	F	250:f
+声	F	251:f
+製	F	252:f
+西	F	253:f
+誠	F	254:f
+誓	F	255:f
+請	F	0:g
+逝	F	1:g
+醒	F	2:g
+青	F	3:g
+静	F	4:g
+斉	F	5:g
+税	F	6:g
+脆	F	7:g
+隻	F	8:g
+席	F	9:g
+惜	F	10:g
+戚	F	11:g
+斥	F	12:g
+昔	F	13:g
+析	F	14:g
+石	F	15:g
+積	F	16:g
+籍	F	17:g
+績	F	18:g
+脊	F	19:g
+責	F	20:g
+赤	F	21:g
+跡	F	22:g
+蹟	F	23:g
+碩	F	24:g
+切	F	25:g
+拙	F	26:g
+接	F	27:g
+摂	F	28:g
+折	F	29:g
+設	F	30:g
+窃	F	31:g
+節	F	32:g
+説	F	33:g
+雪	F	34:g
+絶	F	35:g
+舌	F	36:g
+蝉	F	37:g
+仙	F	38:g
+先	F	39:g
+千	F	40:g
+占	F	41:g
+宣	F	42:g
+専	F	43:g
+尖	F	44:g
+川	F	45:g
+戦	F	46:g
+扇	F	47:g
+撰	F	48:g
+栓	F	49:g
+栴	F	50:g
+泉	F	51:g
+浅	F	52:g
+洗	F	53:g
+染	F	54:g
+潜	F	55:g
+煎	F	56:g
+煽	F	57:g
+旋	F	58:g
+穿	F	59:g
+箭	F	60:g
+線	F	61:g
+繊	F	62:g
+羨	F	63:g
+腺	F	64:g
+舛	F	65:g
+船	F	66:g
+薦	F	67:g
+詮	F	68:g
+賎	F	69:g
+践	F	70:g
+選	F	71:g
+遷	F	72:g
+銭	F	73:g
+銑	F	74:g
+閃	F	75:g
+鮮	F	76:g
+前	F	77:g
+善	F	78:g
+漸	F	79:g
+然	F	80:g
+全	F	81:g
+禅	F	82:g
+繕	F	83:g
+膳	F	84:g
+糎	F	85:g
+噌	F	86:g
+塑	F	87:g
+岨	F	88:g
+措	F	89:g
+曾	F	90:g
+曽	F	91:g
+楚	F	92:g
+狙	F	93:g
+疏	F	94:g
+疎	F	95:g
+礎	F	96:g
+祖	F	97:g
+租	F	98:g
+粗	F	99:g
+素	F	100:g
+組	F	101:g
+蘇	F	102:g
+訴	F	103:g
+阻	F	104:g
+遡	F	105:g
+鼠	F	106:g
+僧	F	107:g
+創	F	108:g
+双	F	109:g
+叢	F	110:g
+倉	F	111:g
+喪	F	112:g
+壮	F	113:g
+奏	F	114:g
+爽	F	115:g
+宋	F	116:g
+層	F	117:g
+匝	F	118:g
+惣	F	119:g
+想	F	120:g
+捜	F	121:g
+掃	F	122:g
+挿	F	123:g
+掻	F	124:g
+操	F	125:g
+早	F	126:g
+曹	F	127:g
+巣	F	128:g
+槍	F	129:g
+槽	F	130:g
+漕	F	131:g
+燥	F	132:g
+争	F	133:g
+痩	F	134:g
+相	F	135:g
+窓	F	136:g
+糟	F	137:g
+総	F	138:g
+綜	F	139:g
+聡	F	140:g
+草	F	141:g
+荘	F	142:g
+葬	F	143:g
+蒼	F	144:g
+藻	F	145:g
+装	F	146:g
+走	F	147:g
+送	F	148:g
+遭	F	149:g
+鎗	F	150:g
+霜	F	151:g
+騒	F	152:g
+像	F	153:g
+増	F	154:g
+憎	F	155:g
+臓	F	156:g
+蔵	F	157:g
+贈	F	158:g
+造	F	159:g
+促	F	160:g
+側	F	161:g
+則	F	162:g
+即	F	163:g
+息	F	164:g
+捉	F	165:g
+束	F	166:g
+測	F	167:g
+足	F	168:g
+速	F	169:g
+俗	F	170:g
+属	F	171:g
+賊	F	172:g
+族	F	173:g
+続	F	174:g
+卒	F	175:g
+袖	F	176:g
+其	F	177:g
+揃	F	178:g
+存	F	179:g
+孫	F	180:g
+尊	F	181:g
+損	F	182:g
+村	F	183:g
+遜	F	184:g
+他	F	185:g
+多	F	186:g
+太	F	187:g
+汰	F	188:g
+詑	F	189:g
+唾	F	190:g
+堕	F	191:g
+妥	F	192:g
+惰	F	193:g
+打	F	194:g
+柁	F	195:g
+舵	F	196:g
+楕	F	197:g
+陀	F	198:g
+駄	F	199:g
+騨	F	200:g
+体	F	201:g
+堆	F	202:g
+対	F	203:g
+耐	F	204:g
+岱	F	205:g
+帯	F	206:g
+待	F	207:g
+怠	F	208:g
+態	F	209:g
+戴	F	210:g
+替	F	211:g
+泰	F	212:g
+滞	F	213:g
+胎	F	214:g
+腿	F	215:g
+苔	F	216:g
+袋	F	217:g
+貸	F	218:g
+退	F	219:g
+逮	F	220:g
+隊	F	221:g
+黛	F	222:g
+鯛	F	223:g
+代	F	224:g
+台	F	225:g
+大	F	226:g
+第	F	227:g
+醍	F	228:g
+題	F	229:g
+鷹	F	230:g
+滝	F	231:g
+瀧	F	232:g
+卓	F	233:g
+啄	F	234:g
+宅	F	235:g
+托	F	236:g
+択	F	237:g
+拓	F	238:g
+沢	F	239:g
+濯	F	240:g
+琢	F	241:g
+託	F	242:g
+鐸	F	243:g
+濁	F	244:g
+諾	F	245:g
+茸	F	246:g
+凧	F	247:g
+蛸	F	248:g
+只	F	249:g
+叩	F	250:g
+但	F	251:g
+達	F	252:g
+辰	F	253:g
+奪	F	254:g
+脱	F	255:g
+巽	F	0:h
+竪	F	1:h
+辿	F	2:h
+棚	F	3:h
+谷	F	4:h
+狸	F	5:h
+鱈	F	6:h
+樽	F	7:h
+誰	F	8:h
+丹	F	9:h
+単	F	10:h
+嘆	F	11:h
+坦	F	12:h
+担	F	13:h
+探	F	14:h
+旦	F	15:h
+歎	F	16:h
+淡	F	17:h
+湛	F	18:h
+炭	F	19:h
+短	F	20:h
+端	F	21:h
+箪	F	22:h
+綻	F	23:h
+耽	F	24:h
+胆	F	25:h
+蛋	F	26:h
+誕	F	27:h
+鍛	F	28:h
+団	F	29:h
+壇	F	30:h
+弾	F	31:h
+断	F	32:h
+暖	F	33:h
+檀	F	34:h
+段	F	35:h
+男	F	36:h
+談	F	37:h
+値	F	38:h
+知	F	39:h
+地	F	40:h
+弛	F	41:h
+恥	F	42:h
+智	F	43:h
+池	F	44:h
+痴	F	45:h
+稚	F	46:h
+置	F	47:h
+致	F	48:h
+蜘	F	49:h
+遅	F	50:h
+馳	F	51:h
+築	F	52:h
+畜	F	53:h
+竹	F	54:h
+筑	F	55:h
+蓄	F	56:h
+逐	F	57:h
+秩	F	58:h
+窒	F	59:h
+茶	F	60:h
+嫡	F	61:h
+着	F	62:h
+中	F	63:h
+仲	F	64:h
+宙	F	65:h
+忠	F	66:h
+抽	F	67:h
+昼	F	68:h
+柱	F	69:h
+注	F	70:h
+虫	F	71:h
+衷	F	72:h
+註	F	73:h
+酎	F	74:h
+鋳	F	75:h
+駐	F	76:h
+樗	F	77:h
+瀦	F	78:h
+猪	F	79:h
+苧	F	80:h
+著	F	81:h
+貯	F	82:h
+丁	F	83:h
+兆	F	84:h
+凋	F	85:h
+喋	F	86:h
+寵	F	87:h
+帖	F	88:h
+帳	F	89:h
+庁	F	90:h
+弔	F	91:h
+張	F	92:h
+彫	F	93:h
+徴	F	94:h
+懲	F	95:h
+挑	F	96:h
+暢	F	97:h
+朝	F	98:h
+潮	F	99:h
+牒	F	100:h
+町	F	101:h
+眺	F	102:h
+聴	F	103:h
+脹	F	104:h
+腸	F	105:h
+蝶	F	106:h
+調	F	107:h
+諜	F	108:h
+超	F	109:h
+跳	F	110:h
+銚	F	111:h
+長	F	112:h
+頂	F	113:h
+鳥	F	114:h
+勅	F	115:h
+捗	F	116:h
+直	F	117:h
+朕	F	118:h
+沈	F	119:h
+珍	F	120:h
+賃	F	121:h
+鎮	F	122:h
+陳	F	123:h
+津	F	124:h
+墜	F	125:h
+椎	F	126:h
+槌	F	127:h
+追	F	128:h
+鎚	F	129:h
+痛	F	130:h
+通	F	131:h
+塚	F	132:h
+栂	F	133:h
+掴	F	134:h
+槻	F	135:h
+佃	F	136:h
+漬	F	137:h
+柘	F	138:h
+辻	F	139:h
+蔦	F	140:h
+綴	F	141:h
+鍔	F	142:h
+椿	F	143:h
+潰	F	144:h
+坪	F	145:h
+壷	F	146:h
+嬬	F	147:h
+紬	F	148:h
+爪	F	149:h
+吊	F	150:h
+釣	F	151:h
+鶴	F	152:h
+亭	F	153:h
+低	F	154:h
+停	F	155:h
+偵	F	156:h
+剃	F	157:h
+貞	F	158:h
+呈	F	159:h
+堤	F	160:h
+定	F	161:h
+帝	F	162:h
+底	F	163:h
+庭	F	164:h
+廷	F	165:h
+弟	F	166:h
+悌	F	167:h
+抵	F	168:h
+挺	F	169:h
+提	F	170:h
+梯	F	171:h
+汀	F	172:h
+碇	F	173:h
+禎	F	174:h
+程	F	175:h
+締	F	176:h
+艇	F	177:h
+訂	F	178:h
+諦	F	179:h
+蹄	F	180:h
+逓	F	181:h
+邸	F	182:h
+鄭	F	183:h
+釘	F	184:h
+鼎	F	185:h
+泥	F	186:h
+摘	F	187:h
+擢	F	188:h
+敵	F	189:h
+滴	F	190:h
+的	F	191:h
+笛	F	192:h
+適	F	193:h
+鏑	F	194:h
+溺	F	195:h
+哲	F	196:h
+徹	F	197:h
+撤	F	198:h
+轍	F	199:h
+迭	F	200:h
+鉄	F	201:h
+典	F	202:h
+填	F	203:h
+天	F	204:h
+展	F	205:h
+店	F	206:h
+添	F	207:h
+纏	F	208:h
+甜	F	209:h
+貼	F	210:h
+転	F	211:h
+顛	F	212:h
+点	F	213:h
+伝	F	214:h
+殿	F	215:h
+澱	F	216:h
+田	F	217:h
+電	F	218:h
+兎	F	219:h
+吐	F	220:h
+堵	F	221:h
+塗	F	222:h
+妬	F	223:h
+屠	F	224:h
+徒	F	225:h
+斗	F	226:h
+杜	F	227:h
+渡	F	228:h
+登	F	229:h
+菟	F	230:h
+賭	F	231:h
+途	F	232:h
+都	F	233:h
+鍍	F	234:h
+砥	F	235:h
+砺	F	236:h
+努	F	237:h
+度	F	238:h
+土	F	239:h
+奴	F	240:h
+怒	F	241:h
+倒	F	242:h
+党	F	243:h
+冬	F	244:h
+凍	F	245:h
+刀	F	246:h
+唐	F	247:h
+塔	F	248:h
+塘	F	249:h
+套	F	250:h
+宕	F	251:h
+島	F	252:h
+嶋	F	253:h
+悼	F	254:h
+投	F	255:h
+搭	F	0:i
+東	F	1:i
+桃	F	2:i
+梼	F	3:i
+棟	F	4:i
+盗	F	5:i
+淘	F	6:i
+湯	F	7:i
+涛	F	8:i
+灯	F	9:i
+燈	F	10:i
+当	F	11:i
+痘	F	12:i
+祷	F	13:i
+等	F	14:i
+答	F	15:i
+筒	F	16:i
+糖	F	17:i
+統	F	18:i
+到	F	19:i
+董	F	20:i
+蕩	F	21:i
+藤	F	22:i
+討	F	23:i
+謄	F	24:i
+豆	F	25:i
+踏	F	26:i
+逃	F	27:i
+透	F	28:i
+鐙	F	29:i
+陶	F	30:i
+頭	F	31:i
+騰	F	32:i
+闘	F	33:i
+働	F	34:i
+動	F	35:i
+同	F	36:i
+堂	F	37:i
+導	F	38:i
+憧	F	39:i
+撞	F	40:i
+洞	F	41:i
+瞳	F	42:i
+童	F	43:i
+胴	F	44:i
+萄	F	45:i
+道	F	46:i
+銅	F	47:i
+峠	F	48:i
+鴇	F	49:i
+匿	F	50:i
+得	F	51:i
+徳	F	52:i
+涜	F	53:i
+特	F	54:i
+督	F	55:i
+禿	F	56:i
+篤	F	57:i
+毒	F	58:i
+独	F	59:i
+読	F	60:i
+栃	F	61:i
+橡	F	62:i
+凸	F	63:i
+突	F	64:i
+椴	F	65:i
+届	F	66:i
+鳶	F	67:i
+苫	F	68:i
+寅	F	69:i
+酉	F	70:i
+瀞	F	71:i
+噸	F	72:i
+屯	F	73:i
+惇	F	74:i
+敦	F	75:i
+沌	F	76:i
+豚	F	77:i
+遁	F	78:i
+頓	F	79:i
+呑	F	80:i
+曇	F	81:i
+鈍	F	82:i
+奈	F	83:i
+那	F	84:i
+内	F	85:i
+乍	F	86:i
+凪	F	87:i
+薙	F	88:i
+謎	F	89:i
+灘	F	90:i
+捺	F	91:i
+鍋	F	92:i
+楢	F	93:i
+馴	F	94:i
+縄	F	95:i
+畷	F	96:i
+南	F	97:i
+楠	F	98:i
+軟	F	99:i
+難	F	100:i
+汝	F	101:i
+二	F	102:i
+尼	F	103:i
+弐	F	104:i
+迩	F	105:i
+匂	F	106:i
+賑	F	107:i
+肉	F	108:i
+虹	F	109:i
+廿	F	110:i
+日	F	111:i
+乳	F	112:i
+入	F	113:i
+如	F	114:i
+尿	F	115:i
+韮	F	116:i
+任	F	117:i
+妊	F	118:i
+忍	F	119:i
+認	F	120:i
+濡	F	121:i
+禰	F	122:i
+祢	F	123:i
+寧	F	124:i
+葱	F	125:i
+猫	F	126:i
+熱	F	127:i
+年	F	128:i
+念	F	129:i
+捻	F	130:i
+撚	F	131:i
+燃	F	132:i
+粘	F	133:i
+乃	F	134:i
+廼	F	135:i
+之	F	136:i
+埜	F	137:i
+嚢	F	138:i
+悩	F	139:i
+濃	F	140:i
+納	F	141:i
+能	F	142:i
+脳	F	143:i
+膿	F	144:i
+農	F	145:i
+覗	F	146:i
+蚤	F	147:i
+巴	F	148:i
+把	F	149:i
+播	F	150:i
+覇	F	151:i
+杷	F	152:i
+波	F	153:i
+派	F	154:i
+琶	F	155:i
+破	F	156:i
+婆	F	157:i
+罵	F	158:i
+芭	F	159:i
+馬	F	160:i
+俳	F	161:i
+廃	F	162:i
+拝	F	163:i
+排	F	164:i
+敗	F	165:i
+杯	F	166:i
+盃	F	167:i
+牌	F	168:i
+背	F	169:i
+肺	F	170:i
+輩	F	171:i
+配	F	172:i
+倍	F	173:i
+培	F	174:i
+媒	F	175:i
+梅	F	176:i
+楳	F	177:i
+煤	F	178:i
+狽	F	179:i
+買	F	180:i
+売	F	181:i
+賠	F	182:i
+陪	F	183:i
+這	F	184:i
+蝿	F	185:i
+秤	F	186:i
+矧	F	187:i
+萩	F	188:i
+伯	F	189:i
+剥	F	190:i
+博	F	191:i
+拍	F	192:i
+柏	F	193:i
+泊	F	194:i
+白	F	195:i
+箔	F	196:i
+粕	F	197:i
+舶	F	198:i
+薄	F	199:i
+迫	F	200:i
+曝	F	201:i
+漠	F	202:i
+爆	F	203:i
+縛	F	204:i
+莫	F	205:i
+駁	F	206:i
+麦	F	207:i
+函	F	208:i
+箱	F	209:i
+硲	F	210:i
+箸	F	211:i
+肇	F	212:i
+筈	F	213:i
+櫨	F	214:i
+幡	F	215:i
+肌	F	216:i
+畑	F	217:i
+畠	F	218:i
+八	F	219:i
+鉢	F	220:i
+溌	F	221:i
+発	F	222:i
+醗	F	223:i
+髪	F	224:i
+伐	F	225:i
+罰	F	226:i
+抜	F	227:i
+筏	F	228:i
+閥	F	229:i
+鳩	F	230:i
+噺	F	231:i
+塙	F	232:i
+蛤	F	233:i
+隼	F	234:i
+伴	F	235:i
+判	F	236:i
+半	F	237:i
+反	F	238:i
+叛	F	239:i
+帆	F	240:i
+搬	F	241:i
+斑	F	242:i
+板	F	243:i
+氾	F	244:i
+汎	F	245:i
+版	F	246:i
+犯	F	247:i
+班	F	248:i
+畔	F	249:i
+繁	F	250:i
+般	F	251:i
+藩	F	252:i
+販	F	253:i
+範	F	254:i
+釆	F	255:i
+煩	F	0:j
+頒	F	1:j
+飯	F	2:j
+挽	F	3:j
+晩	F	4:j
+番	F	5:j
+盤	F	6:j
+磐	F	7:j
+蕃	F	8:j
+蛮	F	9:j
+匪	F	10:j
+卑	F	11:j
+否	F	12:j
+妃	F	13:j
+庇	F	14:j
+彼	F	15:j
+悲	F	16:j
+扉	F	17:j
+批	F	18:j
+披	F	19:j
+斐	F	20:j
+比	F	21:j
+泌	F	22:j
+疲	F	23:j
+皮	F	24:j
+碑	F	25:j
+秘	F	26:j
+緋	F	27:j
+罷	F	28:j
+肥	F	29:j
+被	F	30:j
+誹	F	31:j
+費	F	32:j
+避	F	33:j
+非	F	34:j
+飛	F	35:j
+樋	F	36:j
+簸	F	37:j
+備	F	38:j
+尾	F	39:j
+微	F	40:j
+枇	F	41:j
+毘	F	42:j
+琵	F	43:j
+眉	F	44:j
+美	F	45:j
+鼻	F	46:j
+柊	F	47:j
+稗	F	48:j
+匹	F	49:j
+疋	F	50:j
+髭	F	51:j
+彦	F	52:j
+膝	F	53:j
+菱	F	54:j
+肘	F	55:j
+弼	F	56:j
+必	F	57:j
+畢	F	58:j
+筆	F	59:j
+逼	F	60:j
+桧	F	61:j
+姫	F	62:j
+媛	F	63:j
+紐	F	64:j
+百	F	65:j
+謬	F	66:j
+俵	F	67:j
+彪	F	68:j
+標	F	69:j
+氷	F	70:j
+漂	F	71:j
+瓢	F	72:j
+票	F	73:j
+表	F	74:j
+評	F	75:j
+豹	F	76:j
+廟	F	77:j
+描	F	78:j
+病	F	79:j
+秒	F	80:j
+苗	F	81:j
+錨	F	82:j
+鋲	F	83:j
+蒜	F	84:j
+蛭	F	85:j
+鰭	F	86:j
+品	F	87:j
+彬	F	88:j
+斌	F	89:j
+浜	F	90:j
+瀕	F	91:j
+貧	F	92:j
+賓	F	93:j
+頻	F	94:j
+敏	F	95:j
+瓶	F	96:j
+不	F	97:j
+付	F	98:j
+埠	F	99:j
+夫	F	100:j
+婦	F	101:j
+富	F	102:j
+冨	F	103:j
+布	F	104:j
+府	F	105:j
+怖	F	106:j
+扶	F	107:j
+敷	F	108:j
+斧	F	109:j
+普	F	110:j
+浮	F	111:j
+父	F	112:j
+符	F	113:j
+腐	F	114:j
+膚	F	115:j
+芙	F	116:j
+譜	F	117:j
+負	F	118:j
+賦	F	119:j
+赴	F	120:j
+阜	F	121:j
+附	F	122:j
+侮	F	123:j
+撫	F	124:j
+武	F	125:j
+舞	F	126:j
+葡	F	127:j
+蕪	F	128:j
+部	F	129:j
+封	F	130:j
+楓	F	131:j
+風	F	132:j
+葺	F	133:j
+蕗	F	134:j
+伏	F	135:j
+副	F	136:j
+復	F	137:j
+幅	F	138:j
+服	F	139:j
+福	F	140:j
+腹	F	141:j
+複	F	142:j
+覆	F	143:j
+淵	F	144:j
+弗	F	145:j
+払	F	146:j
+沸	F	147:j
+仏	F	148:j
+物	F	149:j
+鮒	F	150:j
+分	F	151:j
+吻	F	152:j
+噴	F	153:j
+墳	F	154:j
+憤	F	155:j
+扮	F	156:j
+焚	F	157:j
+奮	F	158:j
+粉	F	159:j
+糞	F	160:j
+紛	F	161:j
+雰	F	162:j
+文	F	163:j
+聞	F	164:j
+丙	F	165:j
+併	F	166:j
+兵	F	167:j
+塀	F	168:j
+幣	F	169:j
+平	F	170:j
+弊	F	171:j
+柄	F	172:j
+並	F	173:j
+蔽	F	174:j
+閉	F	175:j
+陛	F	176:j
+米	F	177:j
+頁	F	178:j
+僻	F	179:j
+壁	F	180:j
+癖	F	181:j
+碧	F	182:j
+別	F	183:j
+瞥	F	184:j
+蔑	F	185:j
+箆	F	186:j
+偏	F	187:j
+変	F	188:j
+片	F	189:j
+篇	F	190:j
+編	F	191:j
+辺	F	192:j
+返	F	193:j
+遍	F	194:j
+便	F	195:j
+勉	F	196:j
+娩	F	197:j
+弁	F	198:j
+鞭	F	199:j
+保	F	200:j
+舗	F	201:j
+鋪	F	202:j
+圃	F	203:j
+捕	F	204:j
+歩	F	205:j
+甫	F	206:j
+補	F	207:j
+輔	F	208:j
+穂	F	209:j
+募	F	210:j
+墓	F	211:j
+慕	F	212:j
+戊	F	213:j
+暮	F	214:j
+母	F	215:j
+簿	F	216:j
+菩	F	217:j
+倣	F	218:j
+俸	F	219:j
+包	F	220:j
+呆	F	221:j
+報	F	222:j
+奉	F	223:j
+宝	F	224:j
+峰	F	225:j
+峯	F	226:j
+崩	F	227:j
+庖	F	228:j
+抱	F	229:j
+捧	F	230:j
+放	F	231:j
+方	F	232:j
+朋	F	233:j
+法	F	234:j
+泡	F	235:j
+烹	F	236:j
+砲	F	237:j
+縫	F	238:j
+胞	F	239:j
+芳	F	240:j
+萌	F	241:j
+蓬	F	242:j
+蜂	F	243:j
+褒	F	244:j
+訪	F	245:j
+豊	F	246:j
+邦	F	247:j
+鋒	F	248:j
+飽	F	249:j
+鳳	F	250:j
+鵬	F	251:j
+乏	F	252:j
+亡	F	253:j
+傍	F	254:j
+剖	F	255:j
+坊	F	0:k
+妨	F	1:k
+帽	F	2:k
+忘	F	3:k
+忙	F	4:k
+房	F	5:k
+暴	F	6:k
+望	F	7:k
+某	F	8:k
+棒	F	9:k
+冒	F	10:k
+紡	F	11:k
+肪	F	12:k
+膨	F	13:k
+謀	F	14:k
+貌	F	15:k
+貿	F	16:k
+鉾	F	17:k
+防	F	18:k
+吠	F	19:k
+頬	F	20:k
+北	F	21:k
+僕	F	22:k
+卜	F	23:k
+墨	F	24:k
+撲	F	25:k
+朴	F	26:k
+牧	F	27:k
+睦	F	28:k
+穆	F	29:k
+釦	F	30:k
+勃	F	31:k
+没	F	32:k
+殆	F	33:k
+堀	F	34:k
+幌	F	35:k
+奔	F	36:k
+本	F	37:k
+翻	F	38:k
+凡	F	39:k
+盆	F	40:k
+摩	F	41:k
+磨	F	42:k
+魔	F	43:k
+麻	F	44:k
+埋	F	45:k
+妹	F	46:k
+昧	F	47:k
+枚	F	48:k
+毎	F	49:k
+哩	F	50:k
+槙	F	51:k
+幕	F	52:k
+膜	F	53:k
+枕	F	54:k
+鮪	F	55:k
+柾	F	56:k
+鱒	F	57:k
+桝	F	58:k
+亦	F	59:k
+俣	F	60:k
+又	F	61:k
+抹	F	62:k
+末	F	63:k
+沫	F	64:k
+迄	F	65:k
+侭	F	66:k
+繭	F	67:k
+麿	F	68:k
+万	F	69:k
+慢	F	70:k
+満	F	71:k
+漫	F	72:k
+蔓	F	73:k
+味	F	74:k
+未	F	75:k
+魅	F	76:k
+巳	F	77:k
+箕	F	78:k
+岬	F	79:k
+密	F	80:k
+蜜	F	81:k
+湊	F	82:k
+蓑	F	83:k
+稔	F	84:k
+脈	F	85:k
+妙	F	86:k
+粍	F	87:k
+民	F	88:k
+眠	F	89:k
+務	F	90:k
+夢	F	91:k
+無	F	92:k
+牟	F	93:k
+矛	F	94:k
+霧	F	95:k
+鵡	F	96:k
+椋	F	97:k
+婿	F	98:k
+娘	F	99:k
+冥	F	100:k
+名	F	101:k
+命	F	102:k
+明	F	103:k
+盟	F	104:k
+迷	F	105:k
+銘	F	106:k
+鳴	F	107:k
+姪	F	108:k
+牝	F	109:k
+滅	F	110:k
+免	F	111:k
+棉	F	112:k
+綿	F	113:k
+緬	F	114:k
+面	F	115:k
+麺	F	116:k
+摸	F	117:k
+模	F	118:k
+茂	F	119:k
+妄	F	120:k
+孟	F	121:k
+毛	F	122:k
+猛	F	123:k
+盲	F	124:k
+網	F	125:k
+耗	F	126:k
+蒙	F	127:k
+儲	F	128:k
+木	F	129:k
+黙	F	130:k
+目	F	131:k
+杢	F	132:k
+勿	F	133:k
+餅	F	134:k
+尤	F	135:k
+戻	F	136:k
+籾	F	137:k
+貰	F	138:k
+問	F	139:k
+悶	F	140:k
+紋	F	141:k
+門	F	142:k
+匁	F	143:k
+也	F	144:k
+冶	F	145:k
+夜	F	146:k
+爺	F	147:k
+耶	F	148:k
+野	F	149:k
+弥	F	150:k
+矢	F	151:k
+厄	F	152:k
+役	F	153:k
+約	F	154:k
+薬	F	155:k
+訳	F	156:k
+躍	F	157:k
+靖	F	158:k
+柳	F	159:k
+薮	F	160:k
+鑓	F	161:k
+愉	F	162:k
+愈	F	163:k
+油	F	164:k
+癒	F	165:k
+諭	F	166:k
+輸	F	167:k
+唯	F	168:k
+佑	F	169:k
+優	F	170:k
+勇	F	171:k
+友	F	172:k
+宥	F	173:k
+幽	F	174:k
+悠	F	175:k
+憂	F	176:k
+揖	F	177:k
+有	F	178:k
+柚	F	179:k
+湧	F	180:k
+涌	F	181:k
+猶	F	182:k
+猷	F	183:k
+由	F	184:k
+祐	F	185:k
+裕	F	186:k
+誘	F	187:k
+遊	F	188:k
+邑	F	189:k
+郵	F	190:k
+雄	F	191:k
+融	F	192:k
+夕	F	193:k
+予	F	194:k
+余	F	195:k
+与	F	196:k
+誉	F	197:k
+輿	F	198:k
+預	F	199:k
+傭	F	200:k
+幼	F	201:k
+妖	F	202:k
+容	F	203:k
+庸	F	204:k
+揚	F	205:k
+揺	F	206:k
+擁	F	207:k
+曜	F	208:k
+楊	F	209:k
+様	F	210:k
+洋	F	211:k
+溶	F	212:k
+熔	F	213:k
+用	F	214:k
+窯	F	215:k
+羊	F	216:k
+耀	F	217:k
+葉	F	218:k
+蓉	F	219:k
+要	F	220:k
+謡	F	221:k
+踊	F	222:k
+遥	F	223:k
+陽	F	224:k
+養	F	225:k
+慾	F	226:k
+抑	F	227:k
+欲	F	228:k
+沃	F	229:k
+浴	F	230:k
+翌	F	231:k
+翼	F	232:k
+淀	F	233:k
+羅	F	234:k
+螺	F	235:k
+裸	F	236:k
+来	F	237:k
+莱	F	238:k
+頼	F	239:k
+雷	F	240:k
+洛	F	241:k
+絡	F	242:k
+落	F	243:k
+酪	F	244:k
+乱	F	245:k
+卵	F	246:k
+嵐	F	247:k
+欄	F	248:k
+濫	F	249:k
+藍	F	250:k
+蘭	F	251:k
+覧	F	252:k
+利	F	253:k
+吏	F	254:k
+履	F	255:k
+李	F	0:l
+梨	F	1:l
+理	F	2:l
+璃	F	3:l
+痢	F	4:l
+裏	F	5:l
+裡	F	6:l
+里	F	7:l
+離	F	8:l
+陸	F	9:l
+律	F	10:l
+率	F	11:l
+立	F	12:l
+葎	F	13:l
+掠	F	14:l
+略	F	15:l
+劉	F	16:l
+流	F	17:l
+溜	F	18:l
+琉	F	19:l
+留	F	20:l
+硫	F	21:l
+粒	F	22:l
+隆	F	23:l
+竜	F	24:l
+龍	F	25:l
+侶	F	26:l
+慮	F	27:l
+旅	F	28:l
+虜	F	29:l
+了	F	30:l
+亮	F	31:l
+僚	F	32:l
+両	F	33:l
+凌	F	34:l
+寮	F	35:l
+料	F	36:l
+梁	F	37:l
+涼	F	38:l
+猟	F	39:l
+療	F	40:l
+瞭	F	41:l
+稜	F	42:l
+糧	F	43:l
+良	F	44:l
+諒	F	45:l
+遼	F	46:l
+量	F	47:l
+陵	F	48:l
+領	F	49:l
+力	F	50:l
+緑	F	51:l
+倫	F	52:l
+厘	F	53:l
+林	F	54:l
+淋	F	55:l
+燐	F	56:l
+琳	F	57:l
+臨	F	58:l
+輪	F	59:l
+隣	F	60:l
+鱗	F	61:l
+麟	F	62:l
+瑠	F	63:l
+塁	F	64:l
+涙	F	65:l
+累	F	66:l
+類	F	67:l
+令	F	68:l
+伶	F	69:l
+例	F	70:l
+冷	F	71:l
+励	F	72:l
+嶺	F	73:l
+怜	F	74:l
+玲	F	75:l
+礼	F	76:l
+苓	F	77:l
+鈴	F	78:l
+隷	F	79:l
+零	F	80:l
+霊	F	81:l
+麗	F	82:l
+齢	F	83:l
+暦	F	84:l
+歴	F	85:l
+列	F	86:l
+劣	F	87:l
+烈	F	88:l
+裂	F	89:l
+廉	F	90:l
+恋	F	91:l
+憐	F	92:l
+漣	F	93:l
+煉	F	94:l
+簾	F	95:l
+練	F	96:l
+聯	F	97:l
+蓮	F	98:l
+連	F	99:l
+錬	F	100:l
+呂	F	101:l
+魯	F	102:l
+櫓	F	103:l
+炉	F	104:l
+賂	F	105:l
+路	F	106:l
+露	F	107:l
+労	F	108:l
+婁	F	109:l
+廊	F	110:l
+弄	F	111:l
+朗	F	112:l
+楼	F	113:l
+榔	F	114:l
+浪	F	115:l
+漏	F	116:l
+牢	F	117:l
+狼	F	118:l
+篭	F	119:l
+老	F	120:l
+聾	F	121:l
+蝋	F	122:l
+郎	F	123:l
+六	F	124:l
+麓	F	125:l
+禄	F	126:l
+肋	F	127:l
+録	F	128:l
+論	F	129:l
+倭	F	130:l
+和	F	131:l
+話	F	132:l
+歪	F	133:l
+賄	F	134:l
+脇	F	135:l
+惑	F	136:l
+枠	F	137:l
+鷲	F	138:l
+亙	F	139:l
+亘	F	140:l
+鰐	F	141:l
+詫	F	142:l
+藁	F	143:l
+蕨	F	144:l
+椀	F	145:l
+湾	F	146:l
+碗	F	147:l
+腕	F	148:l
+弌	F	0:m
+丐	F	1:m
+丕	F	2:m
+个	F	3:m
+丱	F	4:m
+丶	F	5:m
+丼	F	6:m
+丿	F	7:m
+乂	F	8:m
+乖	F	9:m
+乘	F	10:m
+亂	F	11:m
+亅	F	12:m
+豫	F	13:m
+亊	F	14:m
+舒	F	15:m
+弍	F	16:m
+于	F	17:m
+亞	F	18:m
+亟	F	19:m
+亠	F	20:m
+亢	F	21:m
+亰	F	22:m
+亳	F	23:m
+亶	F	24:m
+从	F	25:m
+仍	F	26:m
+仄	F	27:m
+仆	F	28:m
+仂	F	29:m
+仗	F	30:m
+仞	F	31:m
+仭	F	32:m
+仟	F	33:m
+价	F	34:m
+伉	F	35:m
+佚	F	36:m
+估	F	37:m
+佛	F	38:m
+佝	F	39:m
+佗	F	40:m
+佇	F	41:m
+佶	F	42:m
+侈	F	43:m
+侏	F	44:m
+侘	F	45:m
+佻	F	46:m
+佩	F	47:m
+佰	F	48:m
+侑	F	49:m
+佯	F	50:m
+來	F	51:m
+侖	F	52:m
+儘	F	53:m
+俔	F	54:m
+俟	F	55:m
+俎	F	56:m
+俘	F	57:m
+俛	F	58:m
+俑	F	59:m
+俚	F	60:m
+俐	F	61:m
+俤	F	62:m
+俥	F	63:m
+倚	F	64:m
+倨	F	65:m
+倔	F	66:m
+倪	F	67:m
+倥	F	68:m
+倅	F	69:m
+伜	F	70:m
+俶	F	71:m
+倡	F	72:m
+倩	F	73:m
+倬	F	74:m
+俾	F	75:m
+俯	F	76:m
+們	F	77:m
+倆	F	78:m
+偃	F	79:m
+假	F	80:m
+會	F	81:m
+偕	F	82:m
+偐	F	83:m
+偈	F	84:m
+做	F	85:m
+偖	F	86:m
+偬	F	87:m
+偸	F	88:m
+傀	F	89:m
+傚	F	90:m
+傅	F	91:m
+傴	F	92:m
+傲	F	93:m
+僉	F	94:m
+僊	F	95:m
+傳	F	96:m
+僂	F	97:m
+僖	F	98:m
+僞	F	99:m
+僥	F	100:m
+僭	F	101:m
+僣	F	102:m
+僮	F	103:m
+價	F	104:m
+僵	F	105:m
+儉	F	106:m
+儁	F	107:m
+儂	F	108:m
+儖	F	109:m
+儕	F	110:m
+儔	F	111:m
+儚	F	112:m
+儡	F	113:m
+儺	F	114:m
+儷	F	115:m
+儼	F	116:m
+儻	F	117:m
+儿	F	118:m
+兀	F	119:m
+兒	F	120:m
+兌	F	121:m
+兔	F	122:m
+兢	F	123:m
+竸	F	124:m
+兩	F	125:m
+兪	F	126:m
+兮	F	127:m
+冀	F	128:m
+冂	F	129:m
+囘	F	130:m
+册	F	131:m
+冉	F	132:m
+冏	F	133:m
+冑	F	134:m
+冓	F	135:m
+冕	F	136:m
+冖	F	137:m
+冤	F	138:m
+冦	F	139:m
+冢	F	140:m
+冩	F	141:m
+冪	F	142:m
+冫	F	143:m
+决	F	144:m
+冱	F	145:m
+冲	F	146:m
+冰	F	147:m
+况	F	148:m
+冽	F	149:m
+凅	F	150:m
+凉	F	151:m
+凛	F	152:m
+几	F	153:m
+處	F	154:m
+凩	F	155:m
+凭	F	156:m
+凰	F	157:m
+凵	F	158:m
+凾	F	159:m
+刄	F	160:m
+刋	F	161:m
+刔	F	162:m
+刎	F	163:m
+刧	F	164:m
+刪	F	165:m
+刮	F	166:m
+刳	F	167:m
+刹	F	168:m
+剏	F	169:m
+剄	F	170:m
+剋	F	171:m
+剌	F	172:m
+剞	F	173:m
+剔	F	174:m
+剪	F	175:m
+剴	F	176:m
+剩	F	177:m
+剳	F	178:m
+剿	F	179:m
+剽	F	180:m
+劍	F	181:m
+劔	F	182:m
+劒	F	183:m
+剱	F	184:m
+劈	F	185:m
+劑	F	186:m
+辨	F	187:m
+辧	F	188:m
+劬	F	189:m
+劭	F	190:m
+劼	F	191:m
+劵	F	192:m
+勁	F	193:m
+勍	F	194:m
+勗	F	195:m
+勞	F	196:m
+勣	F	197:m
+勦	F	198:m
+飭	F	199:m
+勠	F	200:m
+勳	F	201:m
+勵	F	202:m
+勸	F	203:m
+勹	F	204:m
+匆	F	205:m
+匈	F	206:m
+甸	F	207:m
+匍	F	208:m
+匐	F	209:m
+匏	F	210:m
+匕	F	211:m
+匚	F	212:m
+匣	F	213:m
+匯	F	214:m
+匱	F	215:m
+匳	F	216:m
+匸	F	217:m
+區	F	218:m
+卆	F	219:m
+卅	F	220:m
+丗	F	221:m
+卉	F	222:m
+卍	F	223:m
+凖	F	224:m
+卞	F	225:m
+卩	F	226:m
+卮	F	227:m
+夘	F	228:m
+卻	F	229:m
+卷	F	230:m
+厂	F	231:m
+厖	F	232:m
+厠	F	233:m
+厦	F	234:m
+厥	F	235:m
+厮	F	236:m
+厰	F	237:m
+厶	F	238:m
+參	F	239:m
+簒	F	240:m
+雙	F	241:m
+叟	F	242:m
+曼	F	243:m
+燮	F	244:m
+叮	F	245:m
+叨	F	246:m
+叭	F	247:m
+叺	F	248:m
+吁	F	249:m
+吽	F	250:m
+呀	F	251:m
+听	F	252:m
+吭	F	253:m
+吼	F	254:m
+吮	F	255:m
+吶	F	0:n
+吩	F	1:n
+吝	F	2:n
+呎	F	3:n
+咏	F	4:n
+呵	F	5:n
+咎	F	6:n
+呟	F	7:n
+呱	F	8:n
+呷	F	9:n
+呰	F	10:n
+咒	F	11:n
+呻	F	12:n
+咀	F	13:n
+呶	F	14:n
+咄	F	15:n
+咐	F	16:n
+咆	F	17:n
+哇	F	18:n
+咢	F	19:n
+咸	F	20:n
+咥	F	21:n
+咬	F	22:n
+哄	F	23:n
+哈	F	24:n
+咨	F	25:n
+咫	F	26:n
+哂	F	27:n
+咤	F	28:n
+咾	F	29:n
+咼	F	30:n
+哘	F	31:n
+哥	F	32:n
+哦	F	33:n
+唏	F	34:n
+唔	F	35:n
+哽	F	36:n
+哮	F	37:n
+哭	F	38:n
+哺	F	39:n
+哢	F	40:n
+唹	F	41:n
+啀	F	42:n
+啣	F	43:n
+啌	F	44:n
+售	F	45:n
+啜	F	46:n
+啅	F	47:n
+啖	F	48:n
+啗	F	49:n
+唸	F	50:n
+唳	F	51:n
+啝	F	52:n
+喙	F	53:n
+喀	F	54:n
+咯	F	55:n
+喊	F	56:n
+喟	F	57:n
+啻	F	58:n
+啾	F	59:n
+喘	F	60:n
+喞	F	61:n
+單	F	62:n
+啼	F	63:n
+喃	F	64:n
+喩	F	65:n
+喇	F	66:n
+喨	F	67:n
+嗚	F	68:n
+嗅	F	69:n
+嗟	F	70:n
+嗄	F	71:n
+嗜	F	72:n
+嗤	F	73:n
+嗔	F	74:n
+嘔	F	75:n
+嗷	F	76:n
+嘖	F	77:n
+嗾	F	78:n
+嗽	F	79:n
+嘛	F	80:n
+嗹	F	81:n
+噎	F	82:n
+噐	F	83:n
+營	F	84:n
+嘴	F	85:n
+嘶	F	86:n
+嘲	F	87:n
+嘸	F	88:n
+噫	F	89:n
+噤	F	90:n
+嘯	F	91:n
+噬	F	92:n
+噪	F	93:n
+嚆	F	94:n
+嚀	F	95:n
+嚊	F	96:n
+嚠	F	97:n
+嚔	F	98:n
+嚏	F	99:n
+嚥	F	100:n
+嚮	F	101:n
+嚶	F	102:n
+嚴	F	103:n
+囂	F	104:n
+嚼	F	105:n
+囁	F	106:n
+囃	F	107:n
+囀	F	108:n
+囈	F	109:n
+囎	F	110:n
+囑	F	111:n
+囓	F	112:n
+囗	F	113:n
+囮	F	114:n
+囹	F	115:n
+圀	F	116:n
+囿	F	117:n
+圄	F	118:n
+圉	F	119:n
+圈	F	120:n
+國	F	121:n
+圍	F	122:n
+圓	F	123:n
+團	F	124:n
+圖	F	125:n
+嗇	F	126:n
+圜	F	127:n
+圦	F	128:n
+圷	F	129:n
+圸	F	130:n
+坎	F	131:n
+圻	F	132:n
+址	F	133:n
+坏	F	134:n
+坩	F	135:n
+埀	F	136:n
+垈	F	137:n
+坡	F	138:n
+坿	F	139:n
+垉	F	140:n
+垓	F	141:n
+垠	F	142:n
+垳	F	143:n
+垤	F	144:n
+垪	F	145:n
+垰	F	146:n
+埃	F	147:n
+埆	F	148:n
+埔	F	149:n
+埒	F	150:n
+埓	F	151:n
+堊	F	152:n
+埖	F	153:n
+埣	F	154:n
+堋	F	155:n
+堙	F	156:n
+堝	F	157:n
+塲	F	158:n
+堡	F	159:n
+塢	F	160:n
+塋	F	161:n
+塰	F	162:n
+毀	F	163:n
+塒	F	164:n
+堽	F	165:n
+塹	F	166:n
+墅	F	167:n
+墹	F	168:n
+墟	F	169:n
+墫	F	170:n
+墺	F	171:n
+壞	F	172:n
+墻	F	173:n
+墸	F	174:n
+墮	F	175:n
+壅	F	176:n
+壓	F	177:n
+壑	F	178:n
+壗	F	179:n
+壙	F	180:n
+壘	F	181:n
+壥	F	182:n
+壜	F	183:n
+壤	F	184:n
+壟	F	185:n
+壯	F	186:n
+壺	F	187:n
+壹	F	188:n
+壻	F	189:n
+壼	F	190:n
+壽	F	191:n
+夂	F	192:n
+夊	F	193:n
+夐	F	194:n
+夛	F	195:n
+梦	F	196:n
+夥	F	197:n
+夬	F	198:n
+夭	F	199:n
+夲	F	200:n
+夸	F	201:n
+夾	F	202:n
+竒	F	203:n
+奕	F	204:n
+奐	F	205:n
+奎	F	206:n
+奚	F	207:n
+奘	F	208:n
+奢	F	209:n
+奠	F	210:n
+奧	F	211:n
+奬	F	212:n
+奩	F	213:n
+奸	F	214:n
+妁	F	215:n
+妝	F	216:n
+佞	F	217:n
+侫	F	218:n
+妣	F	219:n
+妲	F	220:n
+姆	F	221:n
+姨	F	222:n
+姜	F	223:n
+妍	F	224:n
+姙	F	225:n
+姚	F	226:n
+娥	F	227:n
+娟	F	228:n
+娑	F	229:n
+娜	F	230:n
+娉	F	231:n
+娚	F	232:n
+婀	F	233:n
+婬	F	234:n
+婉	F	235:n
+娵	F	236:n
+娶	F	237:n
+婢	F	238:n
+婪	F	239:n
+媚	F	240:n
+媼	F	241:n
+媾	F	242:n
+嫋	F	243:n
+嫂	F	244:n
+媽	F	245:n
+嫣	F	246:n
+嫗	F	247:n
+嫦	F	248:n
+嫩	F	249:n
+嫖	F	250:n
+嫺	F	251:n
+嫻	F	252:n
+嬌	F	253:n
+嬋	F	254:n
+嬖	F	255:n
+嬲	F	0:o
+嫐	F	1:o
+嬪	F	2:o
+嬶	F	3:o
+嬾	F	4:o
+孃	F	5:o
+孅	F	6:o
+孀	F	7:o
+孑	F	8:o
+孕	F	9:o
+孚	F	10:o
+孛	F	11:o
+孥	F	12:o
+孩	F	13:o
+孰	F	14:o
+孳	F	15:o
+孵	F	16:o
+學	F	17:o
+斈	F	18:o
+孺	F	19:o
+宀	F	20:o
+它	F	21:o
+宦	F	22:o
+宸	F	23:o
+寃	F	24:o
+寇	F	25:o
+寉	F	26:o
+寔	F	27:o
+寐	F	28:o
+寤	F	29:o
+實	F	30:o
+寢	F	31:o
+寞	F	32:o
+寥	F	33:o
+寫	F	34:o
+寰	F	35:o
+寶	F	36:o
+寳	F	37:o
+尅	F	38:o
+將	F	39:o
+專	F	40:o
+對	F	41:o
+尓	F	42:o
+尠	F	43:o
+尢	F	44:o
+尨	F	45:o
+尸	F	46:o
+尹	F	47:o
+屁	F	48:o
+屆	F	49:o
+屎	F	50:o
+屓	F	51:o
+屐	F	52:o
+屏	F	53:o
+孱	F	54:o
+屬	F	55:o
+屮	F	56:o
+乢	F	57:o
+屶	F	58:o
+屹	F	59:o
+岌	F	60:o
+岑	F	61:o
+岔	F	62:o
+妛	F	63:o
+岫	F	64:o
+岻	F	65:o
+岶	F	66:o
+岼	F	67:o
+岷	F	68:o
+峅	F	69:o
+岾	F	70:o
+峇	F	71:o
+峙	F	72:o
+峩	F	73:o
+峽	F	74:o
+峺	F	75:o
+峭	F	76:o
+嶌	F	77:o
+峪	F	78:o
+崋	F	79:o
+崕	F	80:o
+崗	F	81:o
+嵜	F	82:o
+崟	F	83:o
+崛	F	84:o
+崑	F	85:o
+崔	F	86:o
+崢	F	87:o
+崚	F	88:o
+崙	F	89:o
+崘	F	90:o
+嵌	F	91:o
+嵒	F	92:o
+嵎	F	93:o
+嵋	F	94:o
+嵬	F	95:o
+嵳	F	96:o
+嵶	F	97:o
+嶇	F	98:o
+嶄	F	99:o
+嶂	F	100:o
+嶢	F	101:o
+嶝	F	102:o
+嶬	F	103:o
+嶮	F	104:o
+嶽	F	105:o
+嶐	F	106:o
+嶷	F	107:o
+嶼	F	108:o
+巉	F	109:o
+巍	F	110:o
+巓	F	111:o
+巒	F	112:o
+巖	F	113:o
+巛	F	114:o
+巫	F	115:o
+已	F	116:o
+巵	F	117:o
+帋	F	118:o
+帚	F	119:o
+帙	F	120:o
+帑	F	121:o
+帛	F	122:o
+帶	F	123:o
+帷	F	124:o
+幄	F	125:o
+幃	F	126:o
+幀	F	127:o
+幎	F	128:o
+幗	F	129:o
+幔	F	130:o
+幟	F	131:o
+幢	F	132:o
+幤	F	133:o
+幇	F	134:o
+幵	F	135:o
+并	F	136:o
+幺	F	137:o
+麼	F	138:o
+广	F	139:o
+庠	F	140:o
+廁	F	141:o
+廂	F	142:o
+廈	F	143:o
+廐	F	144:o
+廏	F	145:o
+廖	F	146:o
+廣	F	147:o
+廝	F	148:o
+廚	F	149:o
+廛	F	150:o
+廢	F	151:o
+廡	F	152:o
+廨	F	153:o
+廩	F	154:o
+廬	F	155:o
+廱	F	156:o
+廳	F	157:o
+廰	F	158:o
+廴	F	159:o
+廸	F	160:o
+廾	F	161:o
+弃	F	162:o
+弉	F	163:o
+彝	F	164:o
+彜	F	165:o
+弋	F	166:o
+弑	F	167:o
+弖	F	168:o
+弩	F	169:o
+弭	F	170:o
+弸	F	171:o
+彁	F	172:o
+彈	F	173:o
+彌	F	174:o
+彎	F	175:o
+弯	F	176:o
+彑	F	177:o
+彖	F	178:o
+彗	F	179:o
+彙	F	180:o
+彡	F	181:o
+彭	F	182:o
+彳	F	183:o
+彷	F	184:o
+徃	F	185:o
+徂	F	186:o
+彿	F	187:o
+徊	F	188:o
+很	F	189:o
+徑	F	190:o
+徇	F	191:o
+從	F	192:o
+徙	F	193:o
+徘	F	194:o
+徠	F	195:o
+徨	F	196:o
+徭	F	197:o
+徼	F	198:o
+忖	F	199:o
+忻	F	200:o
+忤	F	201:o
+忸	F	202:o
+忱	F	203:o
+忝	F	204:o
+悳	F	205:o
+忿	F	206:o
+怡	F	207:o
+恠	F	208:o
+怙	F	209:o
+怐	F	210:o
+怩	F	211:o
+怎	F	212:o
+怱	F	213:o
+怛	F	214:o
+怕	F	215:o
+怫	F	216:o
+怦	F	217:o
+怏	F	218:o
+怺	F	219:o
+恚	F	220:o
+恁	F	221:o
+恪	F	222:o
+恷	F	223:o
+恟	F	224:o
+恊	F	225:o
+恆	F	226:o
+恍	F	227:o
+恣	F	228:o
+恃	F	229:o
+恤	F	230:o
+恂	F	231:o
+恬	F	232:o
+恫	F	233:o
+恙	F	234:o
+悁	F	235:o
+悍	F	236:o
+惧	F	237:o
+悃	F	238:o
+悚	F	239:o
+悄	F	240:o
+悛	F	241:o
+悖	F	242:o
+悗	F	243:o
+悒	F	244:o
+悧	F	245:o
+悋	F	246:o
+惡	F	247:o
+悸	F	248:o
+惠	F	249:o
+惓	F	250:o
+悴	F	251:o
+忰	F	252:o
+悽	F	253:o
+惆	F	254:o
+悵	F	255:o
+惘	F	0:p
+慍	F	1:p
+愕	F	2:p
+愆	F	3:p
+惶	F	4:p
+惷	F	5:p
+愀	F	6:p
+惴	F	7:p
+惺	F	8:p
+愃	F	9:p
+愡	F	10:p
+惻	F	11:p
+惱	F	12:p
+愍	F	13:p
+愎	F	14:p
+慇	F	15:p
+愾	F	16:p
+愨	F	17:p
+愧	F	18:p
+慊	F	19:p
+愿	F	20:p
+愼	F	21:p
+愬	F	22:p
+愴	F	23:p
+愽	F	24:p
+慂	F	25:p
+慄	F	26:p
+慳	F	27:p
+慷	F	28:p
+慘	F	29:p
+慙	F	30:p
+慚	F	31:p
+慫	F	32:p
+慴	F	33:p
+慯	F	34:p
+慥	F	35:p
+慱	F	36:p
+慟	F	37:p
+慝	F	38:p
+慓	F	39:p
+慵	F	40:p
+憙	F	41:p
+憖	F	42:p
+憇	F	43:p
+憬	F	44:p
+憔	F	45:p
+憚	F	46:p
+憊	F	47:p
+憑	F	48:p
+憫	F	49:p
+憮	F	50:p
+懌	F	51:p
+懊	F	52:p
+應	F	53:p
+懷	F	54:p
+懈	F	55:p
+懃	F	56:p
+懆	F	57:p
+憺	F	58:p
+懋	F	59:p
+罹	F	60:p
+懍	F	61:p
+懦	F	62:p
+懣	F	63:p
+懶	F	64:p
+懺	F	65:p
+懴	F	66:p
+懿	F	67:p
+懽	F	68:p
+懼	F	69:p
+懾	F	70:p
+戀	F	71:p
+戈	F	72:p
+戉	F	73:p
+戍	F	74:p
+戌	F	75:p
+戔	F	76:p
+戛	F	77:p
+戞	F	78:p
+戡	F	79:p
+截	F	80:p
+戮	F	81:p
+戰	F	82:p
+戲	F	83:p
+戳	F	84:p
+扁	F	85:p
+扎	F	86:p
+扞	F	87:p
+扣	F	88:p
+扛	F	89:p
+扠	F	90:p
+扨	F	91:p
+扼	F	92:p
+抂	F	93:p
+抉	F	94:p
+找	F	95:p
+抒	F	96:p
+抓	F	97:p
+抖	F	98:p
+拔	F	99:p
+抃	F	100:p
+抔	F	101:p
+拗	F	102:p
+拑	F	103:p
+抻	F	104:p
+拏	F	105:p
+拿	F	106:p
+拆	F	107:p
+擔	F	108:p
+拈	F	109:p
+拜	F	110:p
+拌	F	111:p
+拊	F	112:p
+拂	F	113:p
+拇	F	114:p
+抛	F	115:p
+拉	F	116:p
+挌	F	117:p
+拮	F	118:p
+拱	F	119:p
+挧	F	120:p
+挂	F	121:p
+挈	F	122:p
+拯	F	123:p
+拵	F	124:p
+捐	F	125:p
+挾	F	126:p
+捍	F	127:p
+搜	F	128:p
+捏	F	129:p
+掖	F	130:p
+掎	F	131:p
+掀	F	132:p
+掫	F	133:p
+捶	F	134:p
+掣	F	135:p
+掏	F	136:p
+掉	F	137:p
+掟	F	138:p
+掵	F	139:p
+捫	F	140:p
+捩	F	141:p
+掾	F	142:p
+揩	F	143:p
+揀	F	144:p
+揆	F	145:p
+揣	F	146:p
+揉	F	147:p
+插	F	148:p
+揶	F	149:p
+揄	F	150:p
+搖	F	151:p
+搴	F	152:p
+搆	F	153:p
+搓	F	154:p
+搦	F	155:p
+搶	F	156:p
+攝	F	157:p
+搗	F	158:p
+搨	F	159:p
+搏	F	160:p
+摧	F	161:p
+摯	F	162:p
+摶	F	163:p
+摎	F	164:p
+攪	F	165:p
+撕	F	166:p
+撓	F	167:p
+撥	F	168:p
+撩	F	169:p
+撈	F	170:p
+撼	F	171:p
+據	F	172:p
+擒	F	173:p
+擅	F	174:p
+擇	F	175:p
+撻	F	176:p
+擘	F	177:p
+擂	F	178:p
+擱	F	179:p
+擧	F	180:p
+舉	F	181:p
+擠	F	182:p
+擡	F	183:p
+抬	F	184:p
+擣	F	185:p
+擯	F	186:p
+攬	F	187:p
+擶	F	188:p
+擴	F	189:p
+擲	F	190:p
+擺	F	191:p
+攀	F	192:p
+擽	F	193:p
+攘	F	194:p
+攜	F	195:p
+攅	F	196:p
+攤	F	197:p
+攣	F	198:p
+攫	F	199:p
+攴	F	200:p
+攵	F	201:p
+攷	F	202:p
+收	F	203:p
+攸	F	204:p
+畋	F	205:p
+效	F	206:p
+敖	F	207:p
+敕	F	208:p
+敍	F	209:p
+敘	F	210:p
+敞	F	211:p
+敝	F	212:p
+敲	F	213:p
+數	F	214:p
+斂	F	215:p
+斃	F	216:p
+變	F	217:p
+斛	F	218:p
+斟	F	219:p
+斫	F	220:p
+斷	F	221:p
+旃	F	222:p
+旆	F	223:p
+旁	F	224:p
+旄	F	225:p
+旌	F	226:p
+旒	F	227:p
+旛	F	228:p
+旙	F	229:p
+无	F	230:p
+旡	F	231:p
+旱	F	232:p
+杲	F	233:p
+昊	F	234:p
+昃	F	235:p
+旻	F	236:p
+杳	F	237:p
+昵	F	238:p
+昶	F	239:p
+昴	F	240:p
+昜	F	241:p
+晏	F	242:p
+晄	F	243:p
+晉	F	244:p
+晁	F	245:p
+晞	F	246:p
+晝	F	247:p
+晤	F	248:p
+晧	F	249:p
+晨	F	250:p
+晟	F	251:p
+晢	F	252:p
+晰	F	253:p
+暃	F	254:p
+暈	F	255:p
+暎	F	0:q
+暉	F	1:q
+暄	F	2:q
+暘	F	3:q
+暝	F	4:q
+曁	F	5:q
+暹	F	6:q
+曉	F	7:q
+暾	F	8:q
+暼	F	9:q
+曄	F	10:q
+暸	F	11:q
+曖	F	12:q
+曚	F	13:q
+曠	F	14:q
+昿	F	15:q
+曦	F	16:q
+曩	F	17:q
+曰	F	18:q
+曵	F	19:q
+曷	F	20:q
+朏	F	21:q
+朖	F	22:q
+朞	F	23:q
+朦	F	24:q
+朧	F	25:q
+霸	F	26:q
+朮	F	27:q
+朿	F	28:q
+朶	F	29:q
+杁	F	30:q
+朸	F	31:q
+朷	F	32:q
+杆	F	33:q
+杞	F	34:q
+杠	F	35:q
+杙	F	36:q
+杣	F	37:q
+杤	F	38:q
+枉	F	39:q
+杰	F	40:q
+枩	F	41:q
+杼	F	42:q
+杪	F	43:q
+枌	F	44:q
+枋	F	45:q
+枦	F	46:q
+枡	F	47:q
+枅	F	48:q
+枷	F	49:q
+柯	F	50:q
+枴	F	51:q
+柬	F	52:q
+枳	F	53:q
+柩	F	54:q
+枸	F	55:q
+柤	F	56:q
+柞	F	57:q
+柝	F	58:q
+柢	F	59:q
+柮	F	60:q
+枹	F	61:q
+柎	F	62:q
+柆	F	63:q
+柧	F	64:q
+檜	F	65:q
+栞	F	66:q
+框	F	67:q
+栩	F	68:q
+桀	F	69:q
+桍	F	70:q
+栲	F	71:q
+桎	F	72:q
+梳	F	73:q
+栫	F	74:q
+桙	F	75:q
+档	F	76:q
+桷	F	77:q
+桿	F	78:q
+梟	F	79:q
+梏	F	80:q
+梭	F	81:q
+梔	F	82:q
+條	F	83:q
+梛	F	84:q
+梃	F	85:q
+檮	F	86:q
+梹	F	87:q
+桴	F	88:q
+梵	F	89:q
+梠	F	90:q
+梺	F	91:q
+椏	F	92:q
+梍	F	93:q
+桾	F	94:q
+椁	F	95:q
+棊	F	96:q
+椈	F	97:q
+棘	F	98:q
+椢	F	99:q
+椦	F	100:q
+棡	F	101:q
+椌	F	102:q
+棍	F	103:q
+棔	F	104:q
+棧	F	105:q
+棕	F	106:q
+椶	F	107:q
+椒	F	108:q
+椄	F	109:q
+棗	F	110:q
+棣	F	111:q
+椥	F	112:q
+棹	F	113:q
+棠	F	114:q
+棯	F	115:q
+椨	F	116:q
+椪	F	117:q
+椚	F	118:q
+椣	F	119:q
+椡	F	120:q
+棆	F	121:q
+楹	F	122:q
+楷	F	123:q
+楜	F	124:q
+楸	F	125:q
+楫	F	126:q
+楔	F	127:q
+楾	F	128:q
+楮	F	129:q
+椹	F	130:q
+楴	F	131:q
+椽	F	132:q
+楙	F	133:q
+椰	F	134:q
+楡	F	135:q
+楞	F	136:q
+楝	F	137:q
+榁	F	138:q
+楪	F	139:q
+榲	F	140:q
+榮	F	141:q
+槐	F	142:q
+榿	F	143:q
+槁	F	144:q
+槓	F	145:q
+榾	F	146:q
+槎	F	147:q
+寨	F	148:q
+槊	F	149:q
+槝	F	150:q
+榻	F	151:q
+槃	F	152:q
+榧	F	153:q
+樮	F	154:q
+榑	F	155:q
+榠	F	156:q
+榜	F	157:q
+榕	F	158:q
+榴	F	159:q
+槞	F	160:q
+槨	F	161:q
+樂	F	162:q
+樛	F	163:q
+槿	F	164:q
+權	F	165:q
+槹	F	166:q
+槲	F	167:q
+槧	F	168:q
+樅	F	169:q
+榱	F	170:q
+樞	F	171:q
+槭	F	172:q
+樔	F	173:q
+槫	F	174:q
+樊	F	175:q
+樒	F	176:q
+櫁	F	177:q
+樣	F	178:q
+樓	F	179:q
+橄	F	180:q
+樌	F	181:q
+橲	F	182:q
+樶	F	183:q
+橸	F	184:q
+橇	F	185:q
+橢	F	186:q
+橙	F	187:q
+橦	F	188:q
+橈	F	189:q
+樸	F	190:q
+樢	F	191:q
+檐	F	192:q
+檍	F	193:q
+檠	F	194:q
+檄	F	195:q
+檢	F	196:q
+檣	F	197:q
+檗	F	198:q
+蘗	F	199:q
+檻	F	200:q
+櫃	F	201:q
+櫂	F	202:q
+檸	F	203:q
+檳	F	204:q
+檬	F	205:q
+櫞	F	206:q
+櫑	F	207:q
+櫟	F	208:q
+檪	F	209:q
+櫚	F	210:q
+櫪	F	211:q
+櫻	F	212:q
+欅	F	213:q
+蘖	F	214:q
+櫺	F	215:q
+欒	F	216:q
+欖	F	217:q
+鬱	F	218:q
+欟	F	219:q
+欸	F	220:q
+欷	F	221:q
+盜	F	222:q
+欹	F	223:q
+飮	F	224:q
+歇	F	225:q
+歃	F	226:q
+歉	F	227:q
+歐	F	228:q
+歙	F	229:q
+歔	F	230:q
+歛	F	231:q
+歟	F	232:q
+歡	F	233:q
+歸	F	234:q
+歹	F	235:q
+歿	F	236:q
+殀	F	237:q
+殄	F	238:q
+殃	F	239:q
+殍	F	240:q
+殘	F	241:q
+殕	F	242:q
+殞	F	243:q
+殤	F	244:q
+殪	F	245:q
+殫	F	246:q
+殯	F	247:q
+殲	F	248:q
+殱	F	249:q
+殳	F	250:q
+殷	F	251:q
+殼	F	252:q
+毆	F	253:q
+毋	F	254:q
+毓	F	255:q
+毟	F	0:r
+毬	F	1:r
+毫	F	2:r
+毳	F	3:r
+毯	F	4:r
+麾	F	5:r
+氈	F	6:r
+氓	F	7:r
+气	F	8:r
+氛	F	9:r
+氤	F	10:r
+氣	F	11:r
+汞	F	12:r
+汕	F	13:r
+汢	F	14:r
+汪	F	15:r
+沂	F	16:r
+沍	F	17:r
+沚	F	18:r
+沁	F	19:r
+沛	F	20:r
+汾	F	21:r
+汨	F	22:r
+汳	F	23:r
+沒	F	24:r
+沐	F	25:r
+泄	F	26:r
+泱	F	27:r
+泓	F	28:r
+沽	F	29:r
+泗	F	30:r
+泅	F	31:r
+泝	F	32:r
+沮	F	33:r
+沱	F	34:r
+沾	F	35:r
+沺	F	36:r
+泛	F	37:r
+泯	F	38:r
+泙	F	39:r
+泪	F	40:r
+洟	F	41:r
+衍	F	42:r
+洶	F	43:r
+洫	F	44:r
+洽	F	45:r
+洸	F	46:r
+洙	F	47:r
+洵	F	48:r
+洳	F	49:r
+洒	F	50:r
+洌	F	51:r
+浣	F	52:r
+涓	F	53:r
+浤	F	54:r
+浚	F	55:r
+浹	F	56:r
+浙	F	57:r
+涎	F	58:r
+涕	F	59:r
+濤	F	60:r
+涅	F	61:r
+淹	F	62:r
+渕	F	63:r
+渊	F	64:r
+涵	F	65:r
+淇	F	66:r
+淦	F	67:r
+涸	F	68:r
+淆	F	69:r
+淬	F	70:r
+淞	F	71:r
+淌	F	72:r
+淨	F	73:r
+淒	F	74:r
+淅	F	75:r
+淺	F	76:r
+淙	F	77:r
+淤	F	78:r
+淕	F	79:r
+淪	F	80:r
+淮	F	81:r
+渭	F	82:r
+湮	F	83:r
+渮	F	84:r
+渙	F	85:r
+湲	F	86:r
+湟	F	87:r
+渾	F	88:r
+渣	F	89:r
+湫	F	90:r
+渫	F	91:r
+湶	F	92:r
+湍	F	93:r
+渟	F	94:r
+湃	F	95:r
+渺	F	96:r
+湎	F	97:r
+渤	F	98:r
+滿	F	99:r
+渝	F	100:r
+游	F	101:r
+溂	F	102:r
+溪	F	103:r
+溘	F	104:r
+滉	F	105:r
+溷	F	106:r
+滓	F	107:r
+溽	F	108:r
+溯	F	109:r
+滄	F	110:r
+溲	F	111:r
+滔	F	112:r
+滕	F	113:r
+溏	F	114:r
+溥	F	115:r
+滂	F	116:r
+溟	F	117:r
+潁	F	118:r
+漑	F	119:r
+灌	F	120:r
+滬	F	121:r
+滸	F	122:r
+滾	F	123:r
+漿	F	124:r
+滲	F	125:r
+漱	F	126:r
+滯	F	127:r
+漲	F	128:r
+滌	F	129:r
+漾	F	130:r
+漓	F	131:r
+滷	F	132:r
+澆	F	133:r
+潺	F	134:r
+潸	F	135:r
+澁	F	136:r
+澀	F	137:r
+潯	F	138:r
+潛	F	139:r
+濳	F	140:r
+潭	F	141:r
+澂	F	142:r
+潼	F	143:r
+潘	F	144:r
+澎	F	145:r
+澑	F	146:r
+濂	F	147:r
+潦	F	148:r
+澳	F	149:r
+澣	F	150:r
+澡	F	151:r
+澤	F	152:r
+澹	F	153:r
+濆	F	154:r
+澪	F	155:r
+濟	F	156:r
+濕	F	157:r
+濬	F	158:r
+濔	F	159:r
+濘	F	160:r
+濱	F	161:r
+濮	F	162:r
+濛	F	163:r
+瀉	F	164:r
+瀋	F	165:r
+濺	F	166:r
+瀑	F	167:r
+瀁	F	168:r
+瀏	F	169:r
+濾	F	170:r
+瀛	F	171:r
+瀚	F	172:r
+潴	F	173:r
+瀝	F	174:r
+瀘	F	175:r
+瀟	F	176:r
+瀰	F	177:r
+瀾	F	178:r
+瀲	F	179:r
+灑	F	180:r
+灣	F	181:r
+炙	F	182:r
+炒	F	183:r
+炯	F	184:r
+烱	F	185:r
+炬	F	186:r
+炸	F	187:r
+炳	F	188:r
+炮	F	189:r
+烟	F	190:r
+烋	F	191:r
+烝	F	192:r
+烙	F	193:r
+焉	F	194:r
+烽	F	195:r
+焜	F	196:r
+焙	F	197:r
+煥	F	198:r
+煕	F	199:r
+熈	F	200:r
+煦	F	201:r
+煢	F	202:r
+煌	F	203:r
+煖	F	204:r
+煬	F	205:r
+熏	F	206:r
+燻	F	207:r
+熄	F	208:r
+熕	F	209:r
+熨	F	210:r
+熬	F	211:r
+燗	F	212:r
+熹	F	213:r
+熾	F	214:r
+燒	F	215:r
+燉	F	216:r
+燔	F	217:r
+燎	F	218:r
+燠	F	219:r
+燬	F	220:r
+燧	F	221:r
+燵	F	222:r
+燼	F	223:r
+燹	F	224:r
+燿	F	225:r
+爍	F	226:r
+爐	F	227:r
+爛	F	228:r
+爨	F	229:r
+爭	F	230:r
+爬	F	231:r
+爰	F	232:r
+爲	F	233:r
+爻	F	234:r
+爼	F	235:r
+爿	F	236:r
+牀	F	237:r
+牆	F	238:r
+牋	F	239:r
+牘	F	240:r
+牴	F	241:r
+牾	F	242:r
+犂	F	243:r
+犁	F	244:r
+犇	F	245:r
+犒	F	246:r
+犖	F	247:r
+犢	F	248:r
+犧	F	249:r
+犹	F	250:r
+犲	F	251:r
+狃	F	252:r
+狆	F	253:r
+狄	F	254:r
+狎	F	255:r
+狒	F	0:s
+狢	F	1:s
+狠	F	2:s
+狡	F	3:s
+狹	F	4:s
+狷	F	5:s
+倏	F	6:s
+猗	F	7:s
+猊	F	8:s
+猜	F	9:s
+猖	F	10:s
+猝	F	11:s
+猴	F	12:s
+猯	F	13:s
+猩	F	14:s
+猥	F	15:s
+猾	F	16:s
+獎	F	17:s
+獏	F	18:s
+默	F	19:s
+獗	F	20:s
+獪	F	21:s
+獨	F	22:s
+獰	F	23:s
+獸	F	24:s
+獵	F	25:s
+獻	F	26:s
+獺	F	27:s
+珈	F	28:s
+玳	F	29:s
+珎	F	30:s
+玻	F	31:s
+珀	F	32:s
+珥	F	33:s
+珮	F	34:s
+珞	F	35:s
+璢	F	36:s
+琅	F	37:s
+瑯	F	38:s
+琥	F	39:s
+珸	F	40:s
+琲	F	41:s
+琺	F	42:s
+瑕	F	43:s
+琿	F	44:s
+瑟	F	45:s
+瑙	F	46:s
+瑁	F	47:s
+瑜	F	48:s
+瑩	F	49:s
+瑰	F	50:s
+瑣	F	51:s
+瑪	F	52:s
+瑶	F	53:s
+瑾	F	54:s
+璋	F	55:s
+璞	F	56:s
+璧	F	57:s
+瓊	F	58:s
+瓏	F	59:s
+瓔	F	60:s
+珱	F	61:s
+瓠	F	62:s
+瓣	F	63:s
+瓧	F	64:s
+瓩	F	65:s
+瓮	F	66:s
+瓲	F	67:s
+瓰	F	68:s
+瓱	F	69:s
+瓸	F	70:s
+瓷	F	71:s
+甄	F	72:s
+甃	F	73:s
+甅	F	74:s
+甌	F	75:s
+甎	F	76:s
+甍	F	77:s
+甕	F	78:s
+甓	F	79:s
+甞	F	80:s
+甦	F	81:s
+甬	F	82:s
+甼	F	83:s
+畄	F	84:s
+畍	F	85:s
+畊	F	86:s
+畉	F	87:s
+畛	F	88:s
+畆	F	89:s
+畚	F	90:s
+畩	F	91:s
+畤	F	92:s
+畧	F	93:s
+畫	F	94:s
+畭	F	95:s
+畸	F	96:s
+當	F	97:s
+疆	F	98:s
+疇	F	99:s
+畴	F	100:s
+疊	F	101:s
+疉	F	102:s
+疂	F	103:s
+疔	F	104:s
+疚	F	105:s
+疝	F	106:s
+疥	F	107:s
+疣	F	108:s
+痂	F	109:s
+疳	F	110:s
+痃	F	111:s
+疵	F	112:s
+疽	F	113:s
+疸	F	114:s
+疼	F	115:s
+疱	F	116:s
+痍	F	117:s
+痊	F	118:s
+痒	F	119:s
+痙	F	120:s
+痣	F	121:s
+痞	F	122:s
+痾	F	123:s
+痿	F	124:s
+痼	F	125:s
+瘁	F	126:s
+痰	F	127:s
+痺	F	128:s
+痲	F	129:s
+痳	F	130:s
+瘋	F	131:s
+瘍	F	132:s
+瘉	F	133:s
+瘟	F	134:s
+瘧	F	135:s
+瘠	F	136:s
+瘡	F	137:s
+瘢	F	138:s
+瘤	F	139:s
+瘴	F	140:s
+瘰	F	141:s
+瘻	F	142:s
+癇	F	143:s
+癈	F	144:s
+癆	F	145:s
+癜	F	146:s
+癘	F	147:s
+癡	F	148:s
+癢	F	149:s
+癨	F	150:s
+癩	F	151:s
+癪	F	152:s
+癧	F	153:s
+癬	F	154:s
+癰	F	155:s
+癲	F	156:s
+癶	F	157:s
+癸	F	158:s
+發	F	159:s
+皀	F	160:s
+皃	F	161:s
+皈	F	162:s
+皋	F	163:s
+皎	F	164:s
+皖	F	165:s
+皓	F	166:s
+皙	F	167:s
+皚	F	168:s
+皰	F	169:s
+皴	F	170:s
+皸	F	171:s
+皹	F	172:s
+皺	F	173:s
+盂	F	174:s
+盍	F	175:s
+盖	F	176:s
+盒	F	177:s
+盞	F	178:s
+盡	F	179:s
+盥	F	180:s
+盧	F	181:s
+盪	F	182:s
+蘯	F	183:s
+盻	F	184:s
+眈	F	185:s
+眇	F	186:s
+眄	F	187:s
+眩	F	188:s
+眤	F	189:s
+眞	F	190:s
+眥	F	191:s
+眦	F	192:s
+眛	F	193:s
+眷	F	194:s
+眸	F	195:s
+睇	F	196:s
+睚	F	197:s
+睨	F	198:s
+睫	F	199:s
+睛	F	200:s
+睥	F	201:s
+睿	F	202:s
+睾	F	203:s
+睹	F	204:s
+瞎	F	205:s
+瞋	F	206:s
+瞑	F	207:s
+瞠	F	208:s
+瞞	F	209:s
+瞰	F	210:s
+瞶	F	211:s
+瞹	F	212:s
+瞿	F	213:s
+瞼	F	214:s
+瞽	F	215:s
+瞻	F	216:s
+矇	F	217:s
+矍	F	218:s
+矗	F	219:s
+矚	F	220:s
+矜	F	221:s
+矣	F	222:s
+矮	F	223:s
+矼	F	224:s
+砌	F	225:s
+砒	F	226:s
+礦	F	227:s
+砠	F	228:s
+礪	F	229:s
+硅	F	230:s
+碎	F	231:s
+硴	F	232:s
+碆	F	233:s
+硼	F	234:s
+碚	F	235:s
+碌	F	236:s
+碣	F	237:s
+碵	F	238:s
+碪	F	239:s
+碯	F	240:s
+磑	F	241:s
+磆	F	242:s
+磋	F	243:s
+磔	F	244:s
+碾	F	245:s
+碼	F	246:s
+磅	F	247:s
+磊	F	248:s
+磬	F	249:s
+磧	F	250:s
+磚	F	251:s
+磽	F	252:s
+磴	F	253:s
+礇	F	254:s
+礒	F	255:s
+礑	F	0:t
+礙	F	1:t
+礬	F	2:t
+礫	F	3:t
+祀	F	4:t
+祠	F	5:t
+祗	F	6:t
+祟	F	7:t
+祚	F	8:t
+祕	F	9:t
+祓	F	10:t
+祺	F	11:t
+祿	F	12:t
+禊	F	13:t
+禝	F	14:t
+禧	F	15:t
+齋	F	16:t
+禪	F	17:t
+禮	F	18:t
+禳	F	19:t
+禹	F	20:t
+禺	F	21:t
+秉	F	22:t
+秕	F	23:t
+秧	F	24:t
+秬	F	25:t
+秡	F	26:t
+秣	F	27:t
+稈	F	28:t
+稍	F	29:t
+稘	F	30:t
+稙	F	31:t
+稠	F	32:t
+稟	F	33:t
+禀	F	34:t
+稱	F	35:t
+稻	F	36:t
+稾	F	37:t
+稷	F	38:t
+穃	F	39:t
+穗	F	40:t
+穉	F	41:t
+穡	F	42:t
+穢	F	43:t
+穩	F	44:t
+龝	F	45:t
+穰	F	46:t
+穹	F	47:t
+穽	F	48:t
+窈	F	49:t
+窗	F	50:t
+窕	F	51:t
+窘	F	52:t
+窖	F	53:t
+窩	F	54:t
+竈	F	55:t
+窰	F	56:t
+窶	F	57:t
+竅	F	58:t
+竄	F	59:t
+窿	F	60:t
+邃	F	61:t
+竇	F	62:t
+竊	F	63:t
+竍	F	64:t
+竏	F	65:t
+竕	F	66:t
+竓	F	67:t
+站	F	68:t
+竚	F	69:t
+竝	F	70:t
+竡	F	71:t
+竢	F	72:t
+竦	F	73:t
+竭	F	74:t
+竰	F	75:t
+笂	F	76:t
+笏	F	77:t
+笊	F	78:t
+笆	F	79:t
+笳	F	80:t
+笘	F	81:t
+笙	F	82:t
+笞	F	83:t
+笵	F	84:t
+笨	F	85:t
+笶	F	86:t
+筐	F	87:t
+筺	F	88:t
+笄	F	89:t
+筍	F	90:t
+笋	F	91:t
+筌	F	92:t
+筅	F	93:t
+筵	F	94:t
+筥	F	95:t
+筴	F	96:t
+筧	F	97:t
+筰	F	98:t
+筱	F	99:t
+筬	F	100:t
+筮	F	101:t
+箝	F	102:t
+箘	F	103:t
+箟	F	104:t
+箍	F	105:t
+箜	F	106:t
+箚	F	107:t
+箋	F	108:t
+箒	F	109:t
+箏	F	110:t
+筝	F	111:t
+箙	F	112:t
+篋	F	113:t
+篁	F	114:t
+篌	F	115:t
+篏	F	116:t
+箴	F	117:t
+篆	F	118:t
+篝	F	119:t
+篩	F	120:t
+簑	F	121:t
+簔	F	122:t
+篦	F	123:t
+篥	F	124:t
+籠	F	125:t
+簀	F	126:t
+簇	F	127:t
+簓	F	128:t
+篳	F	129:t
+篷	F	130:t
+簗	F	131:t
+簍	F	132:t
+篶	F	133:t
+簣	F	134:t
+簧	F	135:t
+簪	F	136:t
+簟	F	137:t
+簷	F	138:t
+簫	F	139:t
+簽	F	140:t
+籌	F	141:t
+籃	F	142:t
+籔	F	143:t
+籏	F	144:t
+籀	F	145:t
+籐	F	146:t
+籘	F	147:t
+籟	F	148:t
+籤	F	149:t
+籖	F	150:t
+籥	F	151:t
+籬	F	152:t
+籵	F	153:t
+粃	F	154:t
+粐	F	155:t
+粤	F	156:t
+粭	F	157:t
+粢	F	158:t
+粫	F	159:t
+粡	F	160:t
+粨	F	161:t
+粳	F	162:t
+粲	F	163:t
+粱	F	164:t
+粮	F	165:t
+粹	F	166:t
+粽	F	167:t
+糀	F	168:t
+糅	F	169:t
+糂	F	170:t
+糘	F	171:t
+糒	F	172:t
+糜	F	173:t
+糢	F	174:t
+鬻	F	175:t
+糯	F	176:t
+糲	F	177:t
+糴	F	178:t
+糶	F	179:t
+糺	F	180:t
+紆	F	181:t
+紂	F	182:t
+紜	F	183:t
+紕	F	184:t
+紊	F	185:t
+絅	F	186:t
+絋	F	187:t
+紮	F	188:t
+紲	F	189:t
+紿	F	190:t
+紵	F	191:t
+絆	F	192:t
+絳	F	193:t
+絖	F	194:t
+絎	F	195:t
+絲	F	196:t
+絨	F	197:t
+絮	F	198:t
+絏	F	199:t
+絣	F	200:t
+經	F	201:t
+綉	F	202:t
+絛	F	203:t
+綏	F	204:t
+絽	F	205:t
+綛	F	206:t
+綺	F	207:t
+綮	F	208:t
+綣	F	209:t
+綵	F	210:t
+緇	F	211:t
+綽	F	212:t
+綫	F	213:t
+總	F	214:t
+綢	F	215:t
+綯	F	216:t
+緜	F	217:t
+綸	F	218:t
+綟	F	219:t
+綰	F	220:t
+緘	F	221:t
+緝	F	222:t
+緤	F	223:t
+緞	F	224:t
+緻	F	225:t
+緲	F	226:t
+緡	F	227:t
+縅	F	228:t
+縊	F	229:t
+縣	F	230:t
+縡	F	231:t
+縒	F	232:t
+縱	F	233:t
+縟	F	234:t
+縉	F	235:t
+縋	F	236:t
+縢	F	237:t
+繆	F	238:t
+繦	F	239:t
+縻	F	240:t
+縵	F	241:t
+縹	F	242:t
+繃	F	243:t
+縷	F	244:t
+縲	F	245:t
+縺	F	246:t
+繧	F	247:t
+繝	F	248:t
+繖	F	249:t
+繞	F	250:t
+繙	F	251:t
+繚	F	252:t
+繹	F	253:t
+繪	F	254:t
+繩	F	255:t
+繼	F	0:u
+繻	F	1:u
+纃	F	2:u
+緕	F	3:u
+繽	F	4:u
+辮	F	5:u
+繿	F	6:u
+纈	F	7:u
+纉	F	8:u
+續	F	9:u
+纒	F	10:u
+纐	F	11:u
+纓	F	12:u
+纔	F	13:u
+纖	F	14:u
+纎	F	15:u
+纛	F	16:u
+纜	F	17:u
+缸	F	18:u
+缺	F	19:u
+罅	F	20:u
+罌	F	21:u
+罍	F	22:u
+罎	F	23:u
+罐	F	24:u
+网	F	25:u
+罕	F	26:u
+罔	F	27:u
+罘	F	28:u
+罟	F	29:u
+罠	F	30:u
+罨	F	31:u
+罩	F	32:u
+罧	F	33:u
+罸	F	34:u
+羂	F	35:u
+羆	F	36:u
+羃	F	37:u
+羈	F	38:u
+羇	F	39:u
+羌	F	40:u
+羔	F	41:u
+羞	F	42:u
+羝	F	43:u
+羚	F	44:u
+羣	F	45:u
+羯	F	46:u
+羲	F	47:u
+羹	F	48:u
+羮	F	49:u
+羶	F	50:u
+羸	F	51:u
+譱	F	52:u
+翅	F	53:u
+翆	F	54:u
+翊	F	55:u
+翕	F	56:u
+翔	F	57:u
+翡	F	58:u
+翦	F	59:u
+翩	F	60:u
+翳	F	61:u
+翹	F	62:u
+飜	F	63:u
+耆	F	64:u
+耄	F	65:u
+耋	F	66:u
+耒	F	67:u
+耘	F	68:u
+耙	F	69:u
+耜	F	70:u
+耡	F	71:u
+耨	F	72:u
+耿	F	73:u
+耻	F	74:u
+聊	F	75:u
+聆	F	76:u
+聒	F	77:u
+聘	F	78:u
+聚	F	79:u
+聟	F	80:u
+聢	F	81:u
+聨	F	82:u
+聳	F	83:u
+聲	F	84:u
+聰	F	85:u
+聶	F	86:u
+聹	F	87:u
+聽	F	88:u
+聿	F	89:u
+肄	F	90:u
+肆	F	91:u
+肅	F	92:u
+肛	F	93:u
+肓	F	94:u
+肚	F	95:u
+肭	F	96:u
+冐	F	97:u
+肬	F	98:u
+胛	F	99:u
+胥	F	100:u
+胙	F	101:u
+胝	F	102:u
+胄	F	103:u
+胚	F	104:u
+胖	F	105:u
+脉	F	106:u
+胯	F	107:u
+胱	F	108:u
+脛	F	109:u
+脩	F	110:u
+脣	F	111:u
+脯	F	112:u
+腋	F	113:u
+隋	F	114:u
+腆	F	115:u
+脾	F	116:u
+腓	F	117:u
+腑	F	118:u
+胼	F	119:u
+腱	F	120:u
+腮	F	121:u
+腥	F	122:u
+腦	F	123:u
+腴	F	124:u
+膃	F	125:u
+膈	F	126:u
+膊	F	127:u
+膀	F	128:u
+膂	F	129:u
+膠	F	130:u
+膕	F	131:u
+膤	F	132:u
+膣	F	133:u
+腟	F	134:u
+膓	F	135:u
+膩	F	136:u
+膰	F	137:u
+膵	F	138:u
+膾	F	139:u
+膸	F	140:u
+膽	F	141:u
+臀	F	142:u
+臂	F	143:u
+膺	F	144:u
+臉	F	145:u
+臍	F	146:u
+臑	F	147:u
+臙	F	148:u
+臘	F	149:u
+臈	F	150:u
+臚	F	151:u
+臟	F	152:u
+臠	F	153:u
+臧	F	154:u
+臺	F	155:u
+臻	F	156:u
+臾	F	157:u
+舁	F	158:u
+舂	F	159:u
+舅	F	160:u
+與	F	161:u
+舊	F	162:u
+舍	F	163:u
+舐	F	164:u
+舖	F	165:u
+舩	F	166:u
+舫	F	167:u
+舸	F	168:u
+舳	F	169:u
+艀	F	170:u
+艙	F	171:u
+艘	F	172:u
+艝	F	173:u
+艚	F	174:u
+艟	F	175:u
+艤	F	176:u
+艢	F	177:u
+艨	F	178:u
+艪	F	179:u
+艫	F	180:u
+舮	F	181:u
+艱	F	182:u
+艷	F	183:u
+艸	F	184:u
+艾	F	185:u
+芍	F	186:u
+芒	F	187:u
+芫	F	188:u
+芟	F	189:u
+芻	F	190:u
+芬	F	191:u
+苡	F	192:u
+苣	F	193:u
+苟	F	194:u
+苒	F	195:u
+苴	F	196:u
+苳	F	197:u
+苺	F	198:u
+莓	F	199:u
+范	F	200:u
+苻	F	201:u
+苹	F	202:u
+苞	F	203:u
+茆	F	204:u
+苜	F	205:u
+茉	F	206:u
+苙	F	207:u
+茵	F	208:u
+茴	F	209:u
+茖	F	210:u
+茲	F	211:u
+茱	F	212:u
+荀	F	213:u
+茹	F	214:u
+荐	F	215:u
+荅	F	216:u
+茯	F	217:u
+茫	F	218:u
+茗	F	219:u
+茘	F	220:u
+莅	F	221:u
+莚	F	222:u
+莪	F	223:u
+莟	F	224:u
+莢	F	225:u
+莖	F	226:u
+茣	F	227:u
+莎	F	228:u
+莇	F	229:u
+莊	F	230:u
+荼	F	231:u
+莵	F	232:u
+荳	F	233:u
+荵	F	234:u
+莠	F	235:u
+莉	F	236:u
+莨	F	237:u
+菴	F	238:u
+萓	F	239:u
+菫	F	240:u
+菎	F	241:u
+菽	F	242:u
+萃	F	243:u
+菘	F	244:u
+萋	F	245:u
+菁	F	246:u
+菷	F	247:u
+萇	F	248:u
+菠	F	249:u
+菲	F	250:u
+萍	F	251:u
+萢	F	252:u
+萠	F	253:u
+莽	F	254:u
+萸	F	255:u
+蔆	F	0:v
+菻	F	1:v
+葭	F	2:v
+萪	F	3:v
+萼	F	4:v
+蕚	F	5:v
+蒄	F	6:v
+葷	F	7:v
+葫	F	8:v
+蒭	F	9:v
+葮	F	10:v
+蒂	F	11:v
+葩	F	12:v
+葆	F	13:v
+萬	F	14:v
+葯	F	15:v
+葹	F	16:v
+萵	F	17:v
+蓊	F	18:v
+葢	F	19:v
+蒹	F	20:v
+蒿	F	21:v
+蒟	F	22:v
+蓙	F	23:v
+蓍	F	24:v
+蒻	F	25:v
+蓚	F	26:v
+蓐	F	27:v
+蓁	F	28:v
+蓆	F	29:v
+蓖	F	30:v
+蒡	F	31:v
+蔡	F	32:v
+蓿	F	33:v
+蓴	F	34:v
+蔗	F	35:v
+蔘	F	36:v
+蔬	F	37:v
+蔟	F	38:v
+蔕	F	39:v
+蔔	F	40:v
+蓼	F	41:v
+蕀	F	42:v
+蕣	F	43:v
+蕘	F	44:v
+蕈	F	45:v
+蕁	F	46:v
+蘂	F	47:v
+蕋	F	48:v
+蕕	F	49:v
+薀	F	50:v
+薤	F	51:v
+薈	F	52:v
+薑	F	53:v
+薊	F	54:v
+薨	F	55:v
+蕭	F	56:v
+薔	F	57:v
+薛	F	58:v
+藪	F	59:v
+薇	F	60:v
+薜	F	61:v
+蕷	F	62:v
+蕾	F	63:v
+薐	F	64:v
+藉	F	65:v
+薺	F	66:v
+藏	F	67:v
+薹	F	68:v
+藐	F	69:v
+藕	F	70:v
+藝	F	71:v
+藥	F	72:v
+藜	F	73:v
+藹	F	74:v
+蘊	F	75:v
+蘓	F	76:v
+蘋	F	77:v
+藾	F	78:v
+藺	F	79:v
+蘆	F	80:v
+蘢	F	81:v
+蘚	F	82:v
+蘰	F	83:v
+蘿	F	84:v
+虍	F	85:v
+乕	F	86:v
+虔	F	87:v
+號	F	88:v
+虧	F	89:v
+虱	F	90:v
+蚓	F	91:v
+蚣	F	92:v
+蚩	F	93:v
+蚪	F	94:v
+蚋	F	95:v
+蚌	F	96:v
+蚶	F	97:v
+蚯	F	98:v
+蛄	F	99:v
+蛆	F	100:v
+蚰	F	101:v
+蛉	F	102:v
+蠣	F	103:v
+蚫	F	104:v
+蛔	F	105:v
+蛞	F	106:v
+蛩	F	107:v
+蛬	F	108:v
+蛟	F	109:v
+蛛	F	110:v
+蛯	F	111:v
+蜒	F	112:v
+蜆	F	113:v
+蜈	F	114:v
+蜀	F	115:v
+蜃	F	116:v
+蛻	F	117:v
+蜑	F	118:v
+蜉	F	119:v
+蜍	F	120:v
+蛹	F	121:v
+蜊	F	122:v
+蜴	F	123:v
+蜿	F	124:v
+蜷	F	125:v
+蜻	F	126:v
+蜥	F	127:v
+蜩	F	128:v
+蜚	F	129:v
+蝠	F	130:v
+蝟	F	131:v
+蝸	F	132:v
+蝌	F	133:v
+蝎	F	134:v
+蝴	F	135:v
+蝗	F	136:v
+蝨	F	137:v
+蝮	F	138:v
+蝙	F	139:v
+蝓	F	140:v
+蝣	F	141:v
+蝪	F	142:v
+蠅	F	143:v
+螢	F	144:v
+螟	F	145:v
+螂	F	146:v
+螯	F	147:v
+蟋	F	148:v
+螽	F	149:v
+蟀	F	150:v
+蟐	F	151:v
+雖	F	152:v
+螫	F	153:v
+蟄	F	154:v
+螳	F	155:v
+蟇	F	156:v
+蟆	F	157:v
+螻	F	158:v
+蟯	F	159:v
+蟲	F	160:v
+蟠	F	161:v
+蠏	F	162:v
+蠍	F	163:v
+蟾	F	164:v
+蟶	F	165:v
+蟷	F	166:v
+蠎	F	167:v
+蟒	F	168:v
+蠑	F	169:v
+蠖	F	170:v
+蠕	F	171:v
+蠢	F	172:v
+蠡	F	173:v
+蠱	F	174:v
+蠶	F	175:v
+蠹	F	176:v
+蠧	F	177:v
+蠻	F	178:v
+衄	F	179:v
+衂	F	180:v
+衒	F	181:v
+衙	F	182:v
+衞	F	183:v
+衢	F	184:v
+衫	F	185:v
+袁	F	186:v
+衾	F	187:v
+袞	F	188:v
+衵	F	189:v
+衽	F	190:v
+袵	F	191:v
+衲	F	192:v
+袂	F	193:v
+袗	F	194:v
+袒	F	195:v
+袮	F	196:v
+袙	F	197:v
+袢	F	198:v
+袍	F	199:v
+袤	F	200:v
+袰	F	201:v
+袿	F	202:v
+袱	F	203:v
+裃	F	204:v
+裄	F	205:v
+裔	F	206:v
+裘	F	207:v
+裙	F	208:v
+裝	F	209:v
+裹	F	210:v
+褂	F	211:v
+裼	F	212:v
+裴	F	213:v
+裨	F	214:v
+裲	F	215:v
+褄	F	216:v
+褌	F	217:v
+褊	F	218:v
+褓	F	219:v
+襃	F	220:v
+褞	F	221:v
+褥	F	222:v
+褪	F	223:v
+褫	F	224:v
+襁	F	225:v
+襄	F	226:v
+褻	F	227:v
+褶	F	228:v
+褸	F	229:v
+襌	F	230:v
+褝	F	231:v
+襠	F	232:v
+襞	F	233:v
+襦	F	234:v
+襤	F	235:v
+襭	F	236:v
+襪	F	237:v
+襯	F	238:v
+襴	F	239:v
+襷	F	240:v
+襾	F	241:v
+覃	F	242:v
+覈	F	243:v
+覊	F	244:v
+覓	F	245:v
+覘	F	246:v
+覡	F	247:v
+覩	F	248:v
+覦	F	249:v
+覬	F	250:v
+覯	F	251:v
+覲	F	252:v
+覺	F	253:v
+覽	F	254:v
+覿	F	255:v
+觀	F	0:w
+觚	F	1:w
+觜	F	2:w
+觝	F	3:w
+觧	F	4:w
+觴	F	5:w
+觸	F	6:w
+訃	F	7:w
+訖	F	8:w
+訐	F	9:w
+訌	F	10:w
+訛	F	11:w
+訝	F	12:w
+訥	F	13:w
+訶	F	14:w
+詁	F	15:w
+詛	F	16:w
+詒	F	17:w
+詆	F	18:w
+詈	F	19:w
+詼	F	20:w
+詭	F	21:w
+詬	F	22:w
+詢	F	23:w
+誅	F	24:w
+誂	F	25:w
+誄	F	26:w
+誨	F	27:w
+誡	F	28:w
+誑	F	29:w
+誥	F	30:w
+誦	F	31:w
+誚	F	32:w
+誣	F	33:w
+諄	F	34:w
+諍	F	35:w
+諂	F	36:w
+諚	F	37:w
+諫	F	38:w
+諳	F	39:w
+諧	F	40:w
+諤	F	41:w
+諱	F	42:w
+謔	F	43:w
+諠	F	44:w
+諢	F	45:w
+諷	F	46:w
+諞	F	47:w
+諛	F	48:w
+謌	F	49:w
+謇	F	50:w
+謚	F	51:w
+諡	F	52:w
+謖	F	53:w
+謐	F	54:w
+謗	F	55:w
+謠	F	56:w
+謳	F	57:w
+鞫	F	58:w
+謦	F	59:w
+謫	F	60:w
+謾	F	61:w
+謨	F	62:w
+譁	F	63:w
+譌	F	64:w
+譏	F	65:w
+譎	F	66:w
+證	F	67:w
+譖	F	68:w
+譛	F	69:w
+譚	F	70:w
+譫	F	71:w
+譟	F	72:w
+譬	F	73:w
+譯	F	74:w
+譴	F	75:w
+譽	F	76:w
+讀	F	77:w
+讌	F	78:w
+讎	F	79:w
+讒	F	80:w
+讓	F	81:w
+讖	F	82:w
+讙	F	83:w
+讚	F	84:w
+谺	F	85:w
+豁	F	86:w
+谿	F	87:w
+豈	F	88:w
+豌	F	89:w
+豎	F	90:w
+豐	F	91:w
+豕	F	92:w
+豢	F	93:w
+豬	F	94:w
+豸	F	95:w
+豺	F	96:w
+貂	F	97:w
+貉	F	98:w
+貅	F	99:w
+貊	F	100:w
+貍	F	101:w
+貎	F	102:w
+貔	F	103:w
+豼	F	104:w
+貘	F	105:w
+戝	F	106:w
+貭	F	107:w
+貪	F	108:w
+貽	F	109:w
+貲	F	110:w
+貳	F	111:w
+貮	F	112:w
+貶	F	113:w
+賈	F	114:w
+賁	F	115:w
+賤	F	116:w
+賣	F	117:w
+賚	F	118:w
+賽	F	119:w
+賺	F	120:w
+賻	F	121:w
+贄	F	122:w
+贅	F	123:w
+贊	F	124:w
+贇	F	125:w
+贏	F	126:w
+贍	F	127:w
+贐	F	128:w
+齎	F	129:w
+贓	F	130:w
+賍	F	131:w
+贔	F	132:w
+贖	F	133:w
+赧	F	134:w
+赭	F	135:w
+赱	F	136:w
+赳	F	137:w
+趁	F	138:w
+趙	F	139:w
+跂	F	140:w
+趾	F	141:w
+趺	F	142:w
+跏	F	143:w
+跚	F	144:w
+跖	F	145:w
+跌	F	146:w
+跛	F	147:w
+跋	F	148:w
+跪	F	149:w
+跫	F	150:w
+跟	F	151:w
+跣	F	152:w
+跼	F	153:w
+踈	F	154:w
+踉	F	155:w
+跿	F	156:w
+踝	F	157:w
+踞	F	158:w
+踐	F	159:w
+踟	F	160:w
+蹂	F	161:w
+踵	F	162:w
+踰	F	163:w
+踴	F	164:w
+蹊	F	165:w
+蹇	F	166:w
+蹉	F	167:w
+蹌	F	168:w
+蹐	F	169:w
+蹈	F	170:w
+蹙	F	171:w
+蹤	F	172:w
+蹠	F	173:w
+踪	F	174:w
+蹣	F	175:w
+蹕	F	176:w
+蹶	F	177:w
+蹲	F	178:w
+蹼	F	179:w
+躁	F	180:w
+躇	F	181:w
+躅	F	182:w
+躄	F	183:w
+躋	F	184:w
+躊	F	185:w
+躓	F	186:w
+躑	F	187:w
+躔	F	188:w
+躙	F	189:w
+躪	F	190:w
+躡	F	191:w
+躬	F	192:w
+躰	F	193:w
+軆	F	194:w
+躱	F	195:w
+躾	F	196:w
+軅	F	197:w
+軈	F	198:w
+軋	F	199:w
+軛	F	200:w
+軣	F	201:w
+軼	F	202:w
+軻	F	203:w
+軫	F	204:w
+軾	F	205:w
+輊	F	206:w
+輅	F	207:w
+輕	F	208:w
+輒	F	209:w
+輙	F	210:w
+輓	F	211:w
+輜	F	212:w
+輟	F	213:w
+輛	F	214:w
+輌	F	215:w
+輦	F	216:w
+輳	F	217:w
+輻	F	218:w
+輹	F	219:w
+轅	F	220:w
+轂	F	221:w
+輾	F	222:w
+轌	F	223:w
+轉	F	224:w
+轆	F	225:w
+轎	F	226:w
+轗	F	227:w
+轜	F	228:w
+轢	F	229:w
+轣	F	230:w
+轤	F	231:w
+辜	F	232:w
+辟	F	233:w
+辣	F	234:w
+辭	F	235:w
+辯	F	236:w
+辷	F	237:w
+迚	F	238:w
+迥	F	239:w
+迢	F	240:w
+迪	F	241:w
+迯	F	242:w
+邇	F	243:w
+迴	F	244:w
+逅	F	245:w
+迹	F	246:w
+迺	F	247:w
+逑	F	248:w
+逕	F	249:w
+逡	F	250:w
+逍	F	251:w
+逞	F	252:w
+逖	F	253:w
+逋	F	254:w
+逧	F	255:w
+逶	F	0:x
+逵	F	1:x
+逹	F	2:x
+迸	F	3:x
+遏	F	4:x
+遐	F	5:x
+遑	F	6:x
+遒	F	7:x
+逎	F	8:x
+遉	F	9:x
+逾	F	10:x
+遖	F	11:x
+遘	F	12:x
+遞	F	13:x
+遨	F	14:x
+遯	F	15:x
+遶	F	16:x
+隨	F	17:x
+遲	F	18:x
+邂	F	19:x
+遽	F	20:x
+邁	F	21:x
+邀	F	22:x
+邊	F	23:x
+邉	F	24:x
+邏	F	25:x
+邨	F	26:x
+邯	F	27:x
+邱	F	28:x
+邵	F	29:x
+郢	F	30:x
+郤	F	31:x
+扈	F	32:x
+郛	F	33:x
+鄂	F	34:x
+鄒	F	35:x
+鄙	F	36:x
+鄲	F	37:x
+鄰	F	38:x
+酊	F	39:x
+酖	F	40:x
+酘	F	41:x
+酣	F	42:x
+酥	F	43:x
+酩	F	44:x
+酳	F	45:x
+酲	F	46:x
+醋	F	47:x
+醉	F	48:x
+醂	F	49:x
+醢	F	50:x
+醫	F	51:x
+醯	F	52:x
+醪	F	53:x
+醵	F	54:x
+醴	F	55:x
+醺	F	56:x
+釀	F	57:x
+釁	F	58:x
+釉	F	59:x
+釋	F	60:x
+釐	F	61:x
+釖	F	62:x
+釟	F	63:x
+釡	F	64:x
+釛	F	65:x
+釼	F	66:x
+釵	F	67:x
+釶	F	68:x
+鈞	F	69:x
+釿	F	70:x
+鈔	F	71:x
+鈬	F	72:x
+鈕	F	73:x
+鈑	F	74:x
+鉞	F	75:x
+鉗	F	76:x
+鉅	F	77:x
+鉉	F	78:x
+鉤	F	79:x
+鉈	F	80:x
+銕	F	81:x
+鈿	F	82:x
+鉋	F	83:x
+鉐	F	84:x
+銜	F	85:x
+銖	F	86:x
+銓	F	87:x
+銛	F	88:x
+鉚	F	89:x
+鋏	F	90:x
+銹	F	91:x
+銷	F	92:x
+鋩	F	93:x
+錏	F	94:x
+鋺	F	95:x
+鍄	F	96:x
+錮	F	97:x
+錙	F	98:x
+錢	F	99:x
+錚	F	100:x
+錣	F	101:x
+錺	F	102:x
+錵	F	103:x
+錻	F	104:x
+鍜	F	105:x
+鍠	F	106:x
+鍼	F	107:x
+鍮	F	108:x
+鍖	F	109:x
+鎰	F	110:x
+鎬	F	111:x
+鎭	F	112:x
+鎔	F	113:x
+鎹	F	114:x
+鏖	F	115:x
+鏗	F	116:x
+鏨	F	117:x
+鏥	F	118:x
+鏘	F	119:x
+鏃	F	120:x
+鏝	F	121:x
+鏐	F	122:x
+鏈	F	123:x
+鏤	F	124:x
+鐚	F	125:x
+鐔	F	126:x
+鐓	F	127:x
+鐃	F	128:x
+鐇	F	129:x
+鐐	F	130:x
+鐶	F	131:x
+鐫	F	132:x
+鐵	F	133:x
+鐡	F	134:x
+鐺	F	135:x
+鑁	F	136:x
+鑒	F	137:x
+鑄	F	138:x
+鑛	F	139:x
+鑠	F	140:x
+鑢	F	141:x
+鑞	F	142:x
+鑪	F	143:x
+鈩	F	144:x
+鑰	F	145:x
+鑵	F	146:x
+鑷	F	147:x
+鑽	F	148:x
+鑚	F	149:x
+鑼	F	150:x
+鑾	F	151:x
+钁	F	152:x
+鑿	F	153:x
+閂	F	154:x
+閇	F	155:x
+閊	F	156:x
+閔	F	157:x
+閖	F	158:x
+閘	F	159:x
+閙	F	160:x
+閠	F	161:x
+閨	F	162:x
+閧	F	163:x
+閭	F	164:x
+閼	F	165:x
+閻	F	166:x
+閹	F	167:x
+閾	F	168:x
+闊	F	169:x
+濶	F	170:x
+闃	F	171:x
+闍	F	172:x
+闌	F	173:x
+闕	F	174:x
+闔	F	175:x
+闖	F	176:x
+關	F	177:x
+闡	F	178:x
+闥	F	179:x
+闢	F	180:x
+阡	F	181:x
+阨	F	182:x
+阮	F	183:x
+阯	F	184:x
+陂	F	185:x
+陌	F	186:x
+陏	F	187:x
+陋	F	188:x
+陷	F	189:x
+陜	F	190:x
+陞	F	191:x
+陝	F	192:x
+陟	F	193:x
+陦	F	194:x
+陲	F	195:x
+陬	F	196:x
+隍	F	197:x
+隘	F	198:x
+隕	F	199:x
+隗	F	200:x
+險	F	201:x
+隧	F	202:x
+隱	F	203:x
+隲	F	204:x
+隰	F	205:x
+隴	F	206:x
+隶	F	207:x
+隸	F	208:x
+隹	F	209:x
+雎	F	210:x
+雋	F	211:x
+雉	F	212:x
+雍	F	213:x
+襍	F	214:x
+雜	F	215:x
+霍	F	216:x
+雕	F	217:x
+雹	F	218:x
+霄	F	219:x
+霆	F	220:x
+霈	F	221:x
+霓	F	222:x
+霎	F	223:x
+霑	F	224:x
+霏	F	225:x
+霖	F	226:x
+霙	F	227:x
+霤	F	228:x
+霪	F	229:x
+霰	F	230:x
+霹	F	231:x
+霽	F	232:x
+霾	F	233:x
+靄	F	234:x
+靆	F	235:x
+靈	F	236:x
+靂	F	237:x
+靉	F	238:x
+靜	F	239:x
+靠	F	240:x
+靤	F	241:x
+靦	F	242:x
+靨	F	243:x
+勒	F	244:x
+靫	F	245:x
+靱	F	246:x
+靹	F	247:x
+鞅	F	248:x
+靼	F	249:x
+鞁	F	250:x
+靺	F	251:x
+鞆	F	252:x
+鞋	F	253:x
+鞏	F	254:x
+鞐	F	255:x
+鞜	F	0:y
+鞨	F	1:y
+鞦	F	2:y
+鞣	F	3:y
+鞳	F	4:y
+鞴	F	5:y
+韃	F	6:y
+韆	F	7:y
+韈	F	8:y
+韋	F	9:y
+韜	F	10:y
+韭	F	11:y
+齏	F	12:y
+韲	F	13:y
+竟	F	14:y
+韶	F	15:y
+韵	F	16:y
+頏	F	17:y
+頌	F	18:y
+頸	F	19:y
+頤	F	20:y
+頡	F	21:y
+頷	F	22:y
+頽	F	23:y
+顆	F	24:y
+顏	F	25:y
+顋	F	26:y
+顫	F	27:y
+顯	F	28:y
+顰	F	29:y
+顱	F	30:y
+顴	F	31:y
+顳	F	32:y
+颪	F	33:y
+颯	F	34:y
+颱	F	35:y
+颶	F	36:y
+飄	F	37:y
+飃	F	38:y
+飆	F	39:y
+飩	F	40:y
+飫	F	41:y
+餃	F	42:y
+餉	F	43:y
+餒	F	44:y
+餔	F	45:y
+餘	F	46:y
+餡	F	47:y
+餝	F	48:y
+餞	F	49:y
+餤	F	50:y
+餠	F	51:y
+餬	F	52:y
+餮	F	53:y
+餽	F	54:y
+餾	F	55:y
+饂	F	56:y
+饉	F	57:y
+饅	F	58:y
+饐	F	59:y
+饋	F	60:y
+饑	F	61:y
+饒	F	62:y
+饌	F	63:y
+饕	F	64:y
+馗	F	65:y
+馘	F	66:y
+馥	F	67:y
+馭	F	68:y
+馮	F	69:y
+馼	F	70:y
+駟	F	71:y
+駛	F	72:y
+駝	F	73:y
+駘	F	74:y
+駑	F	75:y
+駭	F	76:y
+駮	F	77:y
+駱	F	78:y
+駲	F	79:y
+駻	F	80:y
+駸	F	81:y
+騁	F	82:y
+騏	F	83:y
+騅	F	84:y
+駢	F	85:y
+騙	F	86:y
+騫	F	87:y
+騷	F	88:y
+驅	F	89:y
+驂	F	90:y
+驀	F	91:y
+驃	F	92:y
+騾	F	93:y
+驕	F	94:y
+驍	F	95:y
+驛	F	96:y
+驗	F	97:y
+驟	F	98:y
+驢	F	99:y
+驥	F	100:y
+驤	F	101:y
+驩	F	102:y
+驫	F	103:y
+驪	F	104:y
+骭	F	105:y
+骰	F	106:y
+骼	F	107:y
+髀	F	108:y
+髏	F	109:y
+髑	F	110:y
+髓	F	111:y
+體	F	112:y
+髞	F	113:y
+髟	F	114:y
+髢	F	115:y
+髣	F	116:y
+髦	F	117:y
+髯	F	118:y
+髫	F	119:y
+髮	F	120:y
+髴	F	121:y
+髱	F	122:y
+髷	F	123:y
+髻	F	124:y
+鬆	F	125:y
+鬘	F	126:y
+鬚	F	127:y
+鬟	F	128:y
+鬢	F	129:y
+鬣	F	130:y
+鬥	F	131:y
+鬧	F	132:y
+鬨	F	133:y
+鬩	F	134:y
+鬪	F	135:y
+鬮	F	136:y
+鬯	F	137:y
+鬲	F	138:y
+魄	F	139:y
+魃	F	140:y
+魏	F	141:y
+魍	F	142:y
+魎	F	143:y
+魑	F	144:y
+魘	F	145:y
+魴	F	146:y
+鮓	F	147:y
+鮃	F	148:y
+鮑	F	149:y
+鮖	F	150:y
+鮗	F	151:y
+鮟	F	152:y
+鮠	F	153:y
+鮨	F	154:y
+鮴	F	155:y
+鯀	F	156:y
+鯊	F	157:y
+鮹	F	158:y
+鯆	F	159:y
+鯏	F	160:y
+鯑	F	161:y
+鯒	F	162:y
+鯣	F	163:y
+鯢	F	164:y
+鯤	F	165:y
+鯔	F	166:y
+鯡	F	167:y
+鰺	F	168:y
+鯲	F	169:y
+鯱	F	170:y
+鯰	F	171:y
+鰕	F	172:y
+鰔	F	173:y
+鰉	F	174:y
+鰓	F	175:y
+鰌	F	176:y
+鰆	F	177:y
+鰈	F	178:y
+鰒	F	179:y
+鰊	F	180:y
+鰄	F	181:y
+鰮	F	182:y
+鰛	F	183:y
+鰥	F	184:y
+鰤	F	185:y
+鰡	F	186:y
+鰰	F	187:y
+鱇	F	188:y
+鰲	F	189:y
+鱆	F	190:y
+鰾	F	191:y
+鱚	F	192:y
+鱠	F	193:y
+鱧	F	194:y
+鱶	F	195:y
+鱸	F	196:y
+鳧	F	197:y
+鳬	F	198:y
+鳰	F	199:y
+鴉	F	200:y
+鴈	F	201:y
+鳫	F	202:y
+鴃	F	203:y
+鴆	F	204:y
+鴪	F	205:y
+鴦	F	206:y
+鶯	F	207:y
+鴣	F	208:y
+鴟	F	209:y
+鵄	F	210:y
+鴕	F	211:y
+鴒	F	212:y
+鵁	F	213:y
+鴿	F	214:y
+鴾	F	215:y
+鵆	F	216:y
+鵈	F	217:y
+鵝	F	218:y
+鵞	F	219:y
+鵤	F	220:y
+鵑	F	221:y
+鵐	F	222:y
+鵙	F	223:y
+鵲	F	224:y
+鶉	F	225:y
+鶇	F	226:y
+鶫	F	227:y
+鵯	F	228:y
+鵺	F	229:y
+鶚	F	230:y
+鶤	F	231:y
+鶩	F	232:y
+鶲	F	233:y
+鷄	F	234:y
+鷁	F	235:y
+鶻	F	236:y
+鶸	F	237:y
+鶺	F	238:y
+鷆	F	239:y
+鷏	F	240:y
+鷂	F	241:y
+鷙	F	242:y
+鷓	F	243:y
+鷸	F	244:y
+鷦	F	245:y
+鷭	F	246:y
+鷯	F	247:y
+鷽	F	248:y
+鸚	F	249:y
+鸛	F	250:y
+鸞	F	251:y
+鹵	F	252:y
+鹹	F	253:y
+鹽	F	254:y
+麁	F	255:y
+麈	F	0:z
+麋	F	1:z
+麌	F	2:z
+麒	F	3:z
+麕	F	4:z
+麑	F	5:z
+麝	F	6:z
+麥	F	7:z
+麩	F	8:z
+麸	F	9:z
+麪	F	10:z
+麭	F	11:z
+靡	F	12:z
+黌	F	13:z
+黎	F	14:z
+黏	F	15:z
+黐	F	16:z
+黔	F	17:z
+黜	F	18:z
+點	F	19:z
+黝	F	20:z
+黠	F	21:z
+黥	F	22:z
+黨	F	23:z
+黯	F	24:z
+黴	F	25:z
+黶	F	26:z
+黷	F	27:z
+黹	F	28:z
+黻	F	29:z
+黼	F	30:z
+黽	F	31:z
+鼇	F	32:z
+鼈	F	33:z
+皷	F	34:z
+鼕	F	35:z
+鼡	F	36:z
+鼬	F	37:z
+鼾	F	38:z
+齊	F	39:z
+齒	F	40:z
+齔	F	41:z
+齣	F	42:z
+齟	F	43:z
+齠	F	44:z
+齡	F	45:z
+齦	F	46:z
+齧	F	47:z
+齬	F	48:z
+齪	F	49:z
+齷	F	50:z
+齲	F	51:z
+齶	F	52:z
+龕	F	53:z
+龜	F	54:z
+龠	F	55:z
+堯	F	56:z
+槇	F	57:z
+遙	F	58:z
+瑤	F	59:z
--- groff-1.18.1.orig/font/devX75/DESC
+++ groff-1.18.1/font/devX75/DESC
@@ -1,5 +1,17 @@
 styles R I B BI
-fonts 6 0 0 0 0 0 S
+fonts 8 0 0 0 0 0 S M G
+fontset B G 2E00..9FFF
+fontset CB G 2E00..9FFF
+fontset HB G 2E00..9FFF
+fontset NB G 2E00..9FFF
+fontset TB G 2E00..9FFF
+fontset - M 2E00..9FFF
+fontset B G FF00..FFEF
+fontset CB G FF00..FFEF
+fontset HB G FF00..FFEF
+fontset NB G FF00..FFEF
+fontset TB G FF00..FFEF
+fontset - M FF00..FFEF
 sizes 8 10 12 14 18 24 0
 res 75
 X11
--- groff-1.18.1.orig/font/devX75/Makefile.sub
+++ groff-1.18.1/font/devX75/Makefile.sub
@@ -1,2 +1,13 @@
 DEV=X75
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
+DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S M G
+CLEANADD=M G
+
+M: M.proto
+	@echo Making M
+	@-rm -f M
+	@cat $(srcdir)/M.proto > M
+
+G: M
+	@echo Making G
+	@-rm -f G
+	@sed -e 's/name M/name G/' M > G
--- groff-1.18.1.orig/font/devX75/M.proto
+++ groff-1.18.1/font/devX75/M.proto
@@ -0,0 +1,6 @@
+name M
+spacewidth 2
+charset
+u2E00..u9FFF 10 0
+uFF00..uFFEF 10 0
+
--- groff-1.18.1.orig/font/devX75-12/DESC
+++ groff-1.18.1/font/devX75-12/DESC
@@ -1,5 +1,17 @@
 styles R I B BI
-fonts 6 0 0 0 0 0 S
+fonts 8 0 0 0 0 0 S M G
+fontset B G 2E00..9FFF
+fontset CB G 2E00..9FFF
+fontset HB G 2E00..9FFF
+fontset NB G 2E00..9FFF
+fontset TB G 2E00..9FFF
+fontset - M 2E00..9FFF
+fontset B G FF00..FFEF
+fontset CB G FF00..FFEF
+fontset HB G FF00..FFEF
+fontset NB G FF00..FFEF
+fontset TB G FF00..FFEF
+fontset - M FF00..FFEF
 sizes 8 10 12 14 18 24 0
 res 75
 X11
--- groff-1.18.1.orig/font/devX75-12/Makefile.sub
+++ groff-1.18.1/font/devX75-12/Makefile.sub
@@ -1,2 +1,13 @@
 DEV=X75-12
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
+DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S M G
+CLEANADD=M G
+
+M: M.proto
+	@echo Making M
+	@-rm -f M
+	@cat $(srcdir)/M.proto > M
+
+G: M
+	@echo Making G
+	@-rm -f G
+	@sed -e 's/name M/name G/' M > G
--- groff-1.18.1.orig/font/devX75-12/M.proto
+++ groff-1.18.1/font/devX75-12/M.proto
@@ -0,0 +1,5 @@
+name M
+spacewidth 2
+charset
+u2E00..u9FFF 12 0
+uFF00..uFFEF 12 0
--- groff-1.18.1.orig/font/devX100/DESC
+++ groff-1.18.1/font/devX100/DESC
@@ -1,5 +1,17 @@
 styles R I B BI
-fonts 6 0 0 0 0 0 S
+fonts 8 0 0 0 0 0 S M G
+fontset B G 2E00..9FFF
+fontset CB G 2E00..9FFF
+fontset HB G 2E00..9FFF
+fontset NB G 2E00..9FFF
+fontset TB G 2E00..9FFF
+fontset - M 2E00..9FFF
+fontset B G FF00..FFEF
+fontset CB G FF00..FFEF
+fontset HB G FF00..FFEF
+fontset NB G FF00..FFEF
+fontset TB G FF00..FFEF
+fontset - M FF00..FFEF
 sizes 8 10 12 14 18 24 0
 res 100
 X11
--- groff-1.18.1.orig/font/devX100/Makefile.sub
+++ groff-1.18.1/font/devX100/Makefile.sub
@@ -1,2 +1,13 @@
 DEV=X100
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
+DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S M G
+CLEANADD=M G
+
+M: M.proto
+	@echo Making M
+	@-rm -f M
+	@cat $(srcdir)/M.proto > M
+
+G: M
+	@echo Making G
+	@-rm -f G
+	@sed -e 's/name M/name G/' M > G
--- groff-1.18.1.orig/font/devX100/M.proto
+++ groff-1.18.1/font/devX100/M.proto
@@ -0,0 +1,5 @@
+name M
+spacewidth 3
+charset
+u2E00..u9FFF 20 0
+uFF00..uFFEF 20 0
--- groff-1.18.1.orig/font/devX100-12/DESC
+++ groff-1.18.1/font/devX100-12/DESC
@@ -1,5 +1,17 @@
 styles R I B BI
-fonts 6 0 0 0 0 0 S
+fonts 8 0 0 0 0 0 S M G
+fontset B G 2E00..9FFF
+fontset CB G 2E00..9FFF
+fontset HB G 2E00..9FFF
+fontset NB G 2E00..9FFF
+fontset TB G 2E00..9FFF
+fontset - M 2E00..9FFF
+fontset B G FF00..FFEF
+fontset CB G FF00..FFEF
+fontset HB G FF00..FFEF
+fontset NB G FF00..FFEF
+fontset TB G FF00..FFEF
+fontset - M FF00..FFEF
 sizes 8 10 12 14 18 24 0
 res 100
 X11
--- groff-1.18.1.orig/font/devX100-12/Makefile.sub
+++ groff-1.18.1/font/devX100-12/Makefile.sub
@@ -1,2 +1,14 @@
 DEV=X100-12
-DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S
+DEVFILES=DESC TR TI TB TBI CR CI CB CBI HR HI HB HBI NR NI NB NBI S M G
+CLEANADD=M G
+
+M: M.proto
+	@echo Making M
+	@-rm -f M
+	@cat $(srcdir)/M.proto > M
+
+G: M
+	@echo Making G
+	@-rm -f G
+	@sed -e 's/name M/name G/' M > G
+
--- groff-1.18.1.orig/font/devX100-12/M.proto
+++ groff-1.18.1/font/devX100-12/M.proto
@@ -0,0 +1,5 @@
+name M
+spacewidth 4
+charset
+u2E00..u9FFF 20 0
+uFF00..uFFEF 20 0
--- groff-1.18.1.orig/font/devhtml/DESC.proto
+++ groff-1.18.1/font/devhtml/DESC.proto
@@ -3,7 +3,11 @@
 vert 40
 unitwidth 10
 sizes 6 8 10 12 14 16 18 0
-fonts 9 R I B BI CR CI CB CBI S
+fonts 11 R I B BI CR CI CB CBI S M G
+fontset B G 2E00..9FFF
+fontset - M 2E00..9FFF
+fontset B G FF00..FFEF
+fontset - M FF00..FFEF
 tcommand
 html
 postpro post-grohtml
--- groff-1.18.1.orig/font/devhtml/Makefile.sub
+++ groff-1.18.1/font/devhtml/Makefile.sub
@@ -1,8 +1,10 @@
 DEV=html
 PROTOFONTS=R I B BI CR CI CB CBI
 FONTS=$(PROTOFONTS) S
-DEVFILES=$(FONTS) DESC
-CLEANADD=$(FONTS) DESC
+WFONTS=M G
+ALLFONTS=$(FONTS) $(WFONTS)
+DEVFILES=$(ALLFONTS) DESC
+CLEANADD=$(ALLFONTS) DESC
 
 RES=240
 CPI=10
@@ -13,8 +15,8 @@
 	@-rm -f $@
 	@(charwidth=`expr $(RES) / $(CPI)` ; \
  	 sed -e "s/^name [A-Z]*$$/name $@/" \
-	     -e "s/^\\([^	]*\\)	[0-9]+	/\\1	$$charwidth	/" \
-	     -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
+	     -e "s/^\\([^	]*\\)	[0-9][0-9]*	/\\1	$$charwidth	/" \
+	     -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
 	     -e "s/^internalname .*$$/internalname $@/" \
 	     -e "/^internalname/s/CR/4/" \
 	     -e "/^internalname/s/BI/3/" \
@@ -29,6 +31,19 @@
 	@sed -e "s/^res .*$$/res $(RES)/" \
 	    -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
 	    -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
-	    -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
+	    -e "s/^fonts .*$$/fonts `set $(ALLFONTS); echo $$#` $(ALLFONTS)/" \
 	    $(srcdir)/DESC.proto >$@
 
+M: M.proto
+	@echo Making M
+	@-rm -f M
+	@(wcharwidth=`expr $(RES) / $(CPI) \* 2`; \
+	  spacewidth=`expr $(RES) / $(CPI)`; \
+	 sed -e "s/^u\\([0-9A-F]*\\)..u\\([0-9A-F]*\\) [0-9][0-9]*/u\\1..u\\2 $$wcharwidth/" \
+	     -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$spacewidth/" \
+	   $(srcdir)/M.proto > $@)
+
+G: M
+	@echo Making G
+	@-rm -f G
+	@sed -e 's/name M/name G/' M > G
--- groff-1.18.1.orig/font/devhtml/M.proto
+++ groff-1.18.1/font/devhtml/M.proto
@@ -0,0 +1,5 @@
+name M
+spacewidth 16
+charset
+u2E00..u9FFF 16,14,2 0
+uFF00..uFFEF 16,14,2 0
--- groff-1.18.1.orig/font/devlj4/Makefile.sub
+++ groff-1.18.1/font/devlj4/Makefile.sub
@@ -22,9 +22,9 @@
 	echo "unitwidth `expr 7620000 / $(LJ4RES)`" >>DESC
 	cat $(srcdir)/DESC.in >>DESC
 	if test "$(PAGE)" = A4; then \
-	  echo "papersize a4" >>DESC; \
+	  echo "papersize /etc/papersize a4" >>DESC; \
 	else \
-	  echo "papersize letter" >>DESC; \
+	  echo "papersize /etc/papersize letter" >>DESC; \
 	fi
 	test -z '$(LJ4PRINT)' || echo print '$(LJ4PRINT)' >>DESC
 
--- groff-1.18.1.orig/font/devlbp/Makefile.sub
+++ groff-1.18.1/font/devlbp/Makefile.sub
@@ -13,9 +13,9 @@
 	-rm -f DESC
 	cat $(srcdir)/DESC.in >>DESC
 	if test "$(PAGE)" = A4; then \
-	  echo "papersize a4" >>DESC; \
+	  echo "papersize /etc/papersize a4" >>DESC; \
 	else \
-	  echo "papersize letter" >>DESC; \
+	  echo "papersize /etc/papersize letter" >>DESC; \
 	fi
 	test -z '$(LBPPRINT)' || echo print '$(LBPPRINT)' >>DESC
 
--- groff-1.18.1.orig/font/devascii/Makefile.sub
+++ groff-1.18.1/font/devascii/Makefile.sub
@@ -12,8 +12,8 @@
 	@-rm -f $@
 	@(charwidth=`expr $(RES) / $(CPI)` ; \
  	 sed -e "s/^name [A-Z]*$$/name $@/" \
-	     -e "s/^\\([^	]*\\)	[0-9]+	/\\1	$$charwidth	/" \
-	     -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
+	     -e "s/^\\([^	]*\\)	[0-9][0-9]*	/\\1	$$charwidth	/" \
+	     -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
 	     -e "s/^internalname .*$$/internalname $@/" \
 	     -e "/^internalname/s/BI/3/" \
 	     -e "/^internalname/s/B/2/" \
--- groff-1.18.1.orig/font/devutf8/DESC.proto
+++ groff-1.18.1/font/devutf8/DESC.proto
@@ -3,6 +3,10 @@
 vert 40
 unitwidth 10
 sizes 10 0
-fonts 4 R I B BI
+fonts 6 R I B BI M G
+fontset B G 2E00..9FFF
+fontset B G FF00..FFEF
+fontset - M 2E00..9FFF
+fontset - M FF00..FFEF
 tcommand
 postpro grotty
--- groff-1.18.1.orig/font/devutf8/Makefile.sub
+++ groff-1.18.1/font/devutf8/Makefile.sub
@@ -1,7 +1,8 @@
 DEV=utf8
 FONTS=R I B BI
-DEVFILES=$(FONTS) DESC
-CLEANADD=$(FONTS) DESC
+WFONTS=M G
+DEVFILES=$(FONTS) $(WFONTS) DESC
+CLEANADD=$(FONTS) $(WFONTS) DESC
 
 RES=240
 CPI=10
@@ -12,8 +13,8 @@
 	@-rm -f $@
 	@(charwidth=`expr $(RES) / $(CPI)` ; \
  	 sed -e "s/^name [A-Z]*$$/name $@/" \
-	     -e "s/^\\([^	]*\\)	[0-9]+	/\\1	$$charwidth	/" \
-	     -e "s/^spacewidth [0-9]+$$/spacewidth $$charwidth/" \
+	     -e "s/^\\([^	]*\\)	[0-9][0-9]*	/\\1	$$charwidth	/" \
+	     -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
 	     -e "s/^internalname .*$$/internalname $@/" \
 	     -e "/^internalname/s/BI/3/" \
 	     -e "/^internalname/s/B/2/" \
@@ -21,12 +22,27 @@
 	     -e "/^internalname .*[^ 0-9]/d" \
 	     $(srcdir)/R.proto >$@)
 
+M: M.proto
+	@echo Making M
+	@-rm -f M
+	(wcharwidth=`expr $(RES) / $(CPI) \* 2` ; \
+	  spacewidth=`expr $(RES) / $(CPI)` ; \
+	  sed -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$spacewidth/" \
+	      -e "s/^u\\([0-9A-F]*\\)..u\\([0-9A-F]*\\) [0-9][0-9]*/u\\1..u\\2 $$wcharwidth/" \
+	  $(srcdir)/M.proto > $@)
+
+G: M
+	@echo Making G
+	@-rm -f G
+	@sed -e 's/name M/name G/' \
+	    -e 's/internalname 4/internalname 5/' M > G
+
 DESC: DESC.proto
 	@echo Making $@
 	@-rm -f $@
 	@sed -e "s/^res .*$$/res $(RES)/" \
 	    -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
 	    -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
-	    -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
+	    -e "s/^fonts .*$$/fonts `set $(FONTS) $(WFONTS); echo $$#` $(FONTS) $(WFONTS)/" \
 	    $(srcdir)/DESC.proto >$@
 
--- groff-1.18.1.orig/font/devutf8/M.proto
+++ groff-1.18.1/font/devutf8/M.proto
@@ -0,0 +1,6 @@
+name M
+internalname 4
+spacewidth 48
+charset
+u2E00..u9FFF 48 0
+uFF00..uFFEF 48 0
--- groff-1.18.1.orig/font/devascii8/DESC.proto
+++ groff-1.18.1/font/devascii8/DESC.proto
@@ -0,0 +1,8 @@
+res 240
+hor 24
+vert 40
+unitwidth 10
+sizes 10 0
+fonts 4 R I B BI
+tcommand
+postpro grotty
--- groff-1.18.1.orig/font/devascii8/Makefile.sub
+++ groff-1.18.1/font/devascii8/Makefile.sub
@@ -0,0 +1,31 @@
+DEV=ascii8
+FONTS=R I B BI
+DEVFILES=$(FONTS) DESC
+CLEANADD=$(FONTS) DESC
+
+RES=240
+CPI=10
+LPI=6
+
+$(FONTS): R.proto
+	@echo Making $@
+	@-rm -f $@
+	@(charwidth=`expr $(RES) / $(CPI)` ; \
+ 	 sed -e "s/^name [A-Z]*$$/name $@/" \
+	     -e "s/^\\([^	]*\\)	[0-9][0-9]*	/\\1	$$charwidth	/" \
+	     -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
+	     -e "s/^internalname .*$$/internalname $@/" \
+	     -e "/^internalname/s/BI/3/" \
+	     -e "/^internalname/s/B/2/" \
+	     -e "/^internalname/s/I/1/" \
+	     -e "/^internalname .*[^ 0-9]/d" \
+	     $(srcdir)/R.proto >$@)
+
+DESC: DESC.proto
+	@echo Making $@
+	@-rm -f $@
+	@sed -e "s/^res .*$$/res $(RES)/" \
+	    -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
+	    -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
+	    -e "s/^fonts .*$$/fonts `set $(FONTS); echo $$#` $(FONTS)/" \
+	    $(srcdir)/DESC.proto >$@
--- groff-1.18.1.orig/font/devascii8/R.proto
+++ groff-1.18.1/font/devascii8/R.proto
@@ -0,0 +1,262 @@
+name R
+internalname 0
+spacewidth 24
+charset
+!	24	0	0041
+"	24	0	0042
+dq	"
+lq	"
+rq	"
+#	24	0	0043
+sh	"
+$	24	0	0044
+Do	"
+%	24	0	0045
+&	24	0	0046
+'	24	0	0047
+aa	"
+fm	"
+aq	"
+cq	"
+(	24	0	0050
+)	24	0	0051
+*	24	0	0052
+**	"
++	24	0	0053
+pl	"
+,	24	0	0054
+\-	24	0	0055
+hy	"
+-	"
+mi	"
+en	"
+.	24	0	0056
+/	24	0	0057
+sl	"
+f/	"
+0	24	0	0060
+1	24	0	0061
+2	24	0	0062
+3	24	0	0063
+4	24	0	0064
+5	24	0	0065
+6	24	0	0066
+7	24	0	0067
+8	24	0	0070
+9	24	0	0071
+:	24	0	0072
+;	24	0	0073
+<	24	0	0074
+la	"
+fo	"
+=	24	0	0075
+eq	"
+>	24	0	0076
+ra	"
+fc	"
+?	24	0	0077
+@	24	0	0100
+at	"
+A	24	0	0101
+*A	"
+B	24	0	0102
+*B	"
+C	24	0	0103
+D	24	0	0104
+E	24	0	0105
+*E	"
+F	24	0	0106
+G	24	0	0107
+H	24	0	0110
+*Y	"
+I	24	0	0111
+*I	"
+J	24	0	0112
+K	24	0	0113
+*K	"
+L	24	0	0114
+M	24	0	0115
+*M	"
+N	24	0	0116
+*N	"
+O	24	0	0117
+ci	"
+*O	"
+P	24	0	0120
+*R	"
+Q	24	0	0121
+R	24	0	0122
+S	24	0	0123
+T	24	0	0124
+*T	"
+U	24	0	0125
+V	24	0	0126
+W	24	0	0127
+X	24	0	0130
+*X	"
+Y	24	0	0131
+*U	"
+Z	24	0	0132
+*Z	"
+[	24	0	0133
+lB	"
+\	24	0	0134
+rs	"
+]	24	0	0135
+rB	"
+a^	24	0	0136
+^	"
+ha	"
+_	24	0	0137
+ru	"
+ul	"
+`	24	0	0140
+oq	"
+ga	"
+a	24	0	0141
+b	24	0	0142
+c	24	0	0143
+d	24	0	0144
+e	24	0	0145
+f	24	0	0146
+g	24	0	0147
+h	24	0	0150
+i	24	0	0151
+.i	"
+j	24	0	0152
+k	24	0	0153
+l	24	0	0154
+m	24	0	0155
+n	24	0	0156
+o	24	0	0157
+*o	"
+p	24	0	0160
+q	24	0	0161
+r	24	0	0162
+s	24	0	0163
+t	24	0	0164
+u	24	0	0165
+v	24	0	0166
+w	24	0	0167
+x	24	0	0170
+mu	"
+y	24	0	0171
+z	24	0	0172
+lC	24	0	0173
+{	"
+ba	24	0	0174
+or	"
+bv	"
+br	"
+|	"
+lb	"
+lc	"
+lf	"
+lk	"
+lt	"
+rb	"
+rc	"
+rf	"
+rk	"
+rt	"
+rC	24	0	0175
+}	"
+a~	24	0	0176
+~	"
+ap	"
+ti	"
+char161	24	0	0241
+char162	24	0	0242
+char163	24	0	0243
+char164	24	0	0244
+char165	24	0	0245
+char166	24	0	0246
+char167	24	0	0247
+char168	24	0	0250
+char169	24	0	0251
+char170	24	0	0252
+char171	24	0	0253
+char172	24	0	0254
+char173	24	0	0255 
+char174	24	0	0256
+char175	24	0	0257
+char176	24	0	0260
+char177	24	0	0261
+char178	24	0	0262
+char179	24	0	0263
+char180	24	0	0264
+char181	24	0	0265
+char182	24	0	0266
+char183	24	0	0267
+char184	24	0	0270
+char185	24	0	0271
+char186	24	0	0272
+char187	24	0	0273
+char188	24	0	0274
+char189	24	0	0275
+char190	24	0	0276
+char191	24	0	0277
+char192	24	0	0300
+char193	24	0	0301
+char194	24	0	0302
+char195	24	0	0303
+char196	24	0	0304
+char197	24	0	0305
+char198	24	0	0306
+char199	24	0	0307
+char200	24	0	0310
+char201	24	0	0311
+char202	24	0	0312
+char203	24	0	0313
+char204	24	0	0314
+char205	24	0	0315
+char206	24	0	0316
+char207	24	0	0317
+char208	24	0	0320
+char209	24	0	0321
+char210	24	0	0322
+char211	24	0	0323
+char212	24	0	0324
+char213	24	0	0325
+char214	24	0	0326
+char215	24	0	0327
+char216	24	0	0330
+char217	24	0	0331
+char218	24	0	0332
+char219	24	0	0333
+char220	24	0	0334
+char221	24	0	0335
+char222	24	0	0336
+char223	24	0	0337
+char224	24	0	0340
+char225	24	0	0341
+char226	24	0	0342
+char227	24	0	0343
+char228	24	0	0344
+char229	24	0	0345
+char230	24	0	0346
+char231	24	0	0347
+char232	24	0	0350
+char233	24	0	0351
+char234	24	0	0352
+char235	24	0	0353
+char236	24	0	0354
+char237	24	0	0355
+char238	24	0	0356
+char239	24	0	0357
+char240	24	0	0360
+char241	24	0	0361
+char242	24	0	0362
+char243	24	0	0363
+char244	24	0	0364
+char245	24	0	0365
+char246	24	0	0366
+char247	24	0	0367
+char248	24	0	0370
+char249	24	0	0371
+char250	24	0	0372
+char251	24	0	0373
+char252	24	0	0374
+char253	24	0	0375
+char254	24	0	0376
+char255	24	0	0377
--- groff-1.18.1.orig/font/devnippon/DESC.proto
+++ groff-1.18.1/font/devnippon/DESC.proto
@@ -0,0 +1,12 @@
+res 240
+hor 24
+vert 40
+unitwidth 10
+sizes 10 0
+fonts 6 R I B BI M G
+fontset B G 2E00..9FFF
+fontset - M 2E00..9FFF
+fontset B G FF00..FFEF
+fontset - M FF00..FFEF
+tcommand
+postpro grotty
--- groff-1.18.1.orig/font/devnippon/Makefile.sub
+++ groff-1.18.1/font/devnippon/Makefile.sub
@@ -0,0 +1,48 @@
+DEV=nippon
+FONTS=R I B BI
+WFONTS=M G
+ALLFONTS=$(FONTS) $(WFONTS)
+DEVFILES=$(ALLFONTS) DESC
+CLEANADD=$(ALLFONTS) DESC
+
+RES=240
+CPI=10
+LPI=6
+
+$(FONTS): R.proto
+	@echo Making $@
+	@-rm -f $@
+	@(charwidth=`expr $(RES) / $(CPI)` ; \
+ 	 sed -e "s/^name [A-Z]*$$/name $@/" \
+	     -e "s/^\\([^	]*\\)	[0-9][0-9]*	/\\1	$$charwidth	/" \
+	     -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$charwidth/" \
+	     -e "s/^internalname .*$$/internalname $@/" \
+	     -e "/^internalname/s/BI/3/" \
+	     -e "/^internalname/s/B/2/" \
+	     -e "/^internalname/s/I/1/" \
+	     -e "/^internalname .*[^ 0-9]/d" \
+	     $(srcdir)/R.proto >$@)
+
+M: M.proto
+	@echo Making M
+	@-rm -f M
+	@(wcharwidth=`expr $(RES) / $(CPI) \* 2` ; \
+	  spacewidth=`expr $(RES) / $(CPI)` ; \
+	  sed -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$spacewidth/" \
+	      -e "s/^u\\([0-9A-F]*\\)..u\\([0-9A-F]*\\) [0-9][0-9]*/u\\1..u\\2 $$wcharwidth/" \
+	  $(srcdir)/M.proto > $@)
+
+G: M
+	@echo Making G
+	@-rm -f G
+	@sed -e 's/name M/name G/' \
+	    -e 's/internalname 4/internalname 5/' M > G
+		
+DESC: DESC.proto
+	@echo Making $@
+	@-rm -f $@
+	@sed -e "s/^res .*$$/res $(RES)/" \
+	    -e "s/^hor .*$$/hor `expr $(RES) / $(CPI)`/" \
+	    -e "s/^vert .*$$/vert `expr $(RES) / $(LPI)`/" \
+	    -e "s/^fonts .*$$/fonts `set $(ALLFONTS); echo $$#` $(ALLFONTS)/" \
+	    $(srcdir)/DESC.proto >$@
--- groff-1.18.1.orig/font/devnippon/M.proto
+++ groff-1.18.1/font/devnippon/M.proto
@@ -0,0 +1,6 @@
+name M
+internalname 4
+spacewidth 48
+charset
+u2E00..u9FFF 48 0
+uFF00..uFFEF 48 0
--- groff-1.18.1.orig/font/devnippon/R.proto
+++ groff-1.18.1/font/devnippon/R.proto
@@ -0,0 +1,167 @@
+name R
+internalname 0
+spacewidth 24
+charset
+!	24	0	0041
+"	24	0	0042
+dq	"
+lq	"
+rq	"
+#	24	0	0043
+sh	"
+$	24	0	0044
+Do	"
+%	24	0	0045
+&	24	0	0046
+'	24	0	0047
+aa	"
+fm	"
+aq	"
+cq	"
+(	24	0	0050
+)	24	0	0051
+*	24	0	0052
+**	"
++	24	0	0053
+pl	"
+,	24	0	0054
+\-	24	0	0055
+hy	"
+-	"
+mi	"
+en	"
+.	24	0	0056
+/	24	0	0057
+sl	"
+f/	"
+0	24	0	0060
+1	24	0	0061
+2	24	0	0062
+3	24	0	0063
+4	24	0	0064
+5	24	0	0065
+6	24	0	0066
+7	24	0	0067
+8	24	0	0070
+9	24	0	0071
+:	24	0	0072
+;	24	0	0073
+<	24	0	0074
+la	"
+fo	"
+=	24	0	0075
+eq	"
+>	24	0	0076
+ra	"
+fc	"
+?	24	0	0077
+@	24	0	0100
+at	"
+A	24	0	0101
+*A	"
+B	24	0	0102
+*B	"
+C	24	0	0103
+D	24	0	0104
+E	24	0	0105
+*E	"
+F	24	0	0106
+G	24	0	0107
+H	24	0	0110
+*Y	"
+I	24	0	0111
+*I	"
+J	24	0	0112
+K	24	0	0113
+*K	"
+L	24	0	0114
+M	24	0	0115
+*M	"
+N	24	0	0116
+*N	"
+O	24	0	0117
+ci	"
+*O	"
+P	24	0	0120
+*R	"
+Q	24	0	0121
+R	24	0	0122
+S	24	0	0123
+T	24	0	0124
+*T	"
+U	24	0	0125
+V	24	0	0126
+W	24	0	0127
+X	24	0	0130
+*X	"
+Y	24	0	0131
+*U	"
+Z	24	0	0132
+*Z	"
+[	24	0	0133
+lB	"
+\	24	0	0134
+rs	"
+]	24	0	0135
+rB	"
+a^	24	0	0136
+^	"
+ha	"
+_	24	0	0137
+ru	"
+ul	"
+`	24	0	0140
+oq	"
+ga	"
+a	24	0	0141
+b	24	0	0142
+c	24	0	0143
+d	24	0	0144
+e	24	0	0145
+f	24	0	0146
+g	24	0	0147
+h	24	0	0150
+i	24	0	0151
+.i	"
+j	24	0	0152
+k	24	0	0153
+l	24	0	0154
+m	24	0	0155
+n	24	0	0156
+o	24	0	0157
+*o	"
+p	24	0	0160
+q	24	0	0161
+r	24	0	0162
+s	24	0	0163
+t	24	0	0164
+u	24	0	0165
+v	24	0	0166
+w	24	0	0167
+x	24	0	0170
+mu	"
+y	24	0	0171
+z	24	0	0172
+lC	24	0	0173
+{	"
+ba	24	0	0174
+or	"
+bv	"
+br	"
+|	"
+lb	"
+lc	"
+lf	"
+lk	"
+lt	"
+rb	"
+rc	"
+rf	"
+rk	"
+rt	"
+rC	24	0	0175
+}	"
+a~	24	0	0176
+~	"
+ap	"
+ti	"
--- groff-1.18.1.orig/tmac/Makefile.sub
+++ groff-1.18.1/tmac/Makefile.sub
@@ -25,15 +25,18 @@
   html.tmac www.tmac \
   eqnrc \
   troffrc troffrc-end \
-  hyphen.us
+  hyphen.us \
+  andocj.tmac \
+  euc-jp.tmac
 SPECIALFILES=an.tmac man.tmac s.tmac ms.tmac
-STRIPFILES=e.tmac doc.tmac doc-old.tmac
-MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
+STRIPFILES=e.tmac doc.tmac doc-old.tmac docj.tmac
+MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms docj-ditroff docj-nroff
 mdocdir=$(tmacdir)/mdoc
 CLEANADD=\
   stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed \
   stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \
-  doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s
+  doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s \
+  docj.tmac-s docj-ditroff-s docj-nroff-s
 tmac_s_prefix=
 tmac_an_prefix=
 tmac_wrap=
--- groff-1.18.1.orig/tmac/troffrc
+++ groff-1.18.1/tmac/troffrc
@@ -13,7 +13,9 @@
 .do ds troffrc!X100 X.tmac
 .do ds troffrc!X100-12 X.tmac
 .do ds troffrc!ascii tty.tmac
+.do ds troffrc!ascii8 tty.tmac
 .do ds troffrc!latin1 tty.tmac
+.do ds troffrc!nippon tty.tmac
 .do ds troffrc!utf8 tty.tmac
 .do ds troffrc!cp1047 tty.tmac
 .do ds troffrc!lj4 lj4.tmac
@@ -36,4 +38,7 @@
 .\" Load hyphenation patterns from `hyphen.us' (in the tmac directory).
 .do hpf hyphen.us
 .
+.\" for Japanese hack
+.if "\V[LANG]"ja_JP.eucJP" .do mso euc-jp.tmac
+.
 .\" Don't let blank lines creep in here.
--- groff-1.18.1.orig/tmac/tty.tmac
+++ groff-1.18.1/tmac/tty.tmac
@@ -68,7 +68,7 @@
 .ie '\*(.T'cp1047' \
 .  do mso cp1047.tmac
 .el \
-.  if '\*(.T'latin1' \
+.  if !'\*(.T'ascii' \
 .    do mso latin1.tmac
 .
 .\" If you want the character definitions in tty-char.tmac to be loaded
--- groff-1.18.1.orig/tmac/andocj.tmac
+++ groff-1.18.1/tmac/andocj.tmac
@@ -0,0 +1,12 @@
+.\" Load either tmac.an or tmac.doc.
+.if !\n(.g .ab These macros require groff.
+.de Dd
+.rm Dd
+.do mso tmac.docj
+\\*(Dd\\
+..
+.de TH
+.rm TH
+.do mso tmac.an
+\\*(TH\\
+..
--- groff-1.18.1.orig/tmac/docj-ditroff
+++ groff-1.18.1/tmac/docj-ditroff
@@ -0,0 +1,305 @@
+.\" Copyright (c) 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"	This product includes software developed by the University of
+.\"	California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"     @(#)doc-ditroff	5.8 (Berkeley) 8/5/91
+.\"
+.\" tmac.mdoc-ditroff
+.if \n(.g .if !rC .nr C 0
+.ds aD \fI\s10
+.ds aR \f(CO\s10
+.ds cM \f(CB\s10
+.ds dF \fR\s10
+.ds eM \fI\s10
+.ds eR \fC\s10
+.ds eV \fC\s10
+.ds fA \f(CO\s10
+.ds fD \f(CB\s10
+.ds fL \f(CB\s10
+.ds fN \f(CB\s10
+.ds fP \fP\s0
+.ds fS \s0
+.ds fT \f(CO\s10
+.ds Hs \fR\s10
+.ds iC \f(CB\s10
+.ds lI \fC
+.ds lP \fR\|(\|\fP\s10
+.ds lp \fR(\fP\s10
+.ds rP \fR\|)\|\fP\s10
+.ds rp \fR)\fP\s10
+.ds lB \fR\^[\^\fP\s10
+.ds rB \fR\^]\fP\s10
+.ds mL \fB\s10
+.ds nM \f(CB\s10
+.ds nO \fR\s10
+.ds nT \s0
+.ds pA \fC\s10
+.ds Pu \fR{\ .\ ,\ :\ ;\ (\ )\ [\ ]\ \fR}
+.ds rA \fR\s10
+.ds rT \f(CO\s10
+.ds sH \fB\s10
+.ds sP \s0
+.ds sY \fB\s10
+.ds sX \fR\s10
+.ds tF \fR
+.ds tN \s9
+.ds vA \fI\s10
+.ds Vs \fR\s10
+.ds vT \f(CB\s10
+.ds xR \fC\s10
+.tr *\(**
+.nr sI \w\fC,u*5
+.nr Ti \n(sIu
+.nr Pp .5v
+.ds lS \0
+.nr lS \w'\0'u
+.nr dI 6n
+.de pL
+.nr Hm .5i
+.nr Fm .5i
+.nr ll 6.5i
+.ll 6.5i
+.nr lt 6.5i
+.lt 6.5i
+.nr po 1i
+.po 1.i
+.nr dV .5v
+..
+.ds <= \(<=
+.ds >= \(>=
+.ie \n(.g \{\
+.	ds Lq \(lq
+.	ds Rq \(rq
+.\}
+.el \{\
+.	ds Lq \&``
+.	ds Rq \&''
+.\}
+.ds ua \(ua
+.ds aa \(aa
+.ds ga \(ga
+.ds sR \&'
+.ds sL \&`
+.ds q \&"
+.ds Pi \(*p
+.ds Ne \(!=
+.ds Le \(<=
+.ds Ge \(>=
+.ds Lt <
+.ds Gt >
+.ds Pm \(+-
+.ds If \(if
+.ds Na \fINaN\fP
+.ds Ba \fR\&|\fP
+.nr gX 0
+.de hK
+.ds hT \\*(dT
+.if !"\\*(cH"Null" \{\
+.       ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
+.       el .as hT \\|(\\|\\*(cH\\|)
+.\}
+.if "\\*(cH"Null" \{\
+.	if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
+.\}
+.wh 0 hM
+.wh -1.25i fM
+.nr nL \\n(nl
+.ie \\n(gX==1 \{\
+.	rm n1
+.	bp
+.\}
+.el \{\
+'	bp
+.\}
+.if \\n(nL>0 \{\
+.	if !\\nC \{\
+.		nr % 1
+.	\}
+.\}
+.nr gX 0
+.em lM
+..
+.nr fW \w\fC0
+.de sW
+.nr sW \w\fC\\$1
+.ie \\n(sW>=\\n(fW \{\
+.       ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
+.       el .nr sW \\n(sW/\\n(fW
+.\}
+.el \{\
+.	ie \\n(sW>0 .nr sW 1
+.	el .nr sW 0
+.\}
+..
+.de aW
+.nr sW \w\fC\\*(A\\$1
+.ie \\n(sW>=\\n(fW \{\
+.       ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
+.       el .nr sW \\n(sW/\\n(fW
+.\}
+.el \{\
+.	ie \\n(sW>0 .nr sW 1
+.	el .nr sW 0
+.\}
+..
+.de Ql
+.if \\n(aC==0  \{\
+.	ds mN Ql
+.       ds A1 \\$1
+.       ds A2 \\$2
+.       ds A3 \\$3
+.       ds A4 \\$4
+.       ds A5 \\$5
+.       ds A6 \\$6
+.       ds A7 \\$7
+.       ds A8 \\$8
+. 	nr fV \\n(.$
+. 	fV
+.\}
+.nr aP \\n(aP+1
+.aW \\n(aP
+.nr aP \\n(aP-1
+.if \\n(sW>2 .Li
+.if \\n(sW<=2 \{\
+.	if (\\n(aP>0) \{\
+.		ds A\\n(aP Li
+.		nr aP \\n(aP -1
+.	\}		
+.	if (\\n(aP==0) \{\
+.		rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
+.		rm S1 S2 S3 S4 S5 S6 S7 S8 S9
+.		rn A8 A9
+.		rn A7 A8
+.		rn A6 A7
+.		rn A5 A6
+.		rn A4 A5
+.		rn A3 A4
+.		rn A2 A3
+.		rn A1 A2
+.		ds A1 Li
+.	 	nr fV \\n(aC+1
+.		nr aC 0
+.		fV
+.	\}
+.	ds qL \&\\*(sL
+.	ds qR \&\\*(sR
+.	En
+.\}
+..
+.de Sh
+.nr nS 0
+.nr sE 0
+.nr iS 0
+'ad
+.ie "\\$1"NAME" \{\
+.       hK
+'       in 0
+.\}
+.el \{\
+.	ie "\\$1"名前" \{\
+.      		hK
+'		in 0
+.	\}
+.	el \{\
+.		ie "\\$1"名称" \{\
+.       		hK
+'       		in 0
+.		\}
+.		el \{\
+.       		nr nS 0
+.       		nr nA 0
+.			nr nF 0
+.       		nr nT 0
+.       		nr nY 0
+.       		nr oT 0
+.       		if "\\$1"SYNOPSIS" \{\
+.				na
+.				nr nS 1
+.			\}
+.       		if "\\$1"書式" \{\
+.				na
+.				nr nS 1
+.			\}
+.       		if "\\$1"DESCRIPTION" \{\
+.				nr fY 0
+.				nr fZ 0
+.				nr fB 0
+.				nr Fb 0
+.				ds Fb
+.			\}
+.       		if "\\$1"説明" \{\
+.				nr fY 0
+.				nr fZ 0
+.				nr fB 0
+.				nr Fb 0
+.				ds Fb
+.			\}
+.       		if "\\$1"解説" \{\
+.				nr fY 0
+.				nr fZ 0
+.				nr fB 0
+.				nr Fb 0
+.				ds Fb
+.			\}
+.       		if "\\$1"SEE" \{\
+.               		nr nA 1
+.               		na
+.       		\}
+.       		if "\\$1"関連項目" \{\
+.               		nr nA 1
+.               		na
+.       		\}
+.       		if "\\$1"FILES" .nr nF 1
+.       		if "\\$1"ファイル" .nr nF 1
+.       		if "\\$1"関連ファイル" .nr nF 1
+.       		if "\\$1"STANDARDS" .nr nT 1
+.       		if "\\$1"準拠" .nr nT 1
+.       		if "\\$1"規格" .nr nT 1
+.       		if "\\$1"AUTHORS" .nr nY 1
+.       		if "\\$1"著者" .nr nY 1
+.       		if "\\$1"作者" .nr nY 1
+.			if "\\$1"SEE" .nr sE 1
+.			if "\\$1"関連項目" .nr sE 1
+.       		in 0
+.       		nr aN 0
+.		\}
+.	\}
+.\}
+.pL
+'sp
+.ns
+.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
+.if !\\n(cR .ne 3
+'fi
+\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
+\&\fP\s0\&
+.in \\n(.iu+\\n(Tiu
+.ns
+..
--- groff-1.18.1.orig/tmac/docj-nroff
+++ groff-1.18.1/tmac/docj-nroff
@@ -0,0 +1,247 @@
+.\" Copyright (c) 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"	This product includes software developed by the University of
+.\"	California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"     @(#)doc-nroff	5.6 (Berkeley) 8/5/91
+.\"
+.\" tmac.mdoc-nroff
+.ds aD \fI
+.ds aR \fI
+.ds cM \fB
+.ds dF \fR
+.ds eM \fI
+.ds eR \fR
+.ds eV \fR
+.ds fA \fI
+.ds fD \fB
+.ds fL \fB
+.ds fN \fB
+.ds fP \fP
+.ds fS
+.ds fT \fI
+.ds Hs \fR
+.ds iC \fB
+.ds lI \fR
+.ds lP \fR\|(\fP
+.ds rP \fR\|)\fP
+.ds lp \fR\|(\fP
+.ds rp \fR\|)\fP
+.ds lB \fR\|[\|\fP
+.ds rB \fR\|]\fP
+.ds mL \fB
+.ds nM \fB
+.ds nO \fR
+.ds pA \fI
+.ds Pu {\ .\ ,\ ;\ :\ (\ )\ [\ ]}
+.ds rA \fR
+.ds rT \fI
+.ds sH \fB
+.ds sP
+.ds sY \fB
+.ds sX \fI
+.ds tF \fR
+.ds tN
+.ds vA \fI
+.ds Vs \fR
+.ds vT \fB
+.ds xR \fR
+.nr sI .5i
+.nr Ti .5i
+.nr cR 1
+.nr Pp 1v
+.ds lS \0\0
+.nr lS \w'\0\0'u
+.nr dI 6n
+.de pL
+.ie \\n(cR .nr Hm 0
+.el .nr Hm .5i
+.nr Fm .5i
+.nr ll 78n
+.ll 78n
+.nr lt 78n
+.lt 78n
+.nr po 0i
+.po 0i
+.nr dV 1v
+.ad l
+.na
+..
+.ds <= \&<\&=
+.ds >= \&>\&=
+.ds Rq ''
+.ds Lq ``
+.ds ua ^
+.ds aa \'
+.ds ga \`
+.ds sL `
+.ds sR '
+.ds q \&"
+.ds Pi pi
+.ds Ne !=
+.ds Le <=
+.ds Ge >=
+.ds Lt <
+.ds Gt >
+.ds Pm +-
+.ds If infinity
+.ds Na \fINaN\fP
+.ds Ba \fR\&|\fP
+
+.de hK
+.nr % 1
+.ds hT \\*(dT
+.if !"\\*(cH"Null" \{\
+.	ie !"\\*(gP"Null" .as hT \|(\|\\*(cH\\*(gP\|)
+.	el .as hT \\|(\\|\\*(cH\\|)
+.\}
+.if "\\*(cH"Null" .if !"\\*(gP"Null" .as hT \&\|(\|\\*(gP\|)
+.ie \\n(cR \{\
+.	hM
+.	wh -1v fM
+.\}
+.el \{\
+.	wh 0 hM
+.	wh -1.167i fM
+.\}
+.if \\n(nl==0:\\n(nl==-1 'bp
+.em lM
+..
+.nr fW \w'0'
+.de sW
+.nr sW \w\\$1
+.ie \\n(sW>=\\n(fW \{\
+.       ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
+.       el .nr sW \\n(sW/\\n(fW
+.\}
+.el .nr sW 0
+..
+.de aW
+.nr sW \w\\*(A\\$1
+.ie \\n(sW>=\\n(fW \{\
+.       ie \\n(sW%\\n(fW .nr sW (\\n(sW/\\n(fW)+1
+.       el .nr sW \\n(sW/\\n(fW
+.\}
+.el .nr sW 0
+..
+.de Ql
+.if \\n(aC==0  \{\
+.	ds mN Ql
+.	ds A1 \\$1
+.	ds A2 \\$2
+.	ds A3 \\$3
+.	ds A4 \\$4
+.	ds A5 \\$5
+.	ds A6 \\$6
+.	ds A7 \\$7
+.	ds A8 \\$8
+.	ds A9 \\$9
+.	nr fV \\n(.$
+. 	fV
+.\}
+.ds qL \&\\*(sL
+.ds qR \&\\*(sR
+.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.de Sh
+.nr nS 0
+.nr sE 0
+.nr iS 0
+.ie "\\$1"NAME" \{\
+.       hK
+'       in 0
+.\}
+.el \{\
+.	ie "\\$1"名前" \{\
+.      		hK
+'       	in 0
+.	\}
+.	el \{\
+.		ie "\\$1"名称" \{\
+.       		hK
+'       		in 0
+.		\}
+.		el \{\
+.       		nr nS 0
+.       		nr nA 0
+.       		nr nF 0
+.       		nr nT 0
+.       		nr nY 0
+.       		nr aN 0
+.       		nr oT 0
+.       		if "\\$1"SEE" .nr nA 1
+.       		if "\\$1"関連項目" .nr nA 1
+.       		if "\\$1"FILES" .nr nF 1
+.       		if "\\$1"ファイル" .nr nF 1
+.       		if "\\$1"関連ファイル" .nr nF 1
+.       		if "\\$1"STANDARDS" .nr nT 1
+.       		if "\\$1"準拠" .nr nT 1
+.       		if "\\$1"規格" .nr nT 1
+.       		if "\\$1"SYNOPSIS" .nr nS 1
+.       		if "\\$1"書式" .nr nS 1
+.       		if "\\$1"DESCRIPTION" \{\
+.               		rr fB
+.               		rr Fb
+.               		ds Fb
+.               		nr fY 0
+.               		nr fZ 0
+.      			\}
+.       		if "\\$1"説明" \{\
+.               		rr fB
+.               		rr Fb
+.               		ds Fb
+.               		nr fY 0
+.               		nr fZ 0
+.      			 \}
+.       		if "\\$1"解説" \{\
+.               		rr fB
+.               		rr Fb
+.               		ds Fb
+.               		nr fY 0
+.               		nr fZ 0
+.       		\}
+.			if "\\$1"AUTHORS" .nr nY 1
+.			if "\\$1"著者" .nr nY 1
+.			if "\\$1"作者" .nr nY 1
+.     			in 0
+.		\}
+.	\}
+.\}
+.pL
+'sp
+.ns
+.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
+.if !\\n(cR .ne 3
+'fi
+\&\\*(sH\\$1 \|\\$2 \|\\$3 \|\\$4 \|\\$5 \|\\$6 \|\\$7 \|\\$8 \|\\$9
+\&\fP\s0\&
+.in \\n(.iu+\\n(Tiu
+.if "\\$1"SEE" .nr sE 1
+.ns
+..
--- groff-1.18.1.orig/tmac/docj.tmac
+++ groff-1.18.1/tmac/docj.tmac
@@ -0,0 +1,3427 @@
+.\" Copyright (c) 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"	This product includes software developed by the University of
+.\"	California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"     @(#)doc	5.8 (Berkeley) 8/5/91
+.\" Modified by jjc@jclark.com as follows: the doc-* files are assumed to be
+.\" installed as mdoc/doc-* rather than tmac.doc-* (the filename
+.\" `tmac.doc-common' would be too long); when using groff, the doc-* files
+.\" are loaded using the `mso' request.
+.\"   
+.\" .mdoc-parse - attempt to parse troff request arguments
+.\"     %beginstrip%
+.if \n(.g \{\
+.cp 0
+.ftr C CR
+.\}
+.if \n(.g .ig
+.de sO
+.so /usr/share/tmac/\\$1
+..
+.if !\n(.g .ig
+.de sO
+.mso mdoc/\\$1
+..
+.if t \{\
+.       sO docj-ditroff
+.\}
+.if n \{\
+.       sO docj-nroff
+.\}
+.sO doc-common
+.sO doc-syms
+.\" NS Db macro - start/stop DEBUG MODE
+.\" NS Db register DEBUG MODE
+.\" NS iN register DEBUG MODE (inline if 1, to stderr if 0 (default))
+.nr Db 0
+.de Db
+.ie \\n(.$==0 \{\
+.	ie \\n(Db==0 \{\
+.tm DEBUGGING ON
+.		nr Db 1
+.	\}
+.	el \{\
+.tm DEBUGGING OFF
+.		nr Db 0
+.	\}
+.\}
+.el \{\
+.	if "\\$1"on" \{\
+.tm DEBUGGING ON
+.		nr Db 1
+.	\}
+.	if "\\$1"off" \{\
+.tm DEBUGGING OFF
+.		nr Db 0
+.	\}
+.\}
+..
+.\" NS aV macro - parse argument vector (recursive) (.aV arg ... )
+.\" NS fV macro - parse argument vector (recursive) (.fV)
+.\" NS aC register argument counter (aV/fV)
+.\" NS fV register argument counter (must set to \\n(.$ prior to reuqest) (fV)
+.\" NS A[0-9] argument vector (aV/fV)
+.\" NS C[0-9] reg. arg type(1=macro, 2=arg, 3=punct-suf, 4=punct-pre) (aV/fV)
+.\" NS S[0-9] space vector (sV)
+.\" NS aP register argument pointer (aV)
+.\" NS yU local string used for debugging
+.\" NS iI local register (indent for inline debug mode)
+.\" NS mN name of calling request (set in each user requestable macro)
+.de aV
+.nr aC \\n(aC+1
+.ie "\\$1"|" \{\
+.	if "\\*(mN"Op" .ds A\\n(aC \fR\\$1\fP
+.	if "\\*(mN"Ar" .ds A\\n(aC \fR\\$1\fP
+.	if "\\*(mN"Fl" .ds A\\n(aC \fR\\$1\fP
+.	if "\\*(mN"Cm" .ds A\\n(aC \fR\\$1\fP
+.	if "\\*(mN"It" .ds A\\n(aC \fR\\$1\fP
+.\}
+.el .ds A\\n(aC \\$1
+.aU \\n(aC
+.nr C\\n(aC \\n(aT
+.s\\n(aT
+.if \\n(Db \{\
+.	if \\n(aT==1 .ds yU Executable
+.	if \\n(aT==2 .ds yU String
+.	if \\n(aT==3 .ds yU Closing Punctuation or suffix
+.	if \\n(aT==4 .ds yU Opening Punctuation or prefix
+.	if \\n(iN==1 \{\
+.		br
+.		nr iI \\n(.iu
+.		in -\\n(iIu
+.		if \\n(aC==1 \{\
+\&\fBDEBUG(argv) MACRO:\fP `.\\*(mN' \fBLine #:\fP \\n(.c
+.		\}
+\&\t\fBArgc:\fP \\n(aC  \fBArgv:\fP `\\*(A\\n(aC'  \fBLength:\fP \\n(sW
+\&\t\fBSpace:\fP `\\*(S\\n(aC'  \fBClass:\fP \\*(yU
+.	\}
+.	if \\n(iN==0 \{\
+.		if \\n(aC==1 \{\
+.			tm DEBUG(argv) MACRO: `.\\*(mN'  Line #: \\n(.c
+.		\}
+.		tm \tArgc: \\n(aC  Argv: `\\*(A\\n(aC'  Length: \\n(sW
+.		tm \tSpace: `\\*(S\\n(aC'  Class: \\*(yU
+.	\}
+.\}
+.ie \\n(.$==1 \{\
+.	nr aP 0
+.	ie \\n(dZ==1 \{\
+.		if \\n(oM>1 .as b1 \\*(S0
+.	\}
+.	el \{\
+.		if \\n(oM>0 \{\
+.			if \\n(fC==0 .as b1 \\*(S0
+.		\}
+.	\}
+.	ds S0 \\*(S\\n(aC
+.	if \\n(Db \{\
+.		if \\n(iN==1 \{\
+\&MACRO REQUEST: \t.\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
+.			br
+.			in \\n(iIu
+.		\}
+.		if \\n(iN==0 \{\
+.tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
+.		\}
+.	\}
+.\}
+.el .aV \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.de fV
+.nr aC \\n(aC+1
+.if "\\*(A\\n(aC"|" \{\
+.	if "\\*(mN"Op" .ds A\\n(aC \fR\\*(A\\n(aC\fP
+.	if "\\*(mN"Ar" .ds A\\n(aC \fR\\*(A\\n(aC\fP
+.	if "\\*(mN"Fl" .ds A\\n(aC \fR\&\\*(A\\n(aC\fP
+.	if "\\*(mN"Cm" .ds A\\n(aC \fR\\*(A\\n(aC\fP
+.	if "\\*(mN"It" .ds A\\n(aC \fR\\*(A\\n(aC\fP
+.\}
+.aU \\n(aC
+.nr C\\n(aC \\n(aT
+.s\\n(aT
+.if \\n(Db \{\
+.	if \\n(aT==1 .ds yU Executable
+.	if \\n(aT==2 .ds yU String
+.	if \\n(aT==3 .ds yU Closing Punctuation or suffix
+.	if \\n(aT==4 .ds yU Opening Punctuation or prefix
+.	if \\n(iN==1 \{\
+.		br
+.		nr iI \\n(.iu
+.		in -\\n(iIu
+.		if \\n(aC==1 \{\
+\&\fBDEBUG(fargv) MACRO:\fP `.\\*(mN'  \fBLine #:\fP \\n(.c
+.		\}
+\&\t\fBArgc:\fP \\n(aC  \fBArgv:\fP `\\*(A\\n(aC'  \fBLength:\fP \\n(sW
+\&\t\fBSpace:\fP `\\*(S\\n(aC'  \fBClass:\fP \\*(yU
+.	\}
+.	if \\n(iN==0 \{\
+.		if \\n(aC==1 \{\
+.			tm DEBUG(fargv) MACRO: `.\\*(mN'  Line #: \\n(.c
+.		\}
+.		tm \tArgc: \\n(aC  Argv: `\\*(A\\n(aC'  Length: \\n(sW
+.		tm \tSpace: `\\*(S\\n(aC'  Class: \\*(yU
+.	\}
+.\}
+.ie \\n(fV==1 \{\
+.	nr aP 0
+.	ie \\n(dZ==1 \{\
+.		if \\n(oM>1 .as b1 \\*(S0
+.	\}
+.	el \{\
+.		if \\n(oM>0 \{\
+.			if \\n(fC==0 .as b1 \\*(S0
+.		\}
+.	\}
+.	ds S0 \\*(S\\n(aC
+.	nr fV 0
+.	if \\n(Db \{\
+.		ie \\n(iN \{\
+\&\tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
+.			br
+.			in \\n(iIu
+.		\}
+.		el \{\
+.tm \tMACRO REQUEST: .\\*(mN \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
+.		\}
+.	\}
+.\}
+.el \{\
+.	nr fV \\n(fV-1
+.	fV
+.\}
+..
+.\" NS aX macro - stuff saved strings into `b1' (used by -diag list)
+.de aX
+.nr aP \\n(aP+1
+.as b1 \&\\*(A\\n(aP
+.ie \\n(fV==1 \{\
+.	nr aP 0
+.	nr fV 0
+.\}
+.el \{\
+.	as b1 \&\\*(sV
+.	nr fV \\n(fV-1
+.	aX
+.\}
+..
+.\" NS aI macro - append arg to arg vector: .aI [arg] [type] (used by .En only)
+.de aI
+.ie \\n(aC<9 \{\
+.	nr aC \\n(aC+1
+.	ds A\\n(aC \\$1
+.	nr C\\n(aC \\$2
+.	s\\$2
+.	ds xV S\\n(aC
+.\}
+.el \{\
+.	tm Usage: Too many arguments (maximum of 8 accepted) (#\\n(.c)
+.	tm \\*(A1 \\*(A2 \\*(A3 \\*(A4 \\*(A5 \\*(A6 \\*(A7 \\*(A8 \\*(A9
+.\}
+..
+.\"
+.\" NS aZ macro - print buffer (pB) and clean up arg vectors (aY)
+.de aZ
+.pB
+.aY
+..
+.\" NS aY macro - clean up arg vector
+.de aY
+.rm C0 C1 C2 C3 C4 C5 C6 C7 C8 C9
+.rm A0 A1 A2 A3 A4 A5 A6 A7 A8 A9
+.rm S1 S2 S3 S4 S5 S6 S7 S8 S9
+.nr aC 0
+.nr aP 0
+..
+.\" NS pB macro - test for end of vector (eol) (print b1 buffer or divert)
+.de pB
+.ie \\n(dZ==1 \{\
+.	if \\n(oM==1 \{\&\\*(b1
+.		rm S0
+.		ds b1
+.	\}
+.	if \\n(oM==0 \{\
+.		x2
+.	\}
+.\}
+.el \{\
+.	ie \\n(oM==0 \{\&\\*(b1
+.		rm S0
+.		ds b1
+.	\}
+.	el \{\
+.		if ((\\n(sM==1)&(\\n(tP==0)) \{\
+.			x1
+.		\}
+.	\}
+.\}
+.hy
+..
+.\" NS x1 macro - save buffer and divert if tP flag set
+.\" NS eB diversion string
+.\" NS b2 string save of buffer
+.\" NS lK register count of lines read from input file
+.de x1
+.nr dZ \\n(dZ+1
+.ds b2 \\*(b1
+.ds b1
+.nr lK \\n(.c
+.ev 2
+.fi
+.di eB
+..
+.\"
+.\" NS x2 macro - end diversion and print
+.\" NS b0 string local temporary
+.de x2
+.br
+.di
+.ev
+.ie (\\n(.c-\\n(lK>1) \{\
+.	ds b0 \&\\*(eB\\
+.	ds b1 \\*(b2\\*(b0\\*(b1
+.\}
+.el .ds b1 \\*(b2\\*(b1
+\&\\*(b1
+.rm eB b2 b0 b1
+.nr dZ \\n(dZ-1
+..
+.\" NS Fl macro - flags (appends - and prints flags)
+.\" NS cF register save current font
+.\" NS cZ register save current font size
+.de Fl
+.as b1 \&\\*(fL
+.if \\n(aC==0 \{\
+.	ie \\n(.$==0 \{\
+.		as b1 \&\|\-\|\fP\s0
+.		pB
+.	\}
+.	el \{\
+.		ds mN Fl
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>0 \{\
+.	ie (\\n(aC-\\n(aP)==0 \{\
+.		as b1 \&\|\-\fP\s0
+.		aZ
+.	\}
+.	el \{\
+.		nr aP \\n(aP+1
+.		ie \\n(C\\n(aP==1 \{\
+.			as b1 \&\|\-\fP\s0
+.			\\*(A\\n(aP
+.		\}
+.		el \{\
+.			nr cF \\n(.f
+.			nr cZ \\n(.s
+.			if \\n(C\\n(aP==3 \{\
+.				as b1 \&\|\-\|
+.			\}
+.			fR
+.		\}
+.	\}
+.\}
+..
+.\"
+.\" NS fR macro - Fl flag recursion routine (special handling)
+.\" NS jM local register
+.\" NS jN local register
+.\"
+.de fR
+.hy 0
+.nr jM \\n(C\\n(aP
+.ie \\n(jM==1 \{\
+.	as b1 \&\fP\s0
+.	\\*(A\\n(aP
+.\}
+.el \{\
+.	nr jN \\n(aP
+.	ie \\n(jM==2 \{\
+.		ie !"\\*(A\\n(aP"\\*(Ba" \{\
+.			ie !"\\*(A\\n(aP"\fR|\fP" \{\
+.		               ie "\\*(A\\n(aP"-" .as b1 \&\|\-\^\-\|
+.		               el .as b1 \&\|\-\\*(A\\n(aP
+.			\}
+.			el .as b1 \&\\*(A\\n(aP
+.		\}
+.		el .as b1 \&\\*(A\\n(aP
+.	\}
+.	el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
+.	ie \\n(aC==\\n(aP \{\
+.		if \\n(jM==4 .as b1 \&\|\-
+.		as b1 \&\fP\s0
+.		aZ
+.	\}
+.	el \{\
+.		nr aP \\n(aP+1
+.		ie ((\\n(C\\n(aP==3)&(\\n(C\\n(jN==4)) .as b1 \&\|\-
+.		el .as b1 \&\\*(S\\n(jN
+.		fR \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.rr jM jN
+..
+.\"
+.\" NS nR macro - general name recursion routine
+.\" NS jM local register
+.\" NS jN local register
+.de nR
+.hy 0
+.nr jM \\n(C\\n(aP
+.ie \\n(jM==1 \{\
+.	as b1 \&\f\\n(cF\s\\n(cZ
+.	\\*(A\\n(aP
+.\}
+.el \{\
+.	nr jN \\n(aP
+.	ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
+.	el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
+.	ie \\n(aC==\\n(aP \{\
+.		as b1 \&\f\\n(cF\s\\n(cZ
+.		aZ
+.	\}
+.	el \{\
+.		nr aP \\n(aP+1
+.		as b1 \&\\*(S\\n(jN
+.		nR
+.	\}
+.\}
+.rr jM jN
+..
+.\" NS Ar macro - command line `argument' macro
+.\"
+.de Ar
+.as b1 \\*(aR
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 \{\
+.		as b1 file\ ...\fP\s0
+.		pB
+.	\}
+.	el \{\
+.		ds mN Ar
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>0 \{\
+.	ie (\\n(aC-\\n(aP)==0 \{\
+.		as b1 \&file\ ...\fP\s0
+.		aZ
+.	\}
+.	el \{\
+.		nr aP \\n(aP+1
+.		ie \\n(C\\n(aP==1 \{\
+.			as b1 \&file\ ...\fP\s0
+.			\\*(A\\n(aP
+.               \}
+.               el \{\
+.                       nr cF \\n(.f
+.			nr cZ \\n(.s
+.			if \\n(C\\n(aP==3 \{\
+.				as b1 \&file\ ...
+.			\}
+.                       nR
+.		\}
+.       \}
+.\}
+..
+.\" NS Ad macro - Addresses
+.de Ad
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Ad address ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Ad
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(aD
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Cd macro - Config declaration (for section 4 SYNOPSIS) (not callable)
+.\" needs work - not very translatable
+.de Cd
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Cd Configuration file declaration (#\\n(.c)
+. 	el \{\
+.		ds mN Cd
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+. 		nr fV \\n(.$
+. 		fV
+.	\}
+.\}
+.br
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(nM
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.	ie \\n(nS \{\
+.		if "\\*(mN"Cd" \{\
+.			rs
+.			ie \\n(nS>1 .br
+.			el \{\
+.				if \\n(iS==0 .nr iS \\n(Dsu
+.			\}
+.			in +\\n(iSu
+.			ti -\\n(iSu
+.			nr nS \\n(nS+1
+.		\}
+.	nR
+.	in -\\n(iSu
+.	\}
+.	el .nR
+.\}
+..
+.\" NS Cm macro - Interactive command modifier (flag)
+.de Cm
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Cm Interactive command modifier ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Cm
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(cM
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Dv macro - define variable
+.de Dv
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Dv define_variable ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Dv
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(eR
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Em macro - Emphasis
+.de Em
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 \{\
+.		tm Usage: .Em text ... \\*(Pu (#\\n(.c)
+.	\}
+.	el \{\
+.		ds mN Em
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(eM
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Er macro - Errnotype
+.de Er
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Er ERRNOTYPE ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Er
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(eR
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Ev macro - Environment variable
+.de Ev
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Ev ENVIRONMENT_VARIABLE ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Ev
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(eV
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Fd macro - function declaration - not callable (& no err check)
+.\" NS fD register subroutine test (in synopsis only)
+.\" NS fY register subroutine count (in synopsis only) (fortran only)
+.\" NS fZ register also subroutine count (in synopsis only)
+.de Fd
+.ds mN Fd
+.if \\n(nS>0 \{\
+.\"	if a variable type was the last thing given, want vertical space
+.	if \\n(fX>0 \{\
+.		Pp
+.		nr fX 0
+.	\}
+.\"	if a subroutine was the last thing given, want vertical space
+.	if \\n(fZ>0 \{\
+.		ie \\n(fD==0 \{\
+.			Pp
+.			rs
+.		\}
+.		el .br
+.	\}
+.	nr fD \\n(fD+1
+.\}
+.nr cF \\n(.f
+.nr cZ \\n(.s
+\&\\*(fD\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.br
+.ft \\n(cF
+.fs \\n(cZ
+..
+.\" NS Fr macro - function return value - not callable (at the moment)
+.de Fr
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Fr Function_return_value... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Fr
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(aR
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Ic macro - Interactive command
+.de Ic
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Ic Interactive command ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Ic
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(iC
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Li macro - literals
+.de Li
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage .Li argument ... \\*(Pu (#\\n(.c)
+.       el \{\
+.		ds mN Li
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.               nr fV \\n(.$
+.               fV
+.       \}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(lI
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Or macro - Pipe symbol (OR)
+.de Or
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Or ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Or
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(iC
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Ms macro - Math symbol
+.de Ms
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Ms Math symbol ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Ms
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(sY
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Nm macro - Name of command or page topic
+.\" NS n1 string - save first invocation of .Nm
+.\" NS iS register - indent second command line in a synopsis
+.de Nm
+.if \\n(aC==0 \{\
+.	ie \\n(.$==0 \{\
+.		ie "\\*(n1"" .tm Usage: .Nm Name(s) ... \\*(Pu (#\\n(.c)
+.		el \&\\*(nM\\*(n1\fP\s0
+.	\}
+.	el \{\
+.		ds mN Nm
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.               nr fV \\n(.$
+.               fV
+.       \}
+.\}
+.if \\n(aC>0 \{\
+.	ie \\n(aC==\\n(aP \{\
+.		as b1 \&\\*(nM\\*(n1\fP\s0
+.		aZ
+.	\}
+.	el \{\
+.		as b1 \\*(nM
+.		nr aP \\n(aP+1
+.		ie \\n(C\\n(aP==1 \{\
+.			as b1 \&\\*(n1\fP\s0
+.			\\*(A\\n(aP
+.		\}
+.		el \{\
+.			nr cF \\n(.f
+.			nr cZ \\n(.s
+.			if \\n(nS \{\
+.				if "\\*(mN"Nm" \{\
+.					rs
+.					in -\\n(iSu
+.					ie \\n(nS>1 .br
+.					el \{\
+.						if \\n(iS==0 \{\
+.							sw \\$1
+.					nr iS ((\\n(sWu+1)*\\n(fW)u
+.						\}
+.					\}
+.					in +\\n(iSu
+.					ti -\\n(iSu
+.					nr nS \\n(nS+1
+.				\}
+.			\}
+.			if "\\*(n1"" .ds n1 \\*(A\\n(aP
+.			nR
+.		\}
+.	\}
+.\}
+..
+.\" NS Pa macro - Pathname
+.de Pa
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 \&\\*(pA~\fP\s0
+.	el \{\
+.		ds mN Pa
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(pA
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Sy macro - Symbolics
+.de Sy
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Sy symbolic_text ... \\*(Pu (#\\n(.c)
+. 	el \{\
+.		ds mN Sy
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+. 		nr fV \\n(.$
+. 		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(sY
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Tn macro - Trade Name Macro
+.de Tn
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Tn Trade_name(s) ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Tn
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(tN\\*(tF
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS nN macro - Trade Name Macro for inside of reference
+.de nN
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Tn Trade_name(s) ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Tn
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(tN
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS Va macro - variable name macro
+.de Va
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Va variable_name(s) ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Va
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	as b1 \\*(vA
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\"
+.\" NS No macro - Normal text macro (default text style if mess up)
+.de No
+.as b1 \\*(nO
+.if \\n(aC==0 \{\
+.	ie \\n(.$==0 .tm Usage: .No must be called with arguments (#\\n(.c)
+.	el \{\
+.		ds mN No
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       ie \\n(C\\n(aP==1 \{\
+.		\\*(A\\n(aP
+.       \}
+.       el \{\
+.		nr cF \\n(.f
+.		nr cZ \\n(.s
+.		nR
+.       \}
+.\}
+..
+.\"------------------------------------------------------------------------
+.\" NS Op macro - Option Expression
+.de Op
+.if \\n(aC==0 \{\
+.	ds mN Op
+.\}
+.\" .ds qL \&\\*(lO
+.\" .ds qR \&\\*(rO
+.ds qL \&\\*(lB
+.ds qR \&\\*(rB
+.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
+..
+.\" NS Aq macro - Enclose string in angle brackets
+.de Aq
+.if \\n(aC==0 .ds mN Aq
+.ds qL \&<
+.ds qR \&>
+.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Bq macro - Enclose string in square brackets
+.de Bq
+.if \\n(aC==0 .ds mN Bq
+.ds qL \&\\*(lB
+.ds qR \&\\*(rB
+.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Dq macro - Enclose string in double quotes
+.de Dq
+.if \\n(aC==0 .ds mN Dq
+.ds qL \&\\*(Lq
+.ds qR \&\\*(Rq
+.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Eq macro - Enclose string in double quotes
+.de Eq
+.if \\n(aC==0 .ds mN Eq
+.ds qL \\$1
+.ds qR \\$2
+.En \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Pq macro - Enclose string in parenthesis
+.de Pq
+.if \\n(aC==0 .ds mN Pq
+.ds qL \&\\*(lP
+.ds qR \&\\*(rP
+.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Ql macro - Quoted literal is in file mdocj-[dit|n|g]roff (too large
+.\" an if-else to carry along recursively for `if n ...')
+.\"
+.\" NS Sq macro - Enclose string in single quotes
+.de Qq
+.if \\n(aC==0 .ds mN Qq
+.ds qL \&\\*q
+.ds qR \&\\*q
+.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Sq macro - Enclose string in single quotes
+.de Sq
+.if \\n(aC==0 .ds mN Sq
+.ds qL \&\\*(sL
+.ds qR \&\\*(sR
+.En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\"
+.\" NS Es macro - Set up strings for .En call
+.de Es
+.if \\n(aC==0 \{\
+.	ie \\n(.$>2 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	el \{\
+.		ds qL \\$1
+.		ds qR \\$2
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.	ds qL \\*(A\\n(aP
+.	nr aP \\n(aP+1
+.	ds qR \\*(A\\n(aP
+.	ie \\n(aC>\\n(aP .c\\n(C\\n(aP
+.	el .aZ
+.\}
+..
+.\" .tm En beg arg(A[\\n(aP])==\\*(A\\n(aP;
+.\" .tm En oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
+.\" NS En macro - Enclose string with given args (eg [ and ] etc)
+.\" NS qL string variable set by calling macro
+.\" NS qR string variable set by calling macro
+.\" NS aJ register (for vR)
+.de En
+.ie \\n(aC==0 \{\
+.	ie \\n(.$==0 \{\
+.		as b1 \&\\*(qL\\*(qR
+.		pB
+.	\}
+.	el \{\
+.\".		as mN (En)
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.		as b1 \&\\*(qL
+.	\}
+.\}
+.el \{\
+.	as b1 \&\\*(qL
+.\}
+.if \\n(aC>0 \{\
+.	ie (\\n(aC-\\n(aP)==0 \{\
+.		as b1 \&\\*(qR
+.		aZ
+.	\}
+.	el \{\
+.		ie \\n(C\\n(aC==3 \{\
+.			nr aJ \\n(aC-1
+.			vR
+.			nr aJ \\n(aJ+1
+.			ds A\\n(aJ \&\\*(qR\\*(A\\n(aJ
+.			nr aJ 0
+.		\}
+.		el .aI \&\\*(qR 3
+.		nr aP \\n(aP+1
+.		if \\n(C\\n(aP==1 .\\*(A\\n(aP
+.		if \\n(C\\n(aP>1 \{\
+.			nr aP \\n(aP-1
+.			No
+.		\}
+.	\}
+.\}
+..
+.\" NS vR macro - vector routine (for En, trace backwards past trail punct)
+.de vR
+.if \\n(C\\n(aJ==3 \{\
+.	nr aJ \\n(aJ-1
+.	vR
+.\}
+..
+.\"------------------------------------------------------------------------
+.\" NS Ao macro - Angle open
+.de Ao
+.if \\n(aC==0 .ds mN Ao
+.ds qL \&<
+.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Ac macro - Angle close
+.de Ac
+.if \\n(aC==0 .ds mN Ac
+.ds qR \&>
+.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Bo macro - Bracket open
+.de Bo
+.if \\n(aC==0 .ds mN Bo
+.ds qL \&[
+.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Bc macro - Bracket close
+.de Bc
+.if \\n(aC==0 .ds mN Bc
+.ds qR \&]
+.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Do macro - Double Quote open
+.de Do
+.if \\n(aC==0 .ds mN Do
+.ds qL \&\\*(Lq
+.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Dc macro - Double Quote close
+.de Dc
+.if \\n(aC==0 .ds mN Dc
+.ds qR \&\\*(Rq
+.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Eo macro - Enclose open
+.de Eo
+.if \\n(aC==0 .ds mN Eo
+.ds qL \\$1
+.eO \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Ec macro - Enclose close
+.de Ec
+.if \\n(aC==0 .ds mN Ec
+.ds qR \\$1
+.eC \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Oo macro - Option open
+.de Oo
+.if \\n(aC==0 .ds mN Oo
+.ds qL \&[
+.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Oc macro - Option close
+.de Oc
+.if \\n(aC==0 .ds mN Oc
+.ds qR \&]
+.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Po macro - Parenthesis open
+.de Po
+.if \\n(aC==0 .ds mN Po
+.ds qL \&(
+.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Pc macro - Parenthesis close
+.de Pc
+.if \\n(aC==0 .ds mN Pc
+.ds qR \&)
+.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Qo macro - Straight Double Quote open
+.de Qo
+.if \\n(aC==0 .ds mN Qo
+.ds qL \&\\*q
+.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Qc macro - Straight Double Quote close
+.de Qc
+.if \\n(aC==0 .ds mN Qc
+.ds qR \&\\*q
+.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS So macro - Single Quote open
+.de So
+.if \\n(aC==0 .ds mN So
+.ds qL \&\\*(sL
+.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Sc macro - Single Quote close
+.de Sc
+.if \\n(aC==0 .ds mN Sc
+.ds qR \&\\*(sR
+.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Xo macro - Extend open (continue)
+.de Xo
+.if \\n(aC==0 .ds mN Xo
+.\" .nr mN 1
+.ds qL
+.eO \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS Xe macro - Extend close (end)
+.de Xc
+.\" .nr mN 0
+.if \\n(aC==0 .ds mN Xc
+.ds qR
+.eC \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS eO macro - enclose string open
+.\" NS oM register (extension possible)
+.de eO
+.nr oM \\n(oM+1
+.\" .tm eO last arg==A[\\n(aC]==\\*(A\\n(aC; aP==\\n(aP; oM==\\n(oM; dZ==\\n(dZ;
+.ie \\n(aC==0 \{\
+.       ie \\n(.$>0 \{\
+.               aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.		as b1 \\*(qL
+.       \}
+.	el \{\
+.		as b1 \\*(qL
+.		if (\\n(dZ==0)&(\\n(sM==1) \{\
+.			nr dZ \\n(dZ+1
+.			ds b2 \\*(b1
+.			ds b1
+.			nr lK \\n(.c
+.			ev 2
+.			fi
+.			di eB
+.		\}
+.	\}
+.\}
+.el \{\
+.	as b1 \\*(qL
+.\}
+.ie \\n(aC>0 \{\
+.	if \\n(aC>\\n(aP \{\
+.		nr aP \\n(aP+1
+.		ie \\n(C\\n(aP==1 .\\*(A\\n(aP
+.		el  \{\
+.			nr aP \\n(aP-1
+.			No
+.		\}
+.	\}
+.	if \\n(aC==\\n(aP \{\
+.		if \\n(tP==1 \{\
+.\" .tm SETTING Xt!!!
+.			nr Xt 1
+.		\}
+.\".\" .		ds S0
+.\"CHANGED		ds S0 \\*(iV
+.		aY
+.	\}
+.\}
+.el \{\
+.	if \\n(oM>1 .as b1 \\*(sV
+.\}
+..
+.\"
+.\" NS eC macro - enclose string close
+.\" NS aa local register
+.de eC
+.nr oM \\n(oM-1
+.\" tm eC last arg==A[\\n(aC]==\\*(A\\n(aC; aP==\\n(aP; oM==\\n(oM; dZ==\\n(dZ;
+.as b1 \\*(qR
+.if \\n(aC==0 \{\
+.       ie \\n(.$>0 \{\
+.               aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.       \}
+.	el \{\
+.		ie "\\*(xB"" \{\
+.			pB
+.		\}
+.		el \{\
+.			pB
+.\\*(L\\n(lC
+.			nr Xt 0
+.			ds xB
+.		\}
+.	\}
+.\}
+.if \\n(aC>0 \{\
+.	ie \\n(aC==\\n(aP \{\
+.		ie \\n(oM==0 \{\
+.			aZ
+.		\}
+.		el .aY
+.	\}
+.	el \{\
+.		nr aa \\n(aP+1
+.		if \\n(C\\n(aa==2 .as b1 \\*(S\\n(aC
+.\" tm CURRENT arg (aP==\\*(A\\n(aP and ap+1==\\*(A\\n(aa) tP==\\n(tP Xt==\\n(Xt
+.		rr aa
+.		if \\n(tP>0 \{\
+.\" tm UNSETTING Xt==\\n(Xt!!!!
+.			if \\n(Xt>0 .nr Xt \\n(Xt-1
+.\" tm NOW Xt==\\n(Xt!!!!
+.		\}
+.		No
+.	\}
+.\}
+..
+.\"------------------------------------------------------------------------
+.\" NS Pf macro - Prefix (calls .pF)
+.de Pf
+.if \\n(aC==0 .ds mN Pf
+.ds qL \&\\$1
+.pF \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\" NS pF macro - Prefix (for prefixing open quotes, brackets etc)
+.de pF
+.ie \\n(aC==0 \{\
+.	as b1 \&\\*(qL
+.	ie \\n(.$<2 \{\
+.		tm Warning: Missing arguments - prefix .Pf)
+.		pB
+.	\}
+.	el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.\}
+.el \{\
+.	ie (\\n(aC-\\n(aP)>1 \{\
+.		nr aP \\n(aP+1
+.		as b1 \&\\*(A\\n(aP
+.	\}
+.	el .tm Warning: .Pf: trailing prefix (#\\n(.c)
+.\}
+.if \\n(aC>0 \{\
+.	ie (\\n(aC-\\n(aP)==0 .aZ
+.	el \{\
+.		nr aP \\n(aP+1
+.		c\\n(C\\n(aP
+.	\}
+.\}
+..
+.\" NS Ns macro - remove space (space remove done by .aV or .fV)
+.de Ns
+.if \\n(aC==0 \{\
+.	ds mN Ns
+.	ie \\n(.$>0 .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	el .tm Usage: .Ns must be called with arguments (#\\n(.c)
+.\}
+.No
+..
+.de Ap
+.if \\n(aC==0 \{\
+.	ds mN Ap
+.	tm Usage: Ap "cannot be first request on a line (no .Ap)" (#\\n(.c)
+.\}
+.as b1 \&'
+.No
+..
+.\" NS Hv macro - Hard (unpaddable) Space vector
+.\" NS iV string inter-vector space
+.\" NS sV string inter-argument space
+.de Hv
+.ds iV \\*(sV
+.ds sV \\*(hV
+..
+.\" NS Sv macro - Soft Space vector (troff limitation)
+.de Sv
+.ds sV \\*(iV
+..
+.\" NS Tv macro - Tab Space vector
+.de Tv
+.ds sV \\*(tV
+..
+.\" NS Sm macro - Space mode
+.\" NS sM register - default is one (space mode on)
+.nr sM 1
+.de Sm
+.if \\n(aC==0 \{\
+.	ie \\n(.$==0 .tm "Usage: .Sm [off | on]" (#\\n(.c)
+.	el \{\
+.		ds mN Sm
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>0 \{\
+.	nr aP \\n(aP+1
+.	if "\\*(A\\n(aP"on" \{\
+.		ds sV \\*(iV
+.		nr sM 1
+.	\}
+.	if "\\*(A\\n(aP"off" \{\
+.		ds sV
+.		rm S0 S1 S2 S3 S4 S5 S6 S7 S8 S9
+.		nr sM 0
+.	\}
+.	ie \\n(aC>\\n(aP \{\
+.		No
+.	\}
+.	el .aY
+.\}
+..
+.\"------------------------------------------------------------------------
+.\" Size and Argument type macros
+.\" NS aT macro - argument type
+.\" NS aU macro - argument type (same as .aT but uses A[1-9] strings
+.\" NS aT register argument type
+.if \n(.g \{\
+.de aT
+.nr aT 0
+.ie \\n(sW>2:(\A'\\$1'==0) \{\
+.	nr aT 2
+.\}
+.el \{\
+.	if \\n(sW==1 \{\
+.		ie \\n(z\\$1>2 \{\
+.			nr aT \\n(z\\$1
+.		\}
+.		el .nr aT 2
+.	\}
+.	if \\n(sW==2 \{\
+.		ie \\n(\\$1 \{\
+.			nr aT 1
+.		\}
+.		el .nr aT 2
+.	\}
+.\}
+..
+.de aU
+.nr aT 0
+.aW \\$1
+.ie \\n(sW>2:(\A'\\*(A\\$1'==0) .nr aT 2
+.el \{\
+.	if \\n(sW==1 \{\
+.		ie \\n(z\\*(A\\$1>2 \{\
+.			nr aT \\n(z\\*(A\\$1
+.		\}
+.		el .nr aT 2
+.	\}
+.	if \\n(sW==2 \{\
+.		ie (\\n(\\*(A\\$1) \{\
+.			nr aT 1
+.		\}
+.		el .nr aT 2
+.	\}
+.\}
+..
+.\}
+.if !\n(.g \{\
+.de aT
+.nr aT 0
+.ie \\n(sW>2 \{\
+.	nr aT 2
+.\}
+.el \{\
+.	if \\n(sW==1 \{\
+.		ie \\n(z\\$1>2 \{\
+.			nr aT \\n(z\\$1
+.		\}
+.		el .nr aT 2
+.	\}
+.	if \\n(sW==2 \{\
+.		ie \\n(\\$1 \{\
+.			nr aT 1
+.		\}
+.		el .nr aT 2
+.	\}
+.\}
+..
+.de aU
+.nr aT 0
+.aW \\$1
+.ie \\n(sW>2 .nr aT 2
+.el \{\
+.	if \\n(sW==1 \{\
+.		ie \\n(z\\*(A\\$1>2 \{\
+.			nr aT \\n(z\\*(A\\$1
+.		\}
+.		el .nr aT 2
+.	\}
+.	if \\n(sW==2 \{\
+.		ie (\\n(\\*(A\\$1) \{\
+.			nr aT 1
+.		\}
+.		el .nr aT 2
+.	\}
+.\}
+..
+.\}
+.\" NS s1 macro - set spacing for class type 1
+.\" NS s2 macro - set spacing for class type 2
+.\" NS s3 macro - set spacing for class type 3
+.\" NS s1 macro - set spacing for class type 1
+.\" NS s2 macro - set spacing for class type 2
+.\" NS s3 macro - set spacing for class type 3
+.\" NS s4 macro - set spacing for class type 4
+.\" NS S[0-9] string spacing
+.\" NS xX local register
+.\" NS aa local register
+.de s0
+.tm MDOC-ERROR: bogus type 0 (can't set space '\\*(A\\n(aC') (#\\n(.c)
+..
+.de s1
+.if \\n(\\*(A\\n(aC==3 \{\
+.	nr xX \\n(aC-1
+.	rm S\\n(xX
+.	ds S\\n(aC \\*(sV
+.\}
+.if \\n(\\*(A\\n(aC==2 \{\
+.	nr xX \\n(aC-1
+.\" this kludge can probably go away, but need to double check first
+.	ie "\\*(A\\n(aC"Nb" .ds S\\n(xX \\*(hV
+.	el .rm S\\n(xX
+.\}
+..
+.de s2
+.ds S\\n(aC \\*(sV
+..
+.de s3
+.if \\n(aC>1 \{\
+.	nr xX \\n(aC-1
+.	rm S\\n(xX
+.\}
+.ds S\\n(aC \\*(sV
+..
+.de s4
+.nr aa 0
+..
+.\" Class switches (on current argument aP)
+.\" NS c0 macro - catch errors (non-existent class type 0)
+.\" NS c1 macro - call request if type 1
+.\" NS c2 macro - call .No if type 2
+.\" NS c3 macro - call .No if type 3
+.\" NS c4 macro - call .No if type 4
+.de c0
+.tm MDOC-ERROR: bogus class 0 (can't determine '\\*(A\\n(aC') (#\\n(.c)
+..
+.de c1
+.\\*(A\\n(aP
+..
+.de c2
+.nr aP \\n(aP-1
+.No
+..
+.de c3
+.nr aP \\n(aP-1
+.No
+..
+.de c4
+.nr aP \\n(aP-1
+.No
+..
+.\" NS y1 macro - ignore if class 1
+.\" NS y2 macro - ignore if class 2
+.\" NS y3 macro - append if type 3
+.\" NS y4 macro - append if type 4
+.de y1
+.nr aa 1
+..
+.de y2
+.nr aa 1
+..
+.de y3
+.as b1 \\*(A\\n(aP
+.nr aP \\n(aP+1
+.n\\C\\n(aP
+..
+.de y4
+.as b1 \\*(A\\n(aP
+.nr aP \\n(aP+1
+.n\\C\\n(aP
+..
+.\"--------------------------------------------------------------------------
+.\" Ns Bf macro - Begin Font Mode (will be begin-mode/end-mode in groff & TeX)
+.\" Ns Ef macro - End Font Mode
+.de Bf
+.ds mN Bf
+.ie \\n(.$>0 \{\
+.	nr bF \\n(.f
+.	nr bZ \\n(.s
+.	if "\\$1"Em" \&\\*(eM\c
+.	if "\\$1"Li" \&\\*(lI\c
+.	if "\\$1"Sy" \&\\*(sY\c
+.	if "\\$1"-emphasis" \&\\*(eM\c
+.	if "\\$1"-literal" \&\\*(lI\c
+.	if "\\$1"-symbolic" \&\\*(sY\c
+.\}
+.el .tm Usage .Bf [Em | emphasis | Li | literal | Sy | symbolic] (#\\n(.c)
+..
+.de Ef
+.ds mN Ef
+.ie \\n(.$>0 .tm Usage .Ef (does not take arguments) (#\\n(.c)
+.el \&\f\\n(bF\s\\n(bZ
+..
+.\" Ns Bk macro - Begin Keep
+.\" Ns Ek macro - End Keep
+.\" Ns kS string - keep type
+.de Bk
+.ds mN Bk
+.ie \\n(.$==0 \{\
+.tm Usage: .Bk [-lines | -words] (#\\n(.c)
+.\}
+.el \{\
+.	if !"\\*(kS"" .tm .Bk: nesting keeps not implemented yet. (#\\n(.c)
+.	if "\\$1"-lines" .tm .Bd -lines: Not implemented yet. (#\\n(.c)
+.	if "\\$1"-words" .Hv
+.	ds kS \\$1
+.\}
+..
+.de Ek
+.ds mN Ek
+.ie \\n(.$>0 .tm Usage .Ek (does not take arguments) (#\\n(.c)
+.el \{\
+.	if "\\*(kS"-lines" .tm .Bd -lines: Not implemented yet. (#\\n(.c)
+.	if "\\*(kS"-words" .Sv
+.	rm kS
+.\}
+..
+.\" NS Bd macro - Begin Display display-type [offset string]
+.\" NS Ed macro - end Display
+.\" NS O[0-9] registers - stack of indent
+.\" NS d[0-9] registers - display-type stack
+.de Bd
+.ds mN Bd
+.ie \\n(.$==0 \{\
+.tm Usage: .Bd [-literal | -filled | -ragged | -unfilled] [-offset [string]] [-compact] (#\\n(.c)
+.\}
+.el \{\
+.	ds aa
+.	nr bV 0
+.       nr iD 0
+.	nr dP \\n(dP+1
+.       if "\\$1"-literal" \{\
+.		nr iD \\n(iD+1
+.               ds d\\n(dP dL
+.		nr cF \\n(.f
+.		nr cZ \\n(.s
+.		ie t \{\&\\*(lI
+'			ta 9n 18n 27n 36n 45n 54n 63n 72n
+.		\}
+.		el \{\
+'			ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
+.		\}
+.		nf
+.       \}
+.       if "\\$1"-filled" \{\
+.		nr iD \\n(iD+1
+.               ds d\\n(dP dF
+.		br
+.       \}
+.       if "\\$1"-ragged" \{\
+.		nr iD \\n(iD+1
+.               ds d\\n(dP dR
+.		na
+.       \}
+.       if "\\$1"-unfilled" \{\
+.		nr iD \\n(iD+1
+.               ds d\\n(dP dU
+.		nf
+.       \}
+.\" .tm Here is argc: \\n(.$ and here is iD \\n(iD
+.       if ((\\n(iD>=1)&(\\n(.$>\\n(iD)) \{\
+.		bV \\$2 \\$3 \\$4
+.	\}
+.	if \\n(O\\n(dP>0 'in \\n(.iu+\\n(O\\n(dPu
+.	if (\\n(bV==0) \{\
+.		if (\\n(nS==0) \{\
+.			ie "\\*(d\\n(dP"dR" .sp \\n(dVu
+.			el 'sp \\n(dVu
+.		\}
+.	\}
+.	if \\n(cR==0 .ne 2v
+.	nr bV 0
+.	nr iD 0
+.\}
+..
+.\" NS bV macro - resolve remaining .Bd arguments
+.de bV
+.\" .tm in bV with args: \\$1 \\$2 \\$3
+.nr iD 1
+.ds bY
+.if "\\$1"-offset" \{\
+.	ds bY \\$2
+.	if "\\*(bY"left" \{\
+.		nr iD \\n(iD+1
+.		nr O\\n(dP 0
+.	\}
+.	if "\\*(bY"right" \{\
+.		nr iD \\n(iD+1
+.		nr O\\n(dP (\\n(.l/3)u
+.	\}
+.	if "\\*(bY"center" \{\
+.		nr iD \\n(iD+1
+.		nr O\\n(dP (\\n(.l-\\n(.i)/4u
+.	\}
+.	if "\\*(bY"indent" \{\
+.		nr iD \\n(iD+1
+.		nr O\\n(dP \\n(dIu
+.	\}
+.	if "\\*(bY"indent-two" \{\
+.		nr iD \\n(iD+1
+.		nr O\\n(dP \\n(dIu+\\n(dIu
+.	\}
+.	if \\n(iD==1 \{\
+.		nr iD \\n(iD+1
+.		sW "\\*(bY"
+.		ie \\n(sW>2 \{\
+.			ie ((\\*(bY>9n)&(\\*(bY<100n)) \{\
+.				nr O\\n(dP \\*(bY
+.			\}
+.			el .nr O\\n(dP (\\n(sW)*\\n(fWu
+.		\}
+.		el \{\
+.			if \\n(sW==2 .aT \\*(bY
+.			ie \\n(aT==1 \{\
+.				nr O\\n(dP \\n(\\*(bY
+.			\}
+.			el .nr O\\n(dP \\*(bY
+.		\}
+.	\}
+.\}
+.if "\\$1"-compact" \{\
+.	nr bV 1
+.\}
+.if \\n(iD<\\n(.$ \{\
+.	ie "\\*(bY"" \{\
+.		bV \\$2 \\$3
+.	\}
+.	el \{\
+.		bV \\$3
+.	\}
+.\}
+..
+.\" NS Ed macro - end display
+.de Ed
+.ds mN Ed
+.br
+.if \\n(dP==0 .tm mdoc: Extraneous .Ed
+.if "\\*(d\\n(dP"dL" \{\
+.	ft \\n(cF
+.	fz \\n(cZ
+.\}
+.in \\n(.iu-\\n(O\\n(dPu
+.rr O\\n(dP
+.rm d\\n(dP
+.nr dP \\n(dP-1
+.fi
+.if t .ad
+..
+.\"--------------------------------------------------------------------------
+.\" NS Bl macro - begin list (.Bl list-type)
+.\" NS L[0-9] registers - stack of list types
+.de Bl
+.ie \\n(.$==0 \{\
+.tm Usage: .Bl [[-hang | -tag] [-width]] [ -item | -enum | -bullet | -diag] (#\\n(.c)
+.\}
+.el \{\
+.	ds mN Bl
+.	nr aP 0
+.	nr lC \\n(lC+1
+.	ds A1 \\$2
+.	ds A2 \\$3
+.	ds A3 \\$4
+.	ds A4 \\$5
+.	ds A5 \\$6
+.	ds A6 \\$7
+.	ds A7 \\$8
+.	ds A8 \\$9
+.	nr fV \\n(.$-1
+.	if "\\$1"-hang" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC hL
+.		nr w\\n(lC 6n
+.		nr tC  1
+.	\}
+.	if "\\$1"-tag" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC tL
+.		nr tC  1
+.	\}
+.	if "\\$1"-item" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC iT
+.		nr tC  1
+.	\}
+.	if "\\$1"-enum" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC nU
+.		nr w\\n(lC 3n
+.		nr tC  1
+.	\}
+.	if "\\$1"-bullet" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC bU
+.		nr w\\n(lC 2n
+.		nr tC  1
+.	\}
+.	if "\\$1"-dash" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC hU
+.		nr w\\n(lC 2n
+.		nr tC  1
+.	\}
+.	if "\\$1"-hyphen" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC hU
+.		nr w\\n(lC 2n
+.		nr tC  1
+.	\}
+.	if "\\$1"-inset" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC lL
+.		nr tC  1
+.	\}
+.	if "\\$1"-diag" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC mL
+.		nr mL 1
+.	\}
+.	if "\\$1"-ohang" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC oL
+.		nr tC 1
+.	\}
+.	if "\\$1"-column" \{\
+.		nr aP \\n(aP+1
+.		ds L\\n(lC cL
+.	\}
+.	ie \\n(aP==0 \{\
+.	tm \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	tm Usage: .Bl [[-inset|-tag] -width] [-item|-enum|-bullet|-diag] (#\\n(.c)
+.	\}
+.	el \{\
+.		tY
+.		if (\\n(aP==1)&(\\n(aP<\\n(.$) \{\
+.			nr aP 0
+.			lV
+.			if "\\*(L\\n(lC"cL" \{\
+.				W\\n(wV
+.				nr w\\n(lC 0
+'				in -\\n(eWu
+.				ie \\n(v\\n(lC==1 \{\
+.				       nr aa 0
+.				\}
+.				el \{\
+.					sp \\n(dVu
+.				\}
+.				nf
+.				nr wV 0
+.			\}
+.		\}
+.	\}
+.	nr aP 0
+.\" .	ds b1
+.	aY
+.\" .tm Here is L[\\n(lC]==\\*(L\\n(lC
+.\}
+..
+.if \n(.g \{\
+.	nr i 10
+.	while \ni<100 \{\
+.	     nr num!\nin 1
+.	     nr i +1
+.	\}
+.\}
+.\" NS lV macro - resolve remaining .Bl arguments
+.de lV
+.nr aP \\n(aP+1
+.if \\n(fV>=\\n(aP \{\
+.	nr iD 0
+.	if "\\*(A\\n(aP"-compact" \{\
+.		nr iD 1
+.		nr v\\n(lC 1
+.	\}
+.	if "\\*(A\\n(aP"-width" \{\
+.		nr iD 1
+.		nr aP \\n(aP+1
+.		nr tW 1
+.		ds t\\n(lC TagwidtH
+.		ds tS \\*(A\\n(aP
+.		aW \\n(aP
+.		ie \\n(sW>2 \{\
+.			nr w\\n(lC (\\n(sW)*\\n(fWu
+.			if \\n(sW==3 \{\
+.				ie \\n(.g \{\
+.					if \A'\\*(tS' .if r num!\\*(tS \{\
+.						nr w\\n(lC \\*(tS
+.					\}
+.				\}
+.				el \{\
+.					if (\\*(tS>9n)&(\\*(tS<99n) \{\
+.						nr w\\n(lC \\*(tSu
+.					\}
+.				\}
+.			\}
+.		\}
+.		el \{\
+.			aT \\*(tS
+.			ie \\n(aT==1 \{\
+.				nr w\\n(lC \\n(\\*(tS
+.			\}
+.			el \{\
+.				nr w\\n(lC \\*(tSu
+.			\}
+.		\}
+.	\}
+.	if "\\*(A\\n(aP"-offset" \{\
+.		nr iD 1
+.		nr aP \\n(aP+1
+.		ie "\\*(A\\n(aP"indent" \{\
+.			nr o\\n(lC \\n(Dsu
+.		\}
+.		el \{\
+.			ds tS \\*(A\\n(aP
+.			aW \\n(aP
+.			ie \\n(sW>2 \{\
+.				nr o\\n(lC (\\n(sW)*\\n(fWu
+.				ie \\n(.g \{\
+.					if \A'\\*(tS' .if r num!\\*(tS \{\
+.						nr o\\n(lC \\*(tS
+.					\}
+.				\}
+.				el \{\
+.					if (\\*(tS>9n)&(\\*(tS<100n) \{\
+.						nr o\\n(lC \\*(tS
+.					\}
+.				\}
+.			\}
+.			el \{\
+.				ie \\n(C\\n(aP==1 .nr o\\n(lC \\n(\\*(tS
+.				el .nr o\\n(lC \\*(tS
+.			\}
+.		\}
+.	\}
+.	if \\n(iD==0 \{\
+.		if "\\*(L\\n(lC"cL" \{\
+.			nr wV \\n(wV+1
+.			ds A\\n(wV \\*(A\\n(aP
+.		\}
+.	\}
+.	if \\n(fV>\\n(aP .lV
+.\}
+..
+.\" NS El macro - end list
+.\" NS iD local register
+.de El
+.ie \\n(.$>0 \{\
+.	tm Usage: .El (#\\n(.c)
+.\}
+.el \{\
+.	ds mN El
+.	nr iD 0
+.	if "\\*(L\\n(lC"cL" \{\
+.		nr iD 1
+.		cC
+.	\}
+.	if "\\*(L\\n(lC"nU" \{\
+.		nr nU 0
+.	\}
+.	if \\n(mL>0 \{\
+.		nr iD 1
+.		nr mL 0
+.		tZ
+.		nr lC \\n(lC-1
+.		tY
+.	\}
+.	if "\\*(L\\n(lC"iT" \{\
+'		in \\n(.iu-\\n(o\\n(lCu
+.		tZ
+.		nr lC \\n(lC-1
+.		tY
+.		nr iD 1
+.	\}
+.	if "\\*(L\\n(lC"oL" \{\
+'		in \\n(.iu-\\n(o\\n(lCu
+.		tZ
+.		nr lC \\n(lC-1
+.		tY
+.		nr iD 1
+.	\}
+.	if "\\*(L\\n(lC"lL" \{\
+'		in \\n(.iu-\\n(o\\n(lCu
+.		tZ
+.		nr lC \\n(lC-1
+.		tY
+.		nr iD 1
+.	\}
+.	if \\n(iD==0 \{\
+.		lE
+.	\}
+.	br
+.	nr iD 0
+.\}
+..
+.\" NS It macro - list item
+.\" NS iD local register
+.\" NS aA save pA font string for section FILES (no underline if nroff)
+.de It
+.if "\\*(L\\n(lC"" \{\
+.	tm Usage .Bl -list-type [-width [string] | -compact | -offset [string]] (#\\n(.c)
+.	tm .It \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
+.\}
+.\" .tm Here is L[\\n(lC]==\\*(L\\n(lC
+.ne 3v
+.ie \\n(.$>0 \{\
+.	ds mN It
+.	ds b1
+.	nr iD 0
+.	ds A1 \\$1
+.	ds A2 \\$2
+.	ds A3 \\$3
+.	ds A4 \\$4
+.	ds A5 \\$5
+.	ds A6 \\$6
+.	ds A7 \\$7
+.	ds A8 \\$8
+.	ds A9 \\$9
+.	nr fV \\n(.$
+.	if "\\*(L\\n(lC"mL" \{\
+.		nr iD 1
+.		nr aP 0
+.		aX
+.		\\*(L\\n(lC
+.	\}
+.	if "\\*(L\\n(lC"cL" \{\
+.		ds b1
+.		nr aP 0
+.		nr iD 1
+.		\\*(L\\n(lC
+.	\}
+.	if "\\*(L\\n(lC"iT" \{\
+.		nr aP 0
+.		nr iD 1
+.		\\*(L\\n(lC
+.	\}
+.	if \\n(iD==0 \{\
+.		fV
+.\" tm ------------------------------------------------------------------------
+.\" tm It list-type==\\*(L\\n(lC, aP==\\n(aP
+.\" tm It beg arg(A[1])==\\*(A1; oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
+.		nr oM \\n(oM+1
+.		nr tP 1
+.		nr aP \\n(aP+1
+.		nr tX \\n(C\\n(aP
+.		ds tX \\*(A\\n(aP
+.		if \\n(nF==1 \{\
+.			ds aA \\*(pA
+.			if n .ds pA \\*(nO
+.		\}
+.		ie \\n(C\\n(aP==1 \{\
+.			\\*(A\\n(aP
+.		\}
+.		el \{\
+.			nr aP \\n(aP-1
+.			No
+.		\}
+.\" tm in It here is b1==\\*(b1
+.\" tm It mid arg(A[1])==\\*(A1; oM==\\n(oM; dZ==\\n(dZ; Xt==\\n(Xt; aC==\\n(aC
+.		ie \\n(Xt==1 .ds xB \&\\*(L\\n(lC
+.		el .\\*(L\\n(lC
+.	\}
+.	nr iD 0
+.\}
+.el .\\*(L\\n(lC
+..
+.\" NS lL macro - .It item of list-type inset
+.de lL
+.lY
+.br
+\&\\*(b1
+.nr oM \\n(oM-1
+.nr tP 0
+.ds b1
+.aY
+'fi
+..
+.\" NS hL macro - .It item of list-type hanging label (as opposed to tagged)
+.de hL
+.lX
+.nr bb \\n(w\\n(lCu+\\n(lSu
+.ti -\\n(bbu
+.ie \w\\*(b1u>=(\\n(w\\n(lCu) \&\\*(b1
+.el \&\\*(b1\h'|\\n(bbu'\c
+.nr oM \\n(oM-1
+.ds b1
+.nr tP 0
+.aY
+'fi
+..
+.\" NS oL macro - .It item of list-type overhanging label
+.de oL
+.lY
+\&\\*(b1
+.br
+.nr oM \\n(oM-1
+.ds b1
+.nr tP 0
+.aY
+'fi
+..
+.\" NS iT macro - .It item of list-type [empty label]
+.de iT
+.lY
+.br
+.\" .ds b1
+.aY
+'fi
+..
+.\" NS nU macro - Enumerated list
+.\" NS nU register count
+.\" NS hU macro - Hyphen paragraph list (sub bullet list)
+.\" NS bU macro - Bullet paragraph list
+.de nU
+.nr oM \\n(oM+1
+.nr nU \\n(nU+1
+.ds b1 \&\\n(nU.
+.uL
+..
+.de bU
+.nr oM \\n(oM+1
+.nr bU \\n(bU+1
+.ds b1 \&\\*(sY\&\(bu\fP
+.uL
+..
+.de hU
+.nr oM \\n(oM+1
+.nr bU \\n(bU+1
+.ds b1 \&\\*(sY\&\-\fP
+.uL
+..
+.\" NS uL macro - .It item of list-type enum/bullet/hyphen
+.de uL
+.lX
+.nr bb \\n(w\\n(lCu+\\n(lSu
+.ti -\\n(bbu
+.ie \w\\*(b1u>=(\\n(w\\n(lCu) \&\\*(b1
+.el \&\\*(b1\h'|\\n(bbu'\c
+.nr oM \\n(oM-1
+.\" .nr dZ \\n(dZ+1
+.ds b1
+.nr tP 0
+.aY
+'fi
+..
+.\" NS mL macro - .It item of list-type diagnostic-message
+.de mL
+.nr cF \\n(.f
+.nr cZ \\n(.s
+.ie \\n(mL==1 \{\
+.	nr zB \\n(.c
+.	ie (\\n(zB-\\n(zA)>1 .Pp
+.	el .br
+.	nr zA \\n(zB
+.	nr zB 0
+.\}
+.el \{\
+.	nr zA \\n(.c
+.	br
+.\}
+\&\\*(sY\\*(b1\f\\n(cF\s\\n(cZ\\*(lS\c
+.aY
+.ds b1
+'fi
+..
+.\" NS tL macro - .It item of list-type "tag"
+.de tL
+.\" tm in tL here is b1==\\*(b1
+.if \\n(tW==0 .lW
+.lX
+.nr bb \\n(w\\n(lCu+\\n(lSu
+.ti -\\n(bbu
+.ie (\w\\*(b1u)>(\\n(w\\n(lCu) \{\&\\*(b1
+.       br
+.\}
+.el \&\\*(b1\h'|\\n(bbu'\c
+.if \\n(nF==1 \{\
+.	if n .ds pA \\*(aA
+.\}
+.nr oM \\n(oM-1
+.nr tP 0
+.\" .nr dZ \\n(dZ+1
+.ds b1
+.aY
+'fi
+..
+.\" NS lW macro - resolve unknown label/tag width (if .Bl [inset | tag] only)
+.de lW
+.if !"TagwidtH"\\*(t\\n(lC" \{\
+.       ie \\n(tX==1 \{\
+.               ds t\\n(lN \\*(tX
+.               nr w\\n(lN \\n(\\*(tX
+.       \}
+.       el \{\
+.               ds t\\n(lN No
+.               nr w\\n(lN \\n(No
+.       \}
+.       if !"\\*(t\\n(lC"\\*(t\\n(lN" .nr tC 1
+.\}
+..
+.\" NS lX macro - set up vertical spacing (if compact) and offset+indent (all)
+.de lX
+.ie \\n(tC \{\
+.       nr tC 0
+.       nr tW 0
+.       if \\n(v\\n(lC==0 .sp \\n(dVu
+.       in \\n(.iu+\\n(w\\n(lCu+\\n(o\\n(lCu+\\n(lSu
+.\}
+.el \{\
+.	ie \\n(v\\n(lC==1 \{\
+.	       nr aa 0
+.	\}
+.	el \{\
+.		sp \\n(dVu
+.	\}
+.\}
+.if !\\n(cR .ne 2v
+..
+.\" NS lY macro - set up vertical spacing (if compact) and offset+indent (all)
+.de lY
+.ie \\n(tC \{\
+.       nr tC 0
+.       nr tW 0
+.       if \\n(v\\n(lC==0 .sp \\n(dVu
+.       in \\n(.iu+\\n(o\\n(lCu
+.\}
+.el \{\
+.	ie \\n(v\\n(lC==1 \{\
+.	       nr aa 0
+.	\}
+.	el \{\
+.		sp \\n(dVu
+.	\}
+.\}
+.if !\\n(cR .ne 2v
+..
+.\" NS tS temporary string
+.\" NS hL macro - hanging list function
+.\" NS tS temporary string
+.\" NS hL macro - hanging list function
+.\" NS lT macro - tagged list function
+.\" NS lE macro - list end function
+.\" NS tX string (initial string)
+.\" NS tX register (initial class)
+.\" NS tC parameter change flag
+.\" NS Xt save current list-type flag
+.\" NS lC register - list type stack counter
+.\" NS tP register tag flag (for diversions)
+.\" NS w[0-9] register tag stack (nested tags)
+.\" NS t[0-9] register tag string stack (nested tags)
+.\" NS o[0-9] register offset stack (nested tags)
+.\" NS v[0-9] register vertical tag break stack
+.\" NS h[0-9] register horizontal tag stack (continuous if 1, break if 0)
+.nr lC 0
+.nr wV 0
+.nr w1 0
+.nr o1 0
+.nr v1 0
+.nr h1 0
+.ds t\n(lC
+.de lE
+.\" IN lC o[\\n(lC]==\\n(o\\n(lC, w[\\n(lC]==\\n(w\\n(lC,
+.ie \\n(o\\n(lC>0 \{\
+'	in \\n(.iu-(\\n(w\\n(lCu)-(\\n(o\\n(lCu)-\\n(lSu
+.	rr o\\n(lC
+.\}
+.el 'in \\n(.iu-\\n(w\\n(lCu-\\n(lSu
+.if \\n(lC<=0 .tm Extraneous .El call (#\\n(.c)
+.tZ
+.nr lC \\n(lC-1
+.tY
+..
+.\" NS tY macro - set up next block for list
+.\" NS tZ macro - decrement stack
+.\" NS tY register (next possible lC value)
+.de tY
+.nr tY (\\n(lC+1)
+.nr w\\n(tY 0
+.nr h\\n(tY 0
+.nr o\\n(tY 0
+.ds t\\n(tY \\*(t\\n(lC
+.ds L\\n(tY
+.nr v\\n(tY 0
+..
+.de tZ
+.rm L\\n(tY
+.rr w\\n(tY
+.rr h\\n(tY
+.rr o\\n(tY
+.rm t\\n(tY
+.rr v\\n(tY
+.nr tY \\n(tY-1
+..
+.\" initial values
+.nr w1 0
+.nr o1 0
+.nr h1 0
+.ds t1
+.nr v1 0
+.nr tY 1
+.\" NS Xr macro - cross reference (man page only)
+.de Xr
+.if \\n(aC==0 \{\
+.	ie \\n(.$==0 .tm Usage: .Xr manpage_name [section#] \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Xr
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.	ie \\n(C\\n(aP==1 .tm Usage: .Xr manpage_name [section#] \\*(Pu (#\\n(.c)
+.	el \{\
+.		ie \\n(C\\n(aP>2 .y\\n(C\\n(aP
+.		el \{\
+.			as b1 \&\\*(xR\\*(A\\n(aP\fP\s0
+.			if \\n(aC>\\n(aP \{\
+.				nr aP \\n(aP+1
+.				if \\n(C\\n(aP==2 \{\
+.					as b1 \&(\\*(A\\n(aP)
+.					nr aP \\n(aP+1
+.				\}
+.				if \\n(aC>=\\n(aP \{\
+.					c\\n(C\\n(aP
+.				\}
+.			\}
+.		\}
+.		aZ
+.       \}
+.\}
+..
+.\" NS Sx macro - cross section reference
+.de Sx
+.if \\n(aC==0 \{\
+.	ie \\n(.$==0 .tm Sx Usage: .Sx Section Header \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Sx
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.	as b1 \\*(sX
+.	nr cF \\n(.f
+.	nr cZ \\n(.s
+.	nR
+.\}
+..
+.\" NS cC macro - column-list end-list
+.\" NS eW macro - column indent width
+.\" NS cI register - column indent width
+.\" NS W[1-5] macro - establish tabs for list-type column
+.de cC
+'in \\n(.iu-\\n(o\\n(lCu-\\n(w\\n(lCu
+.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
+.fi
+.tZ
+.nr lC \\n(lC-1
+.tY
+..
+.de W1
+.ta \w\\*(A1    u
+.nr eW \w\\*(A1    u
+'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
+..
+.de W2
+.ta \w\\*(A1    u +\w\\*(A2    u
+.nr eW \w\\*(A1    u+\w\\*(A2    u
+'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
+..
+.de W3
+.ta \w\\*(A1    u +\w\\*(A2    u +\w\\*(A3    u
+.nr eW \w\\*(A1    u+\w\\*(A2    u+\w\\*(A3    u
+'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
+..
+.de W4
+.ta \w\\*(A1    u +\w\\*(A2    u +\w\\*(A3    u +\w\\*(A4    u
+.nr eW \w\\*(A1    u+\w\\*(A2    u +\w\\*(A3    u +\w\\*(A4    u
+'in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
+..
+.de W5
+.ta \w\\*(A1   u +\w\\*(A2   u +\w\\*(A3   u +\w\\*(A4   u +\w\\*(A5   u
+.nr eW \w\\*(A1   u +\w\\*(A2   u +\w\\*(A3   u +\w\\*(A4   u +\w\\*(A5   u
+'	in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
+..
+.\" This is packed abnormally close, intercol width should be an option
+.de W6
+.ta \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u +\w\\*(A6
+.nr eW \w\\*(A1 u +\w\\*(A2 u +\w\\*(A3 u +\w\\*(A4 u +\w\\*(A5 u +\w\\*(A6
+'	in \\n(.iu+\\n(eWu+\\n(o\\n(lCu
+..
+.\" NS cL macro - column items
+.de cL
+.if \\n(w\\n(lC==0 .nr w\\n(lC \\n(eWu
+.if \\n(.u==0 \{\
+.	fi
+'	in \\n(.iu+\\n(eWu
+.\}
+.ti -\\n(eWu
+.fV
+.nr aP \\n(aP+1
+.ie \\n(aC>=\\n(aP  \{\
+.	if "\\*(A\\n(aP"Ta" \{\
+.		nr jJ \\n(aP-1
+.		rm S\\n(jJ
+.		rr jJ
+.	\}
+.	c\\n(C\\n(aP
+.\}
+.el .tm Usage: .It column_string [Ta [column_string ...] ] (#\\n(.c)
+..
+.\" NS Ta macro - append tab (\t)
+.de Ta
+.ie \\n(aC>0 \{\
+.	nr aP \\n(aP+1
+.	ie \\n(aC>=\\n(aP \{\
+.		if "\\*(A\\n(aP"Ta" \{\
+.			nr jJ \\n(aP-1
+.			rm S\\n(jJ
+.			rr jJ
+.		\}
+.		as b1 \\t
+.		c\\n(C\\n(aP
+.	\}
+.	el \{\
+.		as b1 \\t\\c
+.		rm S\\n(aP
+.		pB
+.		aY
+.\" .		ds b1
+.	\}
+.\}
+.el \{\
+.	tm Usage: Ta must follow column entry: e.g. (#\\n(.c)
+.	tm .It column_string [Ta [column_string ...] ]
+.\}
+..
+.\"
+.\" NS Dl macro - display (one line) literal
+.de Dl
+'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
+.in \\n(.iu+\\n(Dsu
+.ie \\n(aC==0 \{\
+.	ie \\n(.$==0 \{\
+.		tm Usage: .Dl argument ... (#\\n(.c)
+.	\}
+.	el \{\
+.		ds mN Dl
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.		Li
+.	\}
+.\}
+.el \{\
+.	tm Usage: .Dl not callable by other macros (#\\n(.c)
+.\}
+.in \\n(.iu-\\n(Dsu
+..
+.\"
+.\" NS D1 macro - display (one line)
+.de D1
+'ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i
+.in \\n(.iu+\\n(Dsu
+.ie \\n(aC==0 \{\
+.	ie \\n(.$==0 \{\
+.		tm Usage: .D1 argument ... (#\\n(.c)
+.	\}
+.	el \{\
+.		ds mN D1
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.		nr aP \\n(aP+1
+.		ie \\n(C\\n(aP==1 .\\*(A\\n(aP
+.		el .No
+.	\}
+.\}
+.el \{\
+.	tm Usage: .D1 not callable by other macros (#\\n(.c)
+.\}
+.in \\n(.iu-\\n(Dsu
+..
+.\" NS Ex macro - DEFUNCT
+.de Ex
+.tm Ex defunct, Use .D1: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\"
+.\" NS Ex macro - DEFUNCT
+.de Ex
+.tm Ex defunct, Use .D1: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+..
+.\"
+.\" NS Vt macro - Variable type (for forcing old style variable declarations)
+.\" this is not done in the same manner as .Ot for fortrash - clean up later
+.de Vt
+.\" if a function declaration was the last thing given, want vertical space
+.if \\n(fD>0 \{\
+.	Pp
+.	nr fD 0
+.\}
+.\"	if a subroutine was the last thing given, want vertical space
+.if \\n(fZ>0 \{\
+.	ie \\n(fX==0 \{\
+.		Pp
+.		rs
+.	\}
+.	el .br
+.\}
+.nr fX \\n(fX+1
+.nr cF \\n(.f
+.nr cZ \\n(.s
+\\*(fT\&\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.ie \\n(oT==0 .br
+.el \&\ \&
+.ft \\n(cF
+.fs \\n(cZ
+..
+.\"
+.\" NS Ft macro - Function type
+.nr fZ 0
+.de Ft
+.if \\n(nS>0 \{\
+.	if \\n(fZ>0 \{\
+.		Pp
+.		nr fD 0
+.		nr fX 0
+.	\}
+.	if \\n(fD>0 \{\
+.		Pp
+.		nr fD 0
+.		nr fX 0
+.	\}
+.	if \\n(fX>0 \{\
+.		Pp
+.		nr fX 0
+.	\}
+.	nr fY 1
+.\}
+.nr cF \\n(.f
+.nr cZ \\n(.s
+\&\\*(fT\\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.ft \\n(cF
+.fs \\n(cZ
+.\" .br
+..
+.\"
+.\" NS Ot macro - Old Function type (fortran - no newline)
+.\" Ns oT register
+.nr oT 0
+.de Ot
+.nr oT 1
+.if \\n(nS>0 \{\
+.	if \\n(fZ>0 \{\
+.		Pp
+.		nr fD 0
+.		nr fX 0
+.	\}
+.	if \\n(fD>0 \{\
+.		Pp
+.		nr fD 0
+.		nr fX 0
+.	\}
+.	if \\n(fX>0 \{\
+.		Pp
+.		nr fX 0
+.	\}
+.	nr fY 1
+.\}
+.if \\n(.$==4 .as b1 \&\\*(fT\&\\$1 \\$2 \\$3 \\$4
+.if \\n(.$==3 .as b1 \&\\*(fT\&\\$1 \\$2 \\$3
+.if \\n(.$==2 .as b1 \&\\*(fT\&\\$1 \\$2
+.if \\n(.$==1 .as b1 \&\\*(fT\&\\$1
+.as b1 \&\ \fP
+..
+.\"
+.\" NS Fa macro - Function arguments
+.de Fa
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .Fa Function Arguments ... \\*(Pu (#\\n(.c)
+.       el \{\
+.		ds mN Fa
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.ie \\n(fC>0 \{\
+.	fC
+.\}
+.el \{\
+.	if \\n(aC>\\n(aP \{\
+.		as b1 \\*(fA
+.		nr aP \\n(aP+1
+.		nr cF \\n(.f
+.		nr cZ \\n(.s
+.		nR
+.		if \\n(nS>0 \{\
+.			if \\n(fZ>0 .br
+.		\}
+.	\}
+.\}
+..
+.\" NS fC macro - interal .Fa for .FO and .Fc
+.de fC
+.ie \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.\" .	nr aa \\n(aP
+.\" .	if \\n(nS>0 \{\
+.		ds Fb
+.		nr fB 0
+.		nr Fb 0
+.		fB \\*(A\\n(aP
+.		if \\n(fB>1 \{\
+.			rm A\\n(aP
+.			rn Fb A\\n(aP
+.		\}
+.\" .	\}
+.	if \\n(fC>1 \{\
+.		as b1 \&\f\\n(cF\s\\n(cZ,\\*(S\\n(aP\\*(fA\\*(A\\n(aP\fP\s0
+.\" .		as b1 \&\\,\\*(S\\n(aP\fP\s0\\*(fA\\*(A\\n(aP\fP\s0
+.	\}
+.	if \\n(fC==1 \{\
+.		as b1 \&\|\\*(fA\\*(A\\n(aP\fP\s0
+.	\}
+.	nr fC \\n(fC+1
+.	fC
+.\}
+.el  \{\
+.	aY
+.\}
+..
+.\" NS Fn macro - functions
+.\" NS fY register - dick with old style function declarations (fortran)
+.\" NS fZ register - break a line when more than one function in a synopsis
+.\"
+.de Fn
+.if \\n(aC==0 \{\
+.	ie \\n(.$==0 .tm Usage: .Fn function_name function_arg(s) ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN Fn
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(nS>0 \{\
+.\" if there is/has been more than one subroutine declaration
+.	if \\n(fY==0 \{\
+.		if \\n(fZ>0 \{\
+.			Pp
+.			nr fX 0
+.			nr fD 0
+.		\}
+.	\}
+.	if \\n(fY==1 \{\
+.		br
+.		nr fX 0
+.		nr fD 0
+.		nr fY 0
+.	\}
+.	if \\n(fD>0 \{\
+.		Pp
+.		nr fX 0
+.	\}
+.	if \\n(fX>0 \{\
+.		Pp
+.		nr fD 0
+.	\}
+.	nr fZ \\n(fZ+1
+.	nr fY 0
+.	rs
+.	ie \\n(nS>1 .br
+.	el \{\
+.		if \\n(iS==0 \{\
+.			nr iS ((8)*\\n(fW)u
+.		\}
+.	\}
+.	in +\\n(iSu
+.	ti -\\n(iSu
+.	nr nS \\n(nS+1
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.	nr cF \\n(.f
+.	nr cZ \\n(.s
+.	as b1 \\*(fN\\*(A\\n(aP\fP\s0\\*(lp
+.	ie \\n(aC>\\n(aP \{\
+.		as b1 \\*(fA
+.		nr aP \\n(aP+1
+.		f\\n(C\\n(aP
+.	\}
+.	el \{\
+.		as b1 \|\\*(rp
+.		aZ
+.	\}
+.	if \\n(nS>0 \{\
+. 		in -\\n(iSu
+.	\}
+.\}
+..
+.\"
+.\" NS f1 macro - class switch
+.\" NS f2 macro - handle function arguments
+.\" NS f3 macro - punctuation
+.\" NS f4 macro - write out function
+.de f1
+.as b1 \\*(rp\f\\n(cF\s\\n(cZ
+.\\*(A\\n(aP
+..
+.de f2
+.if \\n(nS>0 \{\
+.	ds Fb
+.	nr fB 0
+.	nr Fb 0
+.	fB \\*(A\\n(aP
+.	if \\n(fB>1 \{\
+.		rm A\\n(aP
+.		rn Fb A\\n(aP
+.	\}
+.\}
+.as b1 \\*(A\\n(aP
+.ie \\n(aC>\\n(aP \{\
+.	nr aa \\n(aP
+.	nr aP \\n(aP+1
+.	if \\n(C\\n(aP==2 \{\
+.		as b1 \&\|\f\\n(cF\s\\n(cZ,\\*(S\\n(aa\fP\s0\|
+.	\}
+.	f\\n(C\\n(aP
+.\}
+.el  \{\
+.	as b1 \\*(rp\f\\n(cF\s\\n(cZ
+.	aZ
+.\}
+..
+.de f3
+.as b1 \\*(rp\f\\n(cF\s\\n(cZ\\*(A\\n(aP
+.ie \\n(aC>\\n(aP \{\
+.	No
+.\}
+.el .aZ
+..
+.de f4
+.as b1 \\*(rp\f\\n(cF\s\\n(cZ\\*(S\\n(aP\\*(A\\n(aP
+.ie \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.	No
+.\}
+.el .aZ
+..
+.de Fo
+.hy 0
+.if \\n(aC==0 \{\
+.	ie \\n(.$==0 .tm Usage: .Fo function_name
+.	el \{\
+.		ds mN Fo
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(nS>0 \{\
+.\" if there is/has been more than one subroutine declaration
+.	if \\n(fY==0 \{\
+.		if \\n(fZ>0 \{\
+.			Pp
+.			nr fX 0
+.			nr fD 0
+.		\}
+.	\}
+.	if \\n(fY==1 \{\
+.		br
+.		nr fX 0
+.		nr fD 0
+.		nr fY 0
+.	\}
+.	if \\n(fD>0 \{\
+.		Pp
+.		nr fX 0
+.	\}
+.	if \\n(fX>0 \{\
+.		Pp
+.		nr fD 0
+.	\}
+.	nr fZ \\n(fZ+1
+.	nr fY 0
+.	rs
+.	ie \\n(nS>1 .br
+.	el \{\
+.		if \\n(iS==0 \{\
+.			nr iS ((8)*\\n(fW)u
+.		\}
+.	\}
+.	in +\\n(iSu
+.	ti -\\n(iSu
+.	nr nS \\n(nS+1
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr oM \\n(oM+1
+.	nr fC 1
+.	nr aP \\n(aP+1
+.	nr cF \\n(.f
+.	nr cZ \\n(.s
+.	as b1 \\*(fN\\*(A\\n(aP\fP\s0\\*(lp
+.	aY
+.\}
+..
+.de Fc
+.if \\n(aC==0 \{\
+.	if \\n(.$>0 \{\
+.		ds mN Fo
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.nr fC 0
+.nr oM \\n(oM-1
+.as b1 \|\\*(rp
+.ie \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.	\\*(A\\n(aP
+.\}
+.el \{\
+.	aZ
+.\}
+.if \\n(nS>0 \{\
+.	in -\\n(iSu
+.\}
+.hy
+..
+.\" NS fb macro - if SYNOPSIS, set hard space inbetween function args
+.\" NS fb register - count of words in a function argument
+.\" NS Fb register - counter
+.\" NS Fb string - temporary string
+.de fB
+.\" .tm fB==\\n(fB, Fb==\\n(Fb, 1==\\$1 2==\\$2 3==\\$3 4==\\$4 5==\\$5 6==\\$6
+.if \\n(fB==0 \{\
+.	nr fB \\n(.$
+.	nr Fb 0
+.	ds Fb
+.\}
+.nr Fb \\n(Fb+1
+.as Fb \&\\$1
+.if \\n(Fb<\\n(fB \{\
+.	as Fb \&\\*(hV
+.	fB \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.\}
+..
+.\" NS Fc - Function close - not implemented yet
+.\" NS Fo - Function open - not implemented yet
+.\"
+.\" Very crude references, stash all reference info into strings (usual
+.\" use of b1 buffer, then b1 contents copied to string of retrievable
+.\" naming convention), print out reference on .Re request and clean up.
+.\" Ordering very limited, no fancy citations, but can do articles, journals
+.\" and books - need to add several missing options (like city etc).
+.\" should be able to grab a refer entry, massage it a wee bit (prefix
+.\" a `.' to the %[A-Z]) and not worry (ha!)
+.\"
+.\" NS Rs macro - Reference Start
+.\" NS rS register - Reference Start flag
+.\" NS rS string - Reference Start buffer name for next save (of b1 buffer)
+.de Rs
+.nr rS 1
+.rC
+.if \\n(nA==1 .Pp
+.nr Kl 0
+..
+.\" NS Re macro - Reference End
+.de Re
+.rZ
+.rC
+.nr rS 0
+..
+.\" NS rC macro - reference cleanup
+.de rC
+.nr uK 0
+.nr jK 0
+.nr nK 0
+.nr oK 0
+.nr qK 0
+.nr rK 0
+.nr tK 0
+.nr vK 0
+.nr dK 0
+.nr pK 0
+.nr bK 0
+.ds rS
+.rm U1 U2 U3 U4 U5 U6 U7 U8
+.rm uK jK nK oK rK qK tK vK dK pK bK
+..
+.\" NS rZ macro - reference print
+.de rZ
+.if \\n(uK \{\&\\*(U1,
+.	nr aK 1
+.	if (\\n(uK>1 \{\
+.		aK
+.	\}
+.	nr Kl -\\n(uK
+.\}
+.if \\n(tK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \{\
+.		ie (\\n(jK==1):(\\n(bK==1) \{\&\\*q\\*(tK\\*q.
+.		\}
+.		el \{\&\\*(eM\\*(tK\\*(nO.
+.		\}
+.	\}
+.	if \\n(Kl>0 \{\
+.		ie (\\n(jK==1):(\\n(bK==1) \{\&\\*q\\*(tK\\*q,
+.		\}
+.		el \{\&\\*(eM\\*(tK\\*(nO,
+.		\}
+.	\}
+.\}
+.if \\n(bK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(eM\\*(bK\\*(nO.
+.	if \\n(Kl>0 \&\\*(eM\\*(bK\\*(nO,
+.\}
+.if \\n(jK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(eM\\*(jK\\*(nO.
+.	if \\n(Kl>0 \&\\*(eM\\*(jK\\*(nO,
+.\}
+.if \\n(rK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(rK.
+.	if \\n(Kl>0 \&\\*(rK,
+.\}
+.if \\n(nK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(nK.
+.	if \\n(Kl>0 \&\\*(nK,
+.\}
+.if \\n(vK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(vK.
+.	if \\n(Kl>0 \&\\*(vK,
+.\}
+.if \\n(pK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(pK.
+.	if \\n(Kl>0 \&\\*(pK,
+.\}
+.if \\n(qK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(qK.
+.	if \\n(Kl>0 \&\\*(qK,
+.\}
+.if \\n(dK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(dK.
+.	if \\n(Kl>0 \&\\*(dK,
+.\}
+.if \\n(oK \{\
+.	nr Kl \\n(Kl-1
+.	if \\n(Kl==0 \&\\*(oK.
+.	if \\n(Kl>0 \&\\*(oK,
+.\}
+.if \\n(Kl>0 .tm unresolved reference problem
+..
+.\" NS aK macro - print out reference authors
+.de aK
+.nr aK \\n(aK+1
+.ie (\\n(uK-\\n(aK)==0 \{\&and \\*(U\\n(aK,
+.\}
+.el \{\&\\*(U\\n(aK,
+.	aK
+.\}
+..
+.\" NS %A macro - reference author(s)
+.\" NS uK register - reference author(s) counter
+.\" NS U[1-9] strings - reference author(s) names
+.de %A
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%A Author_name (#\\n(.c)
+.	el \{\
+.		nr uK \\n(uK+1
+.		nr Kl \\n(Kl+1
+.		ds rS U\\n(uK
+.		ds mN %A
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS %B macro - [reference] Book Name
+.\" NS bK string - Book Name
+.\" NS bK register - Book Name flag
+.de %B
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%B Book Name (#\\n(.c)
+.       el \{\
+.		ds mN %B
+.		if \\n(rS>0 \{\
+.			nr bK \\n(bK+1
+.			nr Kl \\n(Kl+1
+.			ds rS bK
+.		\}
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.	ie \\n(rS==0 \{\
+.		as b1 \&\\*(eM
+.		nR
+.	\}
+.	el .rR
+.\}
+..
+.\" NS %D macro - [reference] Date
+.\" NS dK string - Date String
+.\" NS dK register - Date flag
+.de %D
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%D Date (#\\n(.c)
+.       el \{\
+.		ds mN %D
+.		nr dK \\n(dK+1
+.		nr Kl \\n(Kl+1
+.		ds rS dK
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS %J macro - [reference] Journal Name
+.\" NS jK register - [reference] Journal Name flag
+.\" NS jK string - [reference] Journal Name
+.de %J
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%J Journal Name (#\\n(.c)
+.       el \{\
+.		ds mN %J
+.		nr jK \\n(jK+1
+.		ds rS jK
+.		nr Kl \\n(Kl+1
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS %N macro - [reference] issue number
+.\" NS nK register - [reference] issue number flag
+.\" NS nK string - [reference] issue number
+.de %N
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%N issue number (#\\n(.c)
+.	el \{\
+.		nr nK \\n(nK+1
+.		nr Kl \\n(Kl+1
+.		ds rS nK
+.		ds mN %N
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS %O macro - [reference] optional information
+.\" NS oK register - [reference] optional information flag
+.\" NS oK string - [reference] optional information
+.de %O
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%O optional information ... \\*(Pu (#\\n(.c)
+.       el \{\
+.		ds mN %O
+.		nr oK \\n(oK+1
+.		nr Kl \\n(Kl+1
+.		ds rS oK
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS %P macro - [reference] page numbers
+.\" NS pK register - [reference] page number flag
+.\" NS pK string - [reference] page number
+.de %P
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%P page numbers ... \\*(Pu (#\\n(.c)
+.       el \{\
+.		ds mN %P
+.		nr pK \\n(pK+1
+.		nr Kl \\n(Kl+1
+.		ds rS pK
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS %Q macro - Corporate or Foreign Author
+.\" NS qK string - Corporate or Foreign Author
+.\" NS qK register - Corporate or Foreign Author flag
+.de %Q
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%Q Corporate or Foreign Author (#\\n(.c)
+.       el \{\
+.		ds mN %Q
+.		nr qK \\n(qK+1
+.		nr Kl \\n(Kl+1
+.		ds rS qK
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS %R macro - [reference] report name
+.\" NS rK string - [reference] report name
+.\" NS rK register - [reference] report flag
+.de %R
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%R reference report (#\\n(.c)
+.       el \{\
+.		ds mN %R
+.		nr rK \\n(rK+1
+.		nr Kl \\n(Kl+1
+.		ds rS rK
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS %T macro - reference title
+.\" NS tK string - reference title
+.\" NS tK register - reference title flag
+.de %T
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%T (#\\n(.c)
+.       el \{\
+.		ds mN %T
+.		if \\n(rS>0 \{\
+.			nr tK \\n(tK+1
+.			nr Kl \\n(Kl+1
+.			ds rS tK
+.		\}
+.               ds A1 \\$1
+.               ds A2 \\$2
+.               ds A3 \\$3
+.               ds A4 \\$4
+.               ds A5 \\$5
+.               ds A6 \\$6
+.               ds A7 \\$7
+.               ds A8 \\$8
+.               ds A9 \\$9
+.		nr fV \\n(.$
+.		fV
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.\" .	ie \\n(jS==1 \{\
+.\" .		nr cF \\n(.f
+.\" .		nr cZ \\n(.s
+.\" .		ds qL \&\\*(Lq\\*(rA
+.\" .		ds qR \&\\*(Rq\f\\n(cF\s\\n(cZ
+.\" .		En \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.\" .	\}
+.\" .	el \{\
+.		nr aP \\n(aP+1
+.		nr cF \\n(.f
+.		nr cZ \\n(.s
+.		ie \\n(rS==0 \{\
+.			as b1 \&\\*(eM
+.			nR
+.		\}
+.		el .rR
+.\" .	\}
+.\}
+..
+.\" NS %V macro - reference volume
+.\" NS vK string - reference volume
+.\" NS vK register - reference volume flag
+.de %V
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .%V Volume , ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN %V
+.		nr vK \\n(vK+1
+.		nr Kl \\n(Kl+1
+.		ds rS vK
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       rR
+.\}
+..
+.\" NS rR macro - reference recursion routine
+.\" NS jM local register
+.\" NS jN local register
+.de rR
+.hy 0
+.nr jM \\n(C\\n(aP
+.ie \\n(jM==1 \{\
+.\" .	as b1 \&\f\\n(cF\s\\n(cZ
+.	ie "\\*(A\\n(aP"Tn" \{\
+.		nN
+.	\}
+.	el \{\
+.		if \\n(aC>8 .tm Usage: \\*(mN - maximum 8 arguments (#\\n(.c)
+.		aI rR 1
+.		\\*(A\\n(aP
+.	\}
+.\}
+.el \{\
+.	nr jN \\n(aP
+.	ie \\n(jM==2 .as b1 \&\\*(A\\n(aP
+.	el .as b1 \&\\*(A\\n(aP
+.\" .	el .as b1 \&\f\\n(cF\s\\n(cZ\\*(A\\n(aP\fP\s0
+.	ie \\n(aC==\\n(aP \{\
+.\" .		as b1 \&\f\\n(cF\s\\n(cZ
+.		rD
+.	\}
+.	el \{\
+.		nr aP \\n(aP+1
+.		as b1 \&\\*(S\\n(jN
+.		rR
+.	\}
+.\}
+.rr jM jN
+..
+.\" NS rD macro - save b1 buffer in to appropriate name
+.de rD
+.as \\*(rS \\*(b1
+.ds b1
+.ds rS
+.aY
+..
+.\" NS Hf macro - source include header files.
+.de Hf
+.Pp
+File:
+.Pa \\$1
+.Pp
+.nr cF \\n(.f
+.nr cZ \\n(.s
+.ie t \{\
+\&\\*(lI
+.br
+.ta +9n 18n 27n 36n 45n 54n 63n 72n
+.\}
+.el \{\
+.ta +8n 16n 24n 32n 40n 48n 56n 64n 72n
+.\}
+.nf
+.so  \\$1
+.fi
+.ft \\n(cF
+.fz \\n(cZ
+.Pp
+..
+.\" NS An macro - author name
+.\" NS aN register
+.nr aN 0
+.de An
+.if \\n(nY==1 \{\
+.	ie \\n(aN==1 \{\
+.		br
+.	\}
+.	el \{\
+.		nr aN 1
+.	\}
+.\}
+.if \\n(aC==0 \{\
+.       ie \\n(.$==0 .tm Usage: .An author_name ... \\*(Pu (#\\n(.c)
+.	el \{\
+.		ds mN An
+.		aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
+.	\}
+.\}
+.if \\n(aC>\\n(aP \{\
+.	nr aP \\n(aP+1
+.       nr cF \\n(.f
+.	nr cZ \\n(.s
+.       nR
+.\}
+..
+.\" NS Sf macro -defunct
+.de Sf
+.tm .Sf defunct, use prefix or Ns
+..
+.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.
+.\" Ns Rv macro - return values
+.\" Ns rV string - standard return message
+.de Rv
+.ie \\n(.$==0 \{\
+.tm Usage: .Rv [-std] (#\\n(.c)
+.\}
+.el \{\
+.	ds mN Rv
+.\" .	nr aP 0
+.\" .	nr lR \\n(lR+1
+.\" .	ds A1 \\$2
+.\" .	ds A2 \\$3
+.\" .	ds A3 \\$4
+.\" .	ds A4 \\$5
+.\" .	ds A5 \\$6
+.\" .	ds A6 \\$7
+.\" .	ds A7 \\$8
+.\" .	ds A8 \\$9
+.\" .	nr fV \\n(.$-1
+.	if "\\$1"-std" \{\
+.	nr cH \\*(cH
+.	if (\\n(cH<2):(\\n(cH>3) .tm Usage: .Rv -std sections 2 and 3 only
+.		br
+\&The
+.Fn \\$2
+\&\\*(rV
+.	\}
+.\}
+..
--- groff-1.18.1.orig/tmac/euc-jp.tmac
+++ groff-1.18.1/tmac/euc-jp.tmac
@@ -0,0 +1,7 @@
+.\" euc-jp.tmac
+.\"
+.cflags 256 ,:;>}
+.cflags 256 、。,.・:;?!)〕]}」』】ぁぃぅぇぉっゃゅょー
+.cflags 256 ァィゥェォッャュョ
+.cflags 512 (〔[{「『【
+.hc ‐
--- groff-1.18.1.orig/contrib/pic2graph/pic2graph.sh
+++ groff-1.18.1/contrib/pic2graph/pic2graph.sh
@@ -44,7 +44,7 @@
 do
     case $1 in
     -unsafe)
-	groffpic_opts="-U"
+	groffpic_opts="-U";;
     -format)
 	format=$2
 	shift;;
@@ -73,7 +73,7 @@
 # 2. Process through eqn and pic to emit troff markup.
 # 3. Process through groff to emit Postscript.
 # 4. Use convert(1) to crop the PostScript and turn it into a bitmap.
-tmp=/usr/tmp/pic2graph-$$
+tmp=/tmp/pic2graph-$$
 trap "rm ${tmp}.*" 0 2 15 
 (echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \
        groff -e -p $groffpic_opts -Tps >${tmp}.ps \
--- groff-1.18.1.orig/contrib/eqn2graph/eqn2graph.sh
+++ groff-1.18.1/contrib/eqn2graph/eqn2graph.sh
@@ -63,7 +63,7 @@
 # 2. Process through eqn(1) to emit troff markup.
 # 3. Process through groff(1) to emit Postscript.
 # 4. Use convert(1) to crop the Postscript and turn it into a bitmap.
-tmp=/usr/tmp/eqn2graph-$$
+tmp=/tmp/eqn2graph-$$
 trap "rm ${tmp}.*" 0 2 15 
 read equation
 (echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \
--- groff-1.18.1.orig/Makefile.in
+++ groff-1.18.1/Makefile.in
@@ -136,7 +136,11 @@
 # directory will be always added.
 # `troffrc' and `troffrc-end' (and `eqnrc') are searched neither in the
 # current nor in the home directory.
+ifeq (,$(extratmacdirs))
 tmacpath=$(systemtmacdir):$(localtmacdir):$(tmacdir)
+else
+tmacpath=$(systemtmacdir):$(localtmacdir):$(tmacdir):$(extratmacdirs)
+endif
 
 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
 sys_tmac_prefix=@sys_tmac_prefix@
@@ -195,6 +199,9 @@
 man7ext=7
 man7dir=$(manroot)/man$(man7ext)
 
+# DVI file format.
+DVIFORMAT=@DVIFORMAT@
+
 # The configure script checks whether all necessary utility programs for
 # grohtml are available -- only then we can build the HTML documentation.
 make_html=@make_html@
@@ -261,6 +268,8 @@
 # -DRETSIGTYPE=int		if signal handlers return int not void	
 # -DIS_EBCDIC_HOST		if the host's encoding is EBCDIC
 # -DPAGEA4			if the the printer's page size is A4
+# -DENABLE_MULTIBYTE		enable multibyte extension
+# -DHAVE_LANGINFO_CODESET	if you have nl_langinfo(CODESET)
 DEFINES=@DEFS@
 
 # Include
@@ -395,7 +404,8 @@
   "PERLPATH=$(PERLPATH)" \
   "SH_SCRIPT_SED_CMD=$(SH_SCRIPT_SED_CMD)" \
   "PURIFY=$(PURIFY)" \
-  "PURIFYCCFLAGS=$(PURIFYCCFLAGS)"
+  "PURIFYCCFLAGS=$(PURIFYCCFLAGS)" \
+  "DVIFORMAT=$(DVIFORMAT)"
 
 SHELL=/bin/sh
 INCDIRS=src/include
@@ -437,8 +447,10 @@
   font/devhtml
 ALLTTYDEVDIRS=\
   font/devascii \
+  font/devascii8 \
   font/devlatin1 \
   font/devutf8 \
+  font/devnippon \
   font/devcp1047
 OTHERDIRS=\
   man \
@@ -483,7 +495,7 @@
 	fi
 
 do=all
-dodirs=$(ALLDIRS) dot
+dodirs=$(DISTDIRS) 
 # Default target for subdir_Makefile
 subdir=src/roff/troff
 
--- groff-1.18.1.orig/aclocal.m4
+++ groff-1.18.1/aclocal.m4
@@ -356,6 +356,19 @@
 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++)]))
 AC_LANG_POP(C++)])dnl
 dnl
+dnl Support Multibyte characters, such as Japanese Code (EUC-JP)
+dnl
+AC_DEFUN(GROFF_MULTIBYTE,
+[AC_MSG_CHECKING([whether to enable multibyte extension])
+AC_ARG_ENABLE(multibyte, [  --enable-multibyte  Enable multibyte extension],
+  multibyte=$enableval, multibyte=no)
+if test "x$multibyte" != "xno"; then
+  AC_DEFINE(ENABLE_MULTIBYTE, 1,
+    [Define if you want to use multibyte extension.])
+fi
+AC_MSG_RESULT([$multibyte])
+])dnl
+dnl
 dnl
 AC_DEFUN(GROFF_TMAC,
 [AC_MSG_CHECKING([for prefix of system macro packages])
@@ -415,6 +428,33 @@
 AC_MSG_RESULT([$tmac_wrap])
 AC_SUBST(tmac_wrap)])dnl
 dnl
+dnl codeset.m4 from gettext, by Bruno Haible.
+dnl
+AC_DEFUN(GROFF_LANGINFO_CODESET,
+[AC_CACHE_CHECK([for nl_langinfo and CODESET], groff_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET);],
+      groff_cv_langinfo_codeset=yes,
+      groff_cv_langinfo_codeset=no)
+    ])
+  if test $groff_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+  fi
+])dnl
+dnl
+dnl
+AC_DEFUN(GROFF_DVIFORMAT,
+[AC_MSG_CHECKING([japanese dvi file format])
+if test "x$dvi_format" != "xASCII"; then
+  DVIFORMAT=NTT
+else
+  DVIFORMAT=ASCII
+fi
+AC_MSG_RESULT([$DVIFORMAT])
+AC_SUBST(DVIFORMAT)
+])dnl
+dnl
 dnl
 AC_DEFUN(GROFF_G,
 [AC_MSG_CHECKING([for existing troff installation])
@@ -481,7 +521,7 @@
  AC_DEFINE(IS_EBCDIC_HOST, 1,
 	   [Define if the host's encoding is EBCDIC.]),
 groff_cv_ebcdic="no"
- TTYDEVDIRS="font/devascii font/devlatin1"
+ TTYDEVDIRS="font/devascii font/devlatin1 font/devascii8 font/devnippon"
  OTHERDEVDIRS="font/devlj4 font/devlbp"
  AC_MSG_RESULT(no))
 AC_SUBST(TTYDEVDIRS)
--- groff-1.18.1.orig/configure
+++ groff-1.18.1/configure
@@ -305,7 +305,7 @@
 # include <unistd.h>
 #endif"
 
-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'
+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'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -841,6 +841,11 @@
 
   cat <<\_ACEOF
 
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-multibyte  Enable multibyte extension
+
 Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
@@ -2530,7 +2535,7 @@
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 groff_cv_ebcdic="no"
- TTYDEVDIRS="font/devascii font/devlatin1"
+ TTYDEVDIRS="font/devascii font/devlatin1 font/devascii8 font/devnippon"
  OTHERDEVDIRS="font/devlj4 font/devlbp"
  echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
@@ -5859,6 +5864,84 @@
 esac
 
 
+echo "$as_me:$LINENO: checking whether to enable multibyte extension" >&5
+echo $ECHO_N "checking whether to enable multibyte extension... $ECHO_C" >&6
+# Check whether --enable-multibyte or --disable-multibyte was given.
+if test "${enable_multibyte+set}" = set; then
+  enableval="$enable_multibyte"
+  multibyte=$enableval
+else
+  multibyte=no
+fi;
+if test "x$multibyte" != "xno"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_MULTIBYTE 1
+_ACEOF
+
+fi
+echo "$as_me:$LINENO: result: $multibyte" >&5
+echo "${ECHO_T}$multibyte" >&6
+
+echo "$as_me:$LINENO: checking japanese dvi file format" >&5
+echo $ECHO_N "checking japanese dvi file format... $ECHO_C" >&6
+if test "x$dvi_format" != "xASCII"; then
+  DVIFORMAT=NTT
+else
+  DVIFORMAT=ASCII
+fi
+echo "$as_me:$LINENO: result: $DVIFORMAT" >&5
+echo "${ECHO_T}$DVIFORMAT" >&6
+
+
+echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
+echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
+if test "${groff_cv_langinfo_codeset+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  groff_cv_langinfo_codeset=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+groff_cv_langinfo_codeset=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $groff_cv_langinfo_codeset" >&5
+echo "${ECHO_T}$groff_cv_langinfo_codeset" >&6
+  if test $groff_cv_langinfo_codeset = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LANGINFO_CODESET 1
+_ACEOF
+
+  fi
+
           ac_config_files="$ac_config_files stamp-h"
 
                               ac_config_files="$ac_config_files Makefile doc/Makefile src/xditview/Imakefile"
@@ -6497,6 +6580,7 @@
 s,@psselect@,$psselect,;t t
 s,@make_html@,$make_html,;t t
 s,@make_install_html@,$make_install_html,;t t
+s,@DVIFORMAT@,$DVIFORMAT,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
 
--- groff-1.18.1.orig/configure.ac
+++ groff-1.18.1/configure.ac
@@ -68,6 +68,9 @@
 GROFF_G
 GROFF_TMAC
 GROFF_HTML_PROGRAMS
+GROFF_MULTIBYTE
+GROFF_DVIFORMAT
+GROFF_LANGINFO_CODESET
 AC_CONFIG_FILES(stamp-h, [echo timestamp > stamp-h])
 AC_CONFIG_FILES([Makefile doc/Makefile src/xditview/Imakefile])
 AC_OUTPUT
--- groff-1.18.1.orig/mdate.sh
+++ groff-1.18.1/mdate.sh
@@ -2,41 +2,4 @@
 
 # Print the modification date of $1 `nicely'.
 
-# Don't want foreign dates.
-
-LANGUAGE=
-LC_ALL=C; export LC_ALL
-
-
-(date;
-if ls -L /dev/null 1>/dev/null 2>&1; then ls -L -l $1; else ls -l $1; fi
-) | awk '
-BEGIN {
-	full["Jan"] = "January"; number["Jan"] = 1;
-	full["Feb"] = "February"; number["Feb"] = 2;
-	full["Mar"] = "March"; number["Mar"] = 3;
-	full["Apr"] = "April"; number["Apr"] = 4;
-	full["May"] = "May"; number["May"] = 5;
-	full["Jun"] = "June"; number["Jun"] = 6;
-	full["Jul"] = "July"; number["Jul"] = 7;
-	full["Aug"] = "August"; number["Aug"] = 8;
-	full["Sep"] = "September"; number["Sep"] = 9;
-	full["Oct"] = "October"; number["Oct"] = 10;
-	full["Nov"] = "November"; number["Nov"] = 11;
-	full["Dec"] = "December"; number["Dec"] = 12;
-}
-
-NR == 1 {
-	month = $2;
-	year = $NF;
-}
-
-NR == 2 {
-	if ($(NF-1) ~ /:/) {
-		if (number[$(NF-3)] > number[month])
-			year--;
-	}
-	else
-		year = $(NF-1);
-	print $(NF-2), full[$(NF-3)], year
-}'
+perl -MPOSIX -le 'print strftime("%d %B %Y", localtime((stat $ARGV[0])[9]))' $1
--- groff-1.18.1.orig/stamp-h
+++ groff-1.18.1/stamp-h
@@ -0,0 +1 @@
+timestamp
--- groff-1.18.1.orig/debian/changelog
+++ groff-1.18.1/debian/changelog
@@ -0,0 +1,939 @@
+groff (1.18.1-15) unstable; urgency=low
+
+  * Create eqn2graph's temporary files in /tmp, not /usr/tmp (thanks, Einar
+    Karttunen; closes: #216819). How did I miss this when doing the same for
+    pic2graph?
+
+ -- Colin Watson <cjwatson@debian.org>  Fri, 23 Jan 2004 11:37:26 +0000
+
+groff (1.18.1-14) unstable; urgency=low
+
+  * Document Unicode hyphen configuration in README.Debian.
+
+ -- Colin Watson <cjwatson@debian.org>  Sat, 15 Nov 2003 17:43:03 +0000
+
+groff (1.18.1-13) unstable; urgency=low
+
+  * Add sample code to /etc/groff/man.local and /etc/groff/mdoc.local to
+    make "-" render as Unicode HYPHEN-MINUS on the utf8 device. This is
+    commented out by default because man pages which require this are buggy:
+    "\-" should be used instead when a real dash as opposed to a logical
+    hyphen is required.
+  * Fix some typos in groff(1) (thanks, G旦ran Weinholt; closes: #181375).
+
+ -- Colin Watson <cjwatson@debian.org>  Thu,  6 Nov 2003 12:52:18 +0000
+
+groff (1.18.1-12) unstable; urgency=low
+
+  * Create pic2graph's temporary files in /tmp, not /usr/tmp (thanks, Alex
+    Withers; closes: #216819).
+
+ -- Colin Watson <cjwatson@debian.org>  Tue, 21 Oct 2003 09:24:37 +0100
+
+groff (1.18.1-11) unstable; urgency=low
+
+  * Never recode input or output for the ascii8 device. It doesn't work in
+    non-trivial locales, since ascii8 isn't supposed to be prepared for
+    input in, say, UTF-8, and the point of ascii8 is to be a trivial hack
+    device for use when you know your input encoding is the same as your
+    output encoding. This makes man(1)'s life easier, and incidentally fixes
+    a problem with iconv replacing certain Polish characters with question
+    marks (closes: #170320).
+  * Revert part of the original attempt at fixing #170320 (in 1.18.1-2),
+    which made ascii8 accept U+0100 to U+0200. This is no longer necessary
+    with the above, and it broke the assumptions in
+    font::get_font_wchar_metric(), causing problems for KOI8-R input.
+  * Stop output devices breaking when given the 'x init' command in an
+    intermediate output file rather than 'x init <encoding>'.
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 14 Sep 2003 16:17:41 +0100
+
+groff (1.18.1-10) unstable; urgency=low
+
+  * Fix wrong devps Japanese font metrics (thanks, Masatoshi Suehiro and
+    Junichi Uekawa; closes: #194016).
+
+ -- Colin Watson <cjwatson@debian.org>  Tue, 19 Aug 2003 02:54:34 +0100
+
+groff (1.18.1-9) unstable; urgency=low
+
+  * Fix segfault in grotty when changing the colour before setting the
+    initial font (closes: #189384).
+
+ -- Colin Watson <cjwatson@debian.org>  Fri, 18 Apr 2003 00:47:43 +0000
+
+groff (1.18.1-8) unstable; urgency=low
+
+  * Make sure that the default input character encoding is always
+    ISO-8859-1, except for the ascii8 device and for Japanese locales. This
+    is required for compatibility with upstream.
+  * Automatically load latin1.tmac when using all terminal devices except
+    ascii, not just the latin1 device.
+
+ -- Colin Watson <cjwatson@debian.org>  Fri, 11 Apr 2003 00:11:40 +0100
+
+groff (1.18.1-7) unstable; urgency=low
+
+  * Use groff's font metric instead of wcwidth()
+    (src/devices/grotty/tty.cc): add cols to tty_font
+  	add_char takes font parameter
+  	tty_printer:add_char calculate hpos by using font metric
+    (src/include/encoing.h src/libs/libgroff/encoding.cc): 
+  	put_wchar returns number of bytes written, not columns.
+  * font metric fixed, X*/M.proto, 
+  * fix sed script in font's Makefile.sub. sed doesn't see + as regex metachar.
+    replace [0-9]+ to [0-9][0-9]*.
+
+ -- Fumitoshi UKAI <ukai@debian.or.jp>  Mon, 24 Feb 2003 10:59:09 +0900
+
+groff (1.18.1-6) unstable; urgency=low
+
+  * Use wcwidth() to find the width of UTF-8 characters. This seems to work
+    well for both en_GB.UTF-8 and ja_JP.UTF-8, so both CJK and non-CJK
+    output should finally be correct (closes: #173764).
+  * Recommend libpaper1 instead of libpaperg.
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 23 Feb 2003 19:33:50 +0000
+
+groff (1.18.1-5) unstable; urgency=low
+
+  * put_wchar() returns number of columns for char
+  * add UTF-8 support for Japanese.
+
+ -- Fumitoshi UKAI <ukai@debian.or.jp>  Fri,  7 Feb 2003 00:32:00 +0900
+
+groff (1.18.1-4) unstable; urgency=low
+
+  * Fix over-zealous backspacing in UTF-8 output (closes: #173764).
+
+ -- Colin Watson <cjwatson@debian.org>  Thu,  6 Feb 2003 01:31:57 +0000
+
+groff (1.18.1-3) unstable; urgency=low
+
+  * Recode this changelog to UTF-8.
+  * Clarify README.Debian to mention the error message you get if you've
+    forgotten to install groff as well as groff-base (see #175585).
+  * Build with g++ 3.2. Drop hppa -fno-strength-reduce hack from 1.17.2-12,
+    which I hope should no longer be required.
+
+ -- Colin Watson <cjwatson@debian.org>  Wed,  8 Jan 2003 03:26:13 +0000
+
+groff (1.18.1-2) unstable; urgency=low
+
+  * Backport upstream patch to fix segfaults in
+    node::add_discretionary_hyphen() observed while building aegis and
+    aegis3 (closes: #173058, #173063).
+  * Fix pic2graph syntax error, thanks to lintian. Patch also sent upstream.
+  * Patch from Fumitoshi UKAI to fix ISO-8859-2 output through devascii8
+    (closes: #170320).
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 15 Dec 2002 14:59:20 +0000
+
+groff (1.18.1-1) unstable; urgency=low
+
+  * New upstream release.
+    - Includes 'Am' string in mdoc from NetBSD (closes: #163195).
+  * Amend debian/copyright to reflect that the papersize fallback patch has
+    been merged upstream.
+  * Actually call the GROFF_LANGINFO_CODESET macro as well as defining it.
+
+  * New multibyte patch from Fumitoshi UKAI, with adjustments by me. Fixes
+    Japanese HTML output, among other things (closes: #149006).
+
+    groff (1.18.1-0.u1) unstable; urgency=low
+
+      * for C or POSIX locale, use ascii8 encoding handler
+      * xditview supports ENABLE_MULTIBYTE (at least Japanese)
+
+     -- Fumitoshi UKAI <ukai@debian.or.jp>  Mon,  4 Nov 2002 02:05:16 +0900
+
+    groff (1.18.1-0.u) unstable; urgency=low
+
+      * New upstream release
+
+     -- Fumitoshi UKAI <ukai@debian.or.jp>  Wed,  9 Oct 2002 02:09:41 +0900
+
+    groff (1.18-6.u2) unstable; urgency=low
+
+      * src/roff/troff/input.cc: fix bug in wchar_charinfo()
+      * src/device/grohtml/post-html.cc: works ENABLE_MULTIBYTE
+      * font/devhtml: add font M, G for Japanese
+      * grohtml works (japanese)
+
+     -- Fumitoshi UKAI <ukai@debian.or.jp>  Mon, 23 Sep 2002 02:56:59 +0900
+
+    groff (1.18-6.u1) unstable; urgency=low
+
+      * new multibyte support patch based on japanese patch
+        - use iconv
+        - add .encoding directive (default encoding is determined from locale)
+        - \[u<code>] supported
+        - font/*/DESC:
+           add fontset
+        - font/*/<font>
+           add u<code>..u<code> range
+        - grotty and grops works (japanese)
+
+     -- Fumitoshi UKAI <ukai@debian.or.jp>  Sun, 22 Sep 2002 04:47:10 +0900
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 10 Nov 2002 23:16:32 +0000
+
+groff (1.18-7) unstable; urgency=low
+
+  * Policy version 3.5.7:
+    - Drop DEB_BUILD_OPTIONS=debug support; compile with -g by default.
+    - Support DEB_BUILD_OPTIONS=noopt.
+  * src/roff/troff/node.cc (bracket_node::copy): Fix a segfault on copying
+    an empty bracket_node, such as '(\bu' (closes: #162595).
+
+ -- Colin Watson <cjwatson@debian.org>  Fri, 27 Sep 2002 16:03:22 +0100
+
+groff (1.18-6) unstable; urgency=low
+
+  * Backport upstream patch to m.tmac for the benefit of gpresent: the VM
+    macro definition was missing a backslash (closes: #160713).
+
+ -- Colin Watson <cjwatson@debian.org>  Fri, 13 Sep 2002 00:54:39 +0100
+
+groff (1.18-5) unstable; urgency=low
+
+  * Document the Debian groff macro path in README.Debian.
+  * Map \- to Unicode HYPHEN-MINUS in UTF-8 mode, for more convenient
+    searching in man pages (closes: #159872).
+
+ -- Colin Watson <cjwatson@debian.org>  Fri,  6 Sep 2002 22:34:21 +0100
+
+groff (1.18-4) unstable; urgency=low
+
+  * Upstream patch to freeze unbreakable spaces, preventing a failed
+    assertion on latin1(7) (closes: #155969).
+  * Install text versions of meintro.ps, meref.ps, and pic.ps. Other
+    documents either aren't very useful in plain text or don't format well
+    (closes: #155226).
+  * Reorder clean target a little.
+
+ -- Colin Watson <cjwatson@debian.org>  Sat, 10 Aug 2002 10:54:54 +0100
+
+groff (1.18-3) unstable; urgency=low
+
+  * src/devices/grohtml/html-table.cc: Initialize another variable properly.
+    This really fixes the segfault during the arm build.
+
+ -- Colin Watson <cjwatson@debian.org>  Wed, 31 Jul 2002 02:52:20 +0100
+
+groff (1.18-2) unstable; urgency=low
+
+  * src/include/encoding.h: Fix broken token-after-#endif syntax.
+  * src/devices/grohtml/post-html.cc: Make sure pointsize is initialized
+    properly. This fixes an infinite loop in the ia64 build, and perhaps arm
+    too.
+
+ -- Colin Watson <cjwatson@debian.org>  Sat, 27 Jul 2002 18:41:46 +0100
+
+groff (1.18-1) unstable; urgency=low
+
+  * New upstream release. Highlights:
+    - Colour support (although see below).
+    - New macro set, mom, mainly for non-scientific writers. The aim of
+      these macros is to make groff accessible for ordinary use with a
+      minimum of convoluted syntax.
+    - 'eu' and 'Eu' characters available for Euro support.
+    - Improved support for TeX hyphenation files.
+    - New means of setting the line length, which now works for -mdoc manual
+      pages as well as -man. Use man-db >= 2.4.0 to take advantage of this.
+    - Documentation of the differences between groff and Unix troff is now
+      in groff_diff(7).
+    - groff_mwww(1) has been renamed to groff_www(1).
+    - groff_ms(7) has been completely rewritten.
+    - New scripts: groffer, pic2graph, and eqn2graph.
+    - Substantial improvements in grohtml (although it's still alpha),
+      including dealing with overstriking properly (closes: #67545).
+
+  * Many thanks, again, to Fumitoshi UKAI for forward-porting the Japanese
+    patch.
+  * Disable the new ANSI colour/bold/underline escapes in nroff mode,
+    because most pagers either fail to cope with it or need special options
+    to do so. It can be re-enabled by editing /etc/groff/man.local and
+    /etc/groff/mdoc.local, or by setting the environment variable GROFF_SGR
+    to something non-empty.
+  * Drop most current /etc/papersize patches, as the 'papersize' DESC
+    keyword is now available upstream. We now only patch the DESC files and
+    extend the papersize keyword to allow falling back to something else if
+    /etc/papersize doesn't exist.
+  * Fix the removal of final newlines when reading /etc/papersize.
+  * Translate the 'oq' character to an apostrophe (0x27) rather than a
+    backquote (0x60) when using devices other than utf8 (closes: #149086).
+
+  * Merge groff-x11 back into groff, since this release doesn't have to
+    worry so much about smooth upgrades from potato (closes: #129835).
+  * Accordingly, remove the debconf note about this, since it was an abuse
+    of debconf anyway. README.Debian describes the package organization.
+  * Include more documentation in the main groff package (closes: #121475).
+  * Build-depend on gs, netpbm, and psutils for HTML documentation. Mention
+    in README.build that people bootstrapping a new port or otherwise
+    building the base system from scratch don't need these three.
+  * Recommend these three packages for the grohtml driver.
+  * Recommend imagemagick for pic2graph and eqn2graph.
+  * Downgrade libpaperg dependency to a recommendation, since we fall back
+    to a4 now if it's not installed.
+  * Use debhelper v3 mode.
+  * Upstream ships pre-built info files now, so use them. You need texinfo
+    (>= 4.2) if you want to regenerate them.
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 21 Jul 2002 18:33:04 +0100
+
+groff (1.17.2-17) unstable; urgency=low
+
+  * Back to unstable, now that there's no concern about disrupting woody.
+    Merge changes from -15.woody.1 (unstable) and -16 (experimental).
+  * Delete excess charset information in M and G font files that also use
+    the fixedkanji directive, after consultation with Fumitoshi UKAI. This
+    saves over 1.6Mb.
+  * Move ps device to base, now that it isn't quite so large. It's needed
+    there because it's the default device (closes: #131410).
+  * Update the descriptions of groff-base and groff for the move of the
+    PostScript device.
+
+ -- Colin Watson <cjwatson@debian.org>  Sat,  4 May 2002 18:03:40 +0100
+
+groff (1.17.2-16) experimental; urgency=low
+
+  * Experimental upload for the benefit of the NetBSD porters.
+  * Document the build-dependency loop with xfree86, and allow people
+    constructing new ports to override this temporarily with
+    DEB_BUILD_OPTIONS=no-groff-x11 (closes: #130312).
+  * Import AM_LANGINFO_CODESET macro from gettext, and use it for
+    --enable-japanese to provide an emulation of nl_langinfo(CODESET) for
+    systems that don't have it (closes: #130356).
+  * Fix build without --enable-japanese.
+  * Build-depend on a version of debhelper which pulls in debconf-utils
+    (closes: #130357).
+  * Test that Makefile.clean doesn't exist before clobbering it in the
+    configure target.
+
+ -- Colin Watson <cjwatson@debian.org>  Tue, 22 Jan 2002 18:34:22 +0000
+
+groff (1.17.2-15.woody.1) unstable; urgency=medium
+
+  * New Danish debconf translation (thanks, Rune B. Broberg;
+    closes: #131092).
+  * New French debconf translation (thanks, Philippe Batailler;
+    closes: #138515).
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 17 Mar 2002 04:11:50 +0000
+
+groff (1.17.2-15) unstable; urgency=high
+
+  * Fix buffer overflow in grn (closes: #129261).
+
+ -- Colin Watson <cjwatson@debian.org>  Tue, 15 Jan 2002 00:22:19 +0000
+
+groff (1.17.2-14) unstable; urgency=low
+
+  * Upstream patch to make .TH respect the line length (closes: #125826).
+
+ -- Colin Watson <cjwatson@debian.org>  Mon, 14 Jan 2002 02:49:45 +0000
+
+groff (1.17.2-13) unstable; urgency=high
+
+  * Fix peekbyte() to return correctly (closes: #122702).
+
+ -- Colin Watson <cjwatson@debian.org>  Thu,  6 Dec 2001 17:15:20 +0000
+
+groff (1.17.2-12) unstable; urgency=high
+
+  * Use -fno-strength-reduce on hppa, as a temporary workaround for a
+    compiler bug.
+  * Display package-split note when reconfiguring (closes: #122420).
+
+ -- Colin Watson <cjwatson@debian.org>  Wed,  5 Dec 2001 17:24:08 +0000
+
+groff (1.17.2-11) unstable; urgency=high
+
+  * Use lpr as the print spooler, even if it happens not to be installed on
+    the build system. This broke 'groff -l' (thanks, Mike Fontenot).
+
+ -- Colin Watson <cjwatson@debian.org>  Fri, 30 Nov 2001 21:41:29 +0000
+
+groff (1.17.2-10) unstable; urgency=high
+
+  * Install lbp.tmac (closes: #121765).
+
+ -- Colin Watson <cjwatson@debian.org>  Thu, 29 Nov 2001 20:28:18 +0000
+
+groff (1.17.2-9) unstable; urgency=low
+
+  * Add Fumitoshi UKAI to Uploaders, in case of emergencies.
+  * Move refer to groff, as this saves over 100K in groff-base and I don't
+    think refer is very useful without additional macro packages.
+  * Document refer in groff's description.
+  * Move ChangeLog.jp and README.jp to groff-base.
+  * Replace createM.c with a Perl implementation to aid cross-compilation
+    (thanks, Fumitoshi UKAI; closes: #114338).
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 14 Oct 2001 04:35:20 +0100
+
+groff (1.17.2-8) unstable; urgency=medium
+
+  * The "Texas Armadillo" release.
+  * Policy version 3.5.6 (support build-arch and build-indep targets).
+  * Reduce size of devnippon fonts, and include devnippon in groff-base
+    (thanks, Fumitoshi UKAI and GOTO Masanori; closes: #112622).
+  * Upstream fix for overzealous warnings from -mm and -ms (closes: #69129).
+  * Fix building in a subdirectory (closes: #111229).
+  * Remove spurious substitutions of '..' for '.' in groff_man(7).
+  * groff depends on libpaperg so that /etc/papersize is always present.
+  * Urgency medium as the above has broken some builds of other packages.
+  * Correct quoted-printable remnant in Brazilian Portugese debconf template
+    (thanks, Andre Luis Lopes; closes: #110192).
+  * New Russian debconf template (thanks, Ilgiz Kalmetev; closes: #112653).
+
+ -- Colin Watson <cjwatson@debian.org>  Wed, 19 Sep 2001 01:34:21 +0100
+
+groff (1.17.2-7) unstable; urgency=low
+
+  * Back with a new GPG key after a disk crash. Thanks for the NMU in the
+    meantime (closes: #107998, #108705).
+  * Document that -E can't suppress messages output to stderr by macro
+    packages using .tm or .tm1 (fix from upstream CVS; closes: #69130).
+  * src/devices/grotty/tty.cc: Correct one instance of putchar() on a
+    potential UTF-8 character to put_char() (thanks, Mike Fabian and Michael
+    Schroeder; closes: #110008).
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 26 Aug 2001 00:15:42 +0100
+
+groff (1.17.2-6.1) unstable; urgency=low
+
+  * Non Maintainer Upload
+  * fix hyphen character problem in EUC-JP encoding
+    (closes: Bug#107998).
+
+ -- Fumitoshi UKAI <ukai@debian.or.jp>  Fri, 17 Aug 2001 02:06:21 +0900
+
+groff (1.17.2-6) unstable; urgency=medium
+
+  * src/devices/grohtml/post-html.cc: Put characters into the right places
+    in the output buffer so that HTML output no longer ends up as gibberish
+    (closes: #107788).
+
+ -- Colin Watson <cjwatson@debian.org>  Wed,  8 Aug 2001 00:33:13 +0100
+
+groff (1.17.2-5) unstable; urgency=high
+
+  * src/preproc/pic/pic.y: Fix format string vulnerability that could allow
+    the -S flag to be disabled (closes: #107459). Patch adapted from one by
+    Zenith Parsec <zen-parse@gmx.net>.
+  * Add a note to README.Debian about where to find documentation.
+
+ -- Colin Watson <cjwatson@debian.org>  Thu,  2 Aug 2001 20:36:18 +0100
+
+groff (1.17.2-4) unstable; urgency=low
+
+  * src/preproc/eqn/text.cc: Initialize wc to the value of the current
+    character even if it isn't a wide character. Otherwise eqn would output
+    nulls instead of normal characters (closes: #106551).
+  * Conflict with jgroff as well as with pre-split versions of ordinary
+    groff, and make references to jgroff versioned to avoid triggering on
+    groff's Provides: field.
+
+ -- Colin Watson <cjwatson@debian.org>  Wed, 25 Jul 2001 22:40:52 +0100
+
+groff (1.17.2-3) unstable; urgency=low
+
+  * Remove spare newline from troffrc, which broke e.g. the ms macros
+    (closes: #105777).
+
+ -- Colin Watson <cjwatson@debian.org>  Thu, 19 Jul 2001 00:07:18 +0100
+
+groff (1.17.2-2) unstable; urgency=medium
+
+  * Urgency medium to get a halfway recent groff into testing for the base
+    system freeze. This version should be a significant improvement for
+    non-ASCII/Latin-1 users.
+
+  * New Japanese patch from Fumitoshi UKAI:
+
+    groff (1.17.2-1.ukai.1) unstable; urgency=low
+
+      * fix tmac/euc-jp.tmac (fix coding-system)
+
+     -- Fumitoshi UKAI <ukai@debian.or.jp>  Sun, 15 Jul 2001 21:14:56 +0900
+
+    groff (1.17.2-1.ukai.0) unstable; urgency=low
+
+      * revised Japanese patch evaluation build
+        - refactoring, cleanups
+          not completed (for example src/xditview)
+
+     -- Fumitoshi UKAI <ukai@debian.or.jp>  Sun, 15 Jul 2001 15:27:59 +0900
+
+    Also added dq and cq characters to the ascii8 and nippon devices.
+
+  * Make groff-base and groff-x11 conflict with pre-split groff
+    (closes: #105276).
+  * Move ascii8 device to groff-base (closes: #105627).
+  * Remove stray + in groff(1) (closes: #105530).
+  * New Brazilian Portugese debconf translation (thanks, Andre Luis Lopes;
+    closes: #105367).
+
+ -- Colin Watson <cjwatson@debian.org>  Tue, 17 Jul 2001 17:58:23 +0100
+
+groff (1.17.2-1) unstable; urgency=low
+
+  * New upstream release. Fixes \s[0] escape (affects non-tty use of mdoc).
+  * debian/rules:
+    - The clean target now cleans the source tree better.
+    - Use version detection from Makefile.in: it's friendlier to syntax
+      highlighting.
+
+ -- Colin Watson <cjwatson@debian.org>  Mon,  9 Jul 2001 03:35:20 +0100
+
+groff (1.17.1-3) unstable; urgency=low
+
+  * New Spanish debconf translation (thanks, Carlos Valdivia Yag端e;
+    closes: #102897).
+
+ -- Colin Watson <cjwatson@debian.org>  Sat, 30 Jun 2001 20:05:18 +0100
+
+groff (1.17.1-2) unstable; urgency=low
+
+  * Conflict with pmake (<< 1.45-7), which had problems with the new
+    location of groff's macros (see #101973).
+
+ -- Colin Watson <cjwatson@debian.org>  Sun, 24 Jun 2001 03:45:43 +0100
+
+groff (1.17.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Of course, the library directory has moved with the new version number.
+    Add a symlink, /usr/share/groff/current, which points to the current
+    library directory; also add a versioned conflicts on troffcvt, which I'm
+    about to fix to cope with this. If you rely on some particular version,
+    use it; if not, use current.
+  * Autogenerate debian/groff-base.files and debian/groff-base.links.
+
+ -- Colin Watson <cjwatson@debian.org>  Sat, 23 Jun 2001 00:54:37 +0100
+
+groff (1.17-4) unstable; urgency=low
+
+  * Back out patch supporting transparent decompression of groff's input
+    stream. Since programs using groff have to support systems where *roff
+    doesn't know how to decompress things, it doesn't really simplify
+    anything else greatly; more importantly, using gzip means that argument
+    parsing didn't always work the way we expected (closes: #75990).
+  * The lj4 and ps drivers already support /etc/papersize due to an earlier
+    Debian patch, and it turns out that lbp supports it upstream but wasn't
+    previously configured to use it. Altered its DESC file to meet libpaper
+    standards (closes: #19681, #19722).
+  * Move the error unwind for groff-base's preinst into its postrm (oops).
+  * New German debconf translation (thanks, Sebastian Feltel;
+    closes: #100681).
+  * Add README.Debian, describing the recent package reorganization.
+  * Update copyright file to describe all upstream-relevant patches.
+
+ -- Colin Watson <cjwatson@debian.org>  Wed, 20 Jun 2001 00:43:45 +0100
+
+groff (1.17-3) unstable; urgency=low
+
+  * Restore /usr/share/groff/tmac to the macro path, as some third-party
+    programs install macros there (should fix #100139, but I'll leave it to
+    the vgrind maintainer to check that groff 1.17 hasn't broken anything
+    else).
+
+ -- Colin Watson <cjwatson@debian.org>  Fri,  8 Jun 2001 19:06:15 +0100
+
+groff (1.17-2) unstable; urgency=low
+
+  * Brown paper bag bug: move grotty to groff-base!
+  * Also move the doc macros to groff-base; some man pages use them. (This
+    and the above bloat -base by some 200K, I'm afraid.)
+  * Mention in the debconf note that groff-base supports Latin-1 and UTF-8
+    as well as ASCII.
+  * /usr/share/groff/site-tmac contains mdoc.local as well as man.local as
+    of 1.17, so make that whole directory a symlink to /etc/groff and
+    migrate the old /etc/tmac.man.local conffile to /etc/groff/man.local.
+    This seems to need some ugly migration code.
+  * Back out the autoconf 2.50 diffs for now, as they were polluting the
+    .diff.gz. I've sent them upstream, though.
+
+ -- Colin Watson <cjwatson@debian.org>  Wed,  6 Jun 2001 17:02:12 +0100
+
+groff (1.17-1) unstable; urgency=low
+
+  * New maintainer (ciao, Fabrizio).
+  * Thanks for the NMUs (closes: #75722, #90765).
+  * New upstream release, with corresponding debian/copyright updates.
+  * Follow upstream's move to versioned subdirectories of /usr/share/groff.
+  * The components of groff required to support normal use of man-db are now
+    in a separate package, groff-base (thanks, Elrond; closes: #53225).
+  * Also split out gxditview and the devices that use it into the groff-x11
+    package. I'd have preferred them to stay part of groff, as discussed on
+    -devel, but the necessary xlibs dependency would mean that everybody
+    dist-upgrading from a potato base system would get the X libraries.
+    Added a debconf note to avoid silent loss of functionality; maybe in
+    woody+1 they can be merged back into groff.
+
+  * New packaging, using debhelper.
+    - This shouldn't generate invalid syntax in the prerm (closes: #86437).
+    - All binaries should be correctly stripped now (closes: #96786).
+  * Add build dependencies (thanks, Daniel Schepler; closes: #80844).
+  * Don't bother running configure in the clean target.
+  * Touch configure in debian/rules to avoid a build-dep on autoconf. This
+    means I have to remember to run the autotools manually every time. Ugh.
+  * Support DEB_BUILD_OPTIONS debug and nostrip.
+  * Mark /etc/X11/app-defaults/GXditview as a conffile.
+  * All this brings us to Standards-Version: 3.5.2.
+
+  * New Japanese patch (version 0.0.2) from Fumitoshi UKAI. This may not be
+    quite right yet; please let me know if there are any problems.
+  * Replace mdate.sh with something whose results are more predictable
+    (thanks, Florian Lohoff; closes: #62554).
+  * Force LC_ALL to C so that makeinfo doesn't insert some localized strings
+    for the package builder's environment (closes: #84370).
+  * s/man/man-db/ in the package description.
+  * Remove an autoconf hack from aclocal.m4; the bug it's working around is
+    now fixed and the hack broke with autoconf 2.50 (closes: #98916).
+  * Set gxditview's fontpath in debian/rules, restoring
+    /usr/local/share/groff/font.
+  * Preserve the Makefile to avoid a large diff.
+  * Back out single-page an.tmac patch; upstream did it more neatly.
+
+ -- Colin Watson <cjwatson@debian.org>  Sat,  2 Jun 2001 20:18:14 +0100
+
+groff (1.16-3.4) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * gcc 3.0 fixes (needed by PARISC port).  fixes #90765.
+
+ -- LaMont Jones <lamont@debian.org>  Wed, 25 Apr 2001 00:19:29 -0600
+
+groff (1.16-3.3) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * fixed font count in font/devdvi/DESC.in as suggested in bug
+    report from John P. Cummings <cummij@rpi.edu>, closes: #75722
+
+ -- Paul Bame <bame@debian.org>  Sat, 24 Feb 2001 17:16:47 -0700
+
+groff (1.16-3.2) unstable; urgency=high
+
+  * Added ascii8 device and fixed bug with (non-latin1&&non-CJK) man-pages 
+    viewing (before this polish, russian etc. manpages couldn't be viewed), 
+    closes: #81148, #71744, #66928, #74535
+
+ -- Peter Novodvorsky <nidd@debian.org>  Sun, 14 Jan 2001 01:09:24 +0300
+
+groff (1.16-3.1) unstable; urgency=low
+
+  * Rebuilt on a system with Xfree 4 and toasted contents of /usr/X11R6/lib,
+    closes: #76813, #77024, #77515, #77608, #77684, #78054, #78905, #79472,
+    #80559
+
+ -- Robert Woodcock <rcw@debian.org>  Thu, 28 Dec 2000 20:51:34 -0800
+  
+groff (1.16-3) unstable; urgency=low
+
+  * oops: had left generated files in the diff.
+  * In new macro checking for gzcat (aclocal.m4), added use of option -f
+    to permit transparent fallback to 'normal' cat.
+  * In src/roff/groff/groff.cc , added gzcat command before soelim; it
+    permits transparent use of zipped or not sources.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sun, 27 Aug 2000 18:13:10 +0300
+
+groff (1.16-2) unstable; urgency=low
+
+  * now going into woody (previous were experimental).
+  * Added check for gzip in configure.in
+  * Applyed correction to patch #64551, thanx to Werner LEMBERG.
+  * Added single final footer to an macro, thanx to Werner LEMBERG;
+    closes: #65735. (waiting for the same for the doc macro)
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Mon,  3 Jul 2000 00:13:23 +0300
+
+groff (1.16-1) experimental; urgency=low
+
+  * Fixed src/roff/nroff.sh, which was too much different from the
+    previous one to apply the dumb patch. 
+    Thanx to Taketoshi Sano for the right patch!
+    (that was exactly the reason for using experimental instead of
+    unstable: uploading something broken and ask for help to fix it,
+    yeah!)
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Fri, 16 Jun 2000 11:33:47 +0300
+
+groff (1.16-0) experimental; urgency=low
+
+  * New upstream release.
+  * Manually applyed all the nippon and ascii8 changes.
+    Failed for: src/roff/nroff.sh, 
+  * Added new info document.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Wed,  7 Jun 2000 19:09:17 +0300
+
+groff (1.15.3-2) unstable; urgency=low
+
+  * Applied patch proposed by Karl M.Hegbloom to get a single page from
+    manpages when in nroff mode.  Closes: #64551.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Thu, 25 May 2000 13:43:18 +0300
+
+groff (1.15.3-1) unstable; urgency=low
+
+  * re-enabled default font in Dvi.c, thanx to Kevin Ryde.
+    closes: #63491, but opens probably some other i18n related bug,
+    sigh.
+  * changed version to 1.15.3 (waiting for 1.16 :-) to be grater than
+    the version in slink and than the one in potato.
+    This means that I must reupload the sources ... which were gone from
+    woody anyway (why it's possible?).
+  * Applyed patch submitted by Tomohiro KUBOTA:
+    * Added a new device type 'ascii8', which is 8 bit clean (like latin1)
+      but does not use Latin-1 character for hyphenation and so on (like
+      ascii).  This device is intended to be used for codesets other than
+      ASCII and ISO-8859-1.  This device should be temporal till all
+      charsets (ISO-8859-*, KOI8-R, EUC-KR, EUC-ZH, TIS620, and so on so on)
+      in the world are implemented, though this is almost impossible.
+    * Added a new character 'sy', which is soft hyphen.  This character is
+      defined only for latin1 device.  This 'sy' is used for hyphenation
+      instead of [char173], because [char173] may not be a soft hyphen,
+      though [char173] is a soft hyphen in ISO-8859-1.
+      Tomohiro KUBOTA <kubota@debian.or.jp>  Wed, 19 Apr 2000 23:47:18 +0900
+    This closes: #62840.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Thu, 11 May 2000 10:44:14 +0300
+
+groff (1.15-3.ja.3) unstable; urgency=low
+
+  * Corrected bug that segfaults when reading manpage printf(1), thanx
+    to David Schmitt who submitted the bug (closes: #60096) and to
+    Fumitoshi UKAI who submitted the patch to fix it. It was the same
+    bug that jgroff had (#59628).
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Mon, 13 Mar 2000 12:50:02 +0200
+
+groff (1.15-3.ja.2) unstable; urgency=low
+
+  * Included changes proposed by Fumitoshi UKAI and Taketoshi Sano.
+  * corrected groff_man manpage which didn't parse correctly for mandb.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Fri, 25 Feb 2000 20:57:40 +0200
+
+groff (1.15-3.ja.1) experimental; urgency=low
+
+  * Added japanes patch for join with jgroff.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sun, 30 Jan 2000 15:36:03 +0200
+
+groff (1.15-3) frozen unstable; urgency=high
+
+  * mm and mse macros were missing (thanx to Daniel Quinlan to make me
+    discover this grave bug); closes: #55428.
+  * corrected wrong .so request in macro mse
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Mon, 17 Jan 2000 15:25:06 +0200
+
+groff (1.15-2) unstable; urgency=low
+
+  * quick fix to a bug reported only mainstream.
+    postscript device fails if paper format is not a4 or letter.
+    Fixed using "letter" for all other formats, as it _was_ before.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Fri, 14 Jan 2000 12:21:38 +0200
+
+groff (1.15-1) unstable; urgency=low
+
+  * new upstream release: only minor bugfixes.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Thu,  6 Jan 2000 18:23:41 +0200
+
+groff (1.12-1) unstable; urgency=low
+
+  * new upstream release.
+    Got all previous changes (except papersize),
+    plus: new HTML device! (expermental).
+  * leaved version numeric only: closes: #31739, thanx to 
+    Jonathan H N Chin <jhnc@pfaff.newton.cam.ac.uk>.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Fri, 17 Dec 1999 14:40:46 +0200
+
+groff (1.11b-1) unstable; urgency=low
+
+  * updated to policy 3.1.0.
+  * new imminent release 1.12; this use groff-current renamed
+    groff-1.11b.  Not to be uploaded until 1.12 is released.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sun, 12 Dec 1999 18:15:26 +0200
+
+groff (1.11a-9) unstable; urgency=low
+
+  * not uploaded due to imminent 1.12
+  * added management of /etc/papersize in driver lj4.
+    todo: the same in driver ps.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sun,  5 Dec 1999 14:26:18 +0200
+
+groff (1.11a-8) unstable; urgency=low
+
+  * moved tmac.local to /etc (as tmac.man.local) and symlinked from the
+    original place; made it a conffile. Thanx to Decklin Foster
+    <decklin@home.com>, closes: #39043
+  * recompiled with libstdc++2.10 . closes: #49392.
+  * added manpages groff_mdoc(7) and groff_mdoc.samples(7) taken from
+    netBSD, thanks to Ben Harris <bjh21@cam.ac.uk>. closes: #49159.
+  * added Y2K corrections from the beta-12, from Paul Eggert.
+  * Got rid of old and unusefull checks in postinst.
+  * added symlink from /usr/doc, and added -e to script; closes: #39410
+  * Bugs fixed in previous releases: closes: #27016, #28097.
+  * Updated to std policy 3.0.1
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Tue, 26 Oct 1999 14:39:10 +0300
+
+groff (1.11a-7) unstable; urgency=low
+
+  * Applied patch to add include path search to groff e gsoelim, provided by 
+    Peter Miller <millerp@canb.auug.org.au> needed by aegis.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sat, 17 Oct 1998 23:45:27 +0300
+
+groff (1.11a-6) unstable; urgency=low
+
+  * Recompiled to generate new dependencies into libs
+    (closes: #27790, thanx to Zephaniah E, Hull.)
+    [Previous attempt wasn't succesful.]
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sat, 17 Oct 1998 02:39:10 +0300
+
+groff (1.11a-5) unstable; urgency=low
+
+  * Recompiled to generate new dependencies into libs
+    (closes: #27790, thanx to Zephaniah E, Hull.)
+  * added mime file as suggested by Brian White 
+    (closes: #27016)
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Tue, 13 Oct 1998 18:54:55 +0300
+
+groff (1.11a-4) unstable; urgency=low
+
+  * Added groff_man(7) manpage for tmac.an macro written by Susan Kleinmann.
+  * Added patch from Andy Dougherty to let groff pass the -U flag along to
+    troff. (closes: #20628)
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sat,  4 Apr 1998 23:46:42 +0300
+
+groff (1.11a-2) unstable; urgency=low
+
+  * groff (1.11a-2) unstable; urgency=low
+  * groff (1.11a-0bo2) bo-unstable; urgency=low
+
+  * (lintian): added a symlink for neqn manpage.
+  * (lintian): changed mode of manpage gxditview.1x to 644.
+  * (lintian): changed mode of app-defaults/GXditview to 644.
+  * (lintian): updated the debian/copyright file (previously
+    debian/README), to point to the actual postal address of the FSF,
+    even if the sources in the distribution, including the COPYING file)
+    still point tro the old file (this should be reported as a bug to
+    upstream :-) .  Now it says:
+        A copy of the GNU General Public License is available in
+        /usr/doc/copyright/GPL (as installed by package base-files);
+        if not, write to the Free Software Foundation, Inc.,
+        59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+  * commented creation of ctags file in debian/rules (closes: #15825,
+    #16006).
+  * checked correct build of fontpath (closes: #16007).
+  * added gzipping of X11 manpage (closes: #17455), tx to David ROCHER.
+  * reverted security changes done in 1.10-3.5 due to added use of safer
+    macro.  Added -U flag to nroff/troff/groff/pic to revert to old
+    unsecure behaviour:
+    - nroff script defaults calling groff -S
+    - troff defaults as called with -msafer
+    - groff defaults as called with -S
+    - pic defaults as called with -S
+    Updated manpages nroff(1), groff(1), troff(1), pic(1) for the -U option.
+  * changed reference to me and msafer manpages in groff(1), to reflect
+    the change in their names (done in 1.10-3.5 and 1.10-5).
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sun, 15 Feb 1998 13:09:27 +0200
+
+groff (1.11a-1) unstable; urgency=low
+
+  * changed Standards Version to 2.3.0.1
+  * corrected names of copyright and chnagelog files.
+  * added full copyright from MIT (for gzditview).
+  * avoid gzipping of copyright file (oops!)
+  * new upstream version 1.11a (fixes #12130) including:
+    - new document for pic.
+    - changes to groff manpage.
+  * full libc6 version (fixes #14592) Since there aren't changes to
+     code, there's no need for a libc5 version.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Mon, 17 Nov 1997 11:00:21 +0200
+
+groff (1.10-3.5) stable; urgency=high
+
+  * Compiled under debian-1.3.1 (libc5) as a security bugfix; used
+     version number 3.5 (instead of 5) to avoid downgrading for hamm.
+  * Avoided execution of arbitrary code embedded in documents;
+     added warning WARN_SECURITY, enabled by default, to warn about .sy
+     directives, but not yet documented in manpage. Warning mode enabled
+     by default via ifdef, should be toggled by option flag. (need
+     coordination with upstream maintainer.)
+  * Applied patch from Brian Mays <bem5r@virginia.edu> to pic/tex.cc to
+     cast a long double value to double (fixes #13788)
+  * Changed name of manpages me and msafer to groff_me and groff_msafer.
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Wed, 15 Oct 1997 23:15:08 +0300
+
+groff (1.10-4) unstable; urgency=low
+
+  * libc6 version
+  * added explicit link to libc to let ld.so find libc dependencies.
+  * added dinamic dependence as Suggest for gxditview.
+  * forced configure to use /usr/bin/perl (fixes bug#11149 and #13239)
+  * added debian version number to option -v
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Sun, 28 Sep 1997 09:09:22 +0300
+
+groff (1.10-3) frozen unstable; urgency=low
+
+  * Applied changes to avoid problem with bash-2 (bug#8755)
+  * Added gxditview notice in file copyright.debian
+  * Compiled to supply gxditview, to let groff -X and man -X work.
+     (changed font path in device.c)
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Wed, 16 Apr 1997 22:50:58 +0300
+
+groff (1.10-2) frozen unstable; urgency=low
+
+    * corrected shlibs.local for libstd++ depenedency (fixes #5401)
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Thu, 14 Nov 1996 08:39:25 +0200
+
+groff (1.10-1) frozen; urgency=low
+
+    * new maintainer: Fabrizio Polacco <fpolacco@debian.org>
+    * changed description in control file (fixes bug #4013 part 2)
+    * new upstream sources 1.10 (fixes bug #4013 part 1)
+    * added symlinks for geqn, gpic, gtbl (bug #4754)
+    * compressed manpages.
+    * Updated to Standards-Version 2.1.1.0
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Fri, 8 Nov 1996 13:50:09 +0200
+
+groff (1.09-12) frozen; urgency=low
+
+    * this version was never uploaded
+    * new maintainer: Fabrizio Polacco <fpolacco@debian.org>
+    * built using original upstream sources 1.09 + patch 1.09-11
+    * Updated to Standards-Version 2.1.1.0
+
+ -- Fabrizio Polacco <fpolacco@debian.org>  Wed, 6 Nov 1996 15:15:10 +0200
+
+Changes:
+ 2-Jul-1995 Alvar Bray <alvar@meiko.co.uk>
+	Set permissions of /usr/doc/groff dir in post install script.
+	Previous versions of this package may have got these wrong and
+	replacing the package will not fix them.
+ 5-Mar-1995 Bruce Perens <Bruce@Pixar.com>
+	Added Debian GNU/Linux package maintenance system files.
+
--- groff-1.18.1.orig/debian/control
+++ groff-1.18.1/debian/control
@@ -0,0 +1,68 @@
+Source: groff
+Section: text
+Priority: important
+Maintainer: Colin Watson <cjwatson@debian.org>
+Uploaders: Fumitoshi UKAI <ukai@debian.or.jp>
+Standards-Version: 3.5.7
+Build-Depends: byacc, debhelper (>= 3.0.9), gs, netpbm, psutils, xutils, libxaw7-dev | libxaw-dev, xlibs-dev
+
+Package: groff-base
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: groff
+Replaces: groff (<< 1.17.2-17), jgroff (<< 1.17-1)
+Conflicts: groff (<< 1.17-1), jgroff (<< 1.17-1), pmake (<< 1.45-7), troffcvt (<< 1.04-14)
+Description: GNU troff text-formatting system (base system components)
+ This package contains the traditional UN*X text formatting tools
+ troff, nroff, tbl, eqn, and pic. These utilities, together with the
+ man-db package, are essential for displaying the on-line manual pages. 
+ .
+ groff-base is a stripped-down package containing the necessary components
+ to read manual pages in ASCII, Latin-1, and UTF-8, plus the PostScript
+ device (groff's default). Users who want a full groff installation, with
+ the standard set of devices, fonts, macros, and documentation, should
+ install the groff package.
+
+Package: groff
+Priority: optional
+Architecture: any
+Depends: groff-base (= ${Source-Version}), ${shlibs:Depends}
+Recommends: gs, imagemagick, libpaper1, netpbm, psutils
+Provides: jgroff, groff-x11
+Conflicts: jgroff (<< 1.17-1), groff-x11 (<< 1.18-1)
+Replaces: jgroff (<< 1.17-1), groff-base (<< 1.17.2-9), groff-x11 (<< 1.18-1)
+Description: GNU troff text-formatting system
+ This package contains optional components of the GNU troff text-formatting
+ system. The core package, groff-base, contains the traditional tools like
+ troff, nroff, tbl, eqn, and pic. This package contains additional devices
+ and drivers for output to DVI, HTML (when the recommended packages gs,
+ netpbm, and psutils are installed), HP LaserJet printers, and Canon CAPSL
+ LBP-4 and LBP-8 printers.
+ .
+ The X75, X75-12, X100, and X100-12 devices, which allow groff output to be
+ conveniently viewed on an X display using the standard X11 fonts, are now
+ included here. They were previously in a separate package, groff-x11.
+ .
+ Besides these, the groff package contains man pages describing the language
+ and its macro sets, info documentation, and a number of supplementary
+ programs:
+ .
+  - gxditview, which is used to display the output of the X* devices, and
+    can also be used to view PostScript output from groff;
+  - grn, a preprocessor for pictures in the 'gremlin' format;
+  - tfmtodit, which creates font files for use with 'groff -Tdvi';
+  - hpftodit, which creates font files for use with 'groff -Tlj4';
+  - afmtodit, which creates font files for use with 'groff -Tps';
+  - refer, which preprocesses bibliographic references for use with groff;
+  - indxbib, which creates inverted indices for bibliographic databases used
+    by 'refer';
+  - lkbib and lookbib, which search bibliographic databases;
+  - addftinfo, which adds metric information to troff font files for use
+    with groff;
+  - pfbtops, which translates a PostScript font in .pfb format to ASCII for
+    use with groff;
+  - mmroff, a simple groff preprocessor which expands references in mm;
+  - pic2graph, which converts PIC diagrams into cropped image files;
+  - eqn2graph, which converts EQN equations into cropped image files.
+ .
+ All the standard macro packages are supported.
--- groff-1.18.1.orig/debian/mandoc.local
+++ groff-1.18.1/debian/mandoc.local
@@ -0,0 +1,24 @@
+.
+.if n \{\
+.  \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other
+.  \" than utf8.
+.  if !'\*[.T]'utf8' \
+.    tr \[oq]'
+.
+.  \" Debian: Disable the use of SGR (ANSI colour) escape sequences by
+.  \" grotty.
+.  if '\V[GROFF_SGR]'' \
+.    output x X tty: sgr 0
+.
+.  \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make
+.  \" searching in man pages easier.
+.  if '\*[.T]'utf8' \
+.    char \- \N'45'
+.
+.  \" Many UTF-8 man pages use "-" instead of "\-" for dashes such as those
+.  \" in command-line options. This is a bug in those pages, but if you want
+.  \" all hyphens to be rendered as the ASCII-compatible HYPHEN-MINUS
+.  \" anyway, then uncomment this.
+.  \" if '\*[.T]'utf8' \
+.  \"   char - \N'45'
+.\}
--- groff-1.18.1.orig/debian/rules
+++ groff-1.18.1/debian/rules
@@ -0,0 +1,179 @@
+#! /usr/bin/make -f
+#
+# rules to debianize groff
+
+export DH_COMPAT=3
+export DH_OPTIONS
+
+CC  = gcc
+CXX = g++
+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS = -O2 -g -Wall
+else
+CFLAGS = -g -Wall
+endif
+
+# From Makefile.in
+version  = $(shell cat VERSION)
+revision = $(shell sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' REVISION)
+upstream = $(version)$(revision)
+datadir  = usr/share/groff/$(upstream)
+
+fontpath := /$(datadir)/font:/usr/local/share/groff/font
+fontpath := $(fontpath):/usr/local/lib/font:/usr/lib/font
+
+gbtmp = debian/groff-base
+gtmp  = debian/groff
+
+devbase = ascii ascii8 latin1 nippon ps utf8
+devx11  = X100 X100-12 X75 X75-12
+
+ifeq (,$(findstring no-groff-x11,$(DEB_BUILD_OPTIONS)))
+GROFF_X11 := yes
+else
+GROFF_X11 := no
+endif
+
+ifeq ($(GROFF_X11),yes)
+BUILD_TARGETS  := build-groff build-groff-x11
+else
+BUILD_TARGETS  := build-groff
+endif
+BINARY_TARGETS := binary-groff-base binary-groff
+DH_EXCLUDE     := -Ngroff-x11
+
+configure: configure-stamp
+configure-stamp:
+	if [ ! -f Makefile.clean ]; then cp -p Makefile Makefile.clean; fi
+	-rm -f config.log config.cache
+	CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)" \
+		PSPRINT=lpr PAGE=A4 \
+		./configure --prefix=/usr --mandir=\$${prefix}/share/man \
+			    --infodir=\$${prefix}/share/info --enable-multibyte
+	touch $@
+
+src/xditview/Makefile: configure
+	cd src/xditview && xmkmf
+
+build-arch: $(BUILD_TARGETS)
+build-indep:
+build: build-arch build-indep
+
+build-groff: configure
+	dh_testdir
+	touch configure		# avoid autoconf build-dependency
+	$(MAKE) extratmacdirs=/usr/share/groff/tmac
+	GROFF_NO_SGR=1 $(MAKE) -C doc meintro.txt meref.txt pic.txt
+	touch $@
+
+ifeq ($(GROFF_X11),yes)
+build-groff-x11: src/xditview/Makefile
+	dh_testdir
+	touch configure		# avoid autoconf build-dependency
+	$(MAKE) -C src/xditview depend
+	$(MAKE) -C src/xditview FONTPATH=$(fontpath)
+	touch $@
+endif
+
+clean:
+	dh_testdir
+	dh_testroot
+	touch configure		# avoid autoconf build-dependency
+	rm -f man/index.* 
+	find . -name tags | xargs -r rm -f
+	find . -name '*.cc.combine' | xargs -r rm -f
+	-$(MAKE) -C doc -i extraclean
+	-$(MAKE) -C src/xditview extraclean
+	-$(MAKE) -i realclean extraclean
+	rm -f src/xditview/Imakefile src/xditview/Makefile
+	dh_clean configure-stamp build-stamp
+	rm -f debian/groff-base.files debian/groff-base.links
+	rm -f config.log config.cache config.status
+	if [ -f Makefile.clean ]; then mv -f Makefile.clean Makefile; fi
+
+%: %.in
+	sed -e 's/@VERSION@/$(upstream)/g' $< > $@
+
+install: DH_OPTIONS=
+install: build debian/groff-base.files
+	dh_testdir
+	dh_testroot
+	dh_clean -k -a
+	dh_installdirs -a
+	$(MAKE) install prefix=$(CURDIR)/$(gtmp)/usr \
+			docdir=$(CURDIR)/$(gtmp)/usr/share/doc/groff-base \
+			INSTALL_INFO=:
+	dh_movefiles -pgroff-base --sourcedir=debian/groff
+	dh_installdirs -pgroff-base $(datadir)/font
+	set -e; for x in $(devbase); do \
+		mv $(gtmp)/$(datadir)/font/dev$$x $(gbtmp)/$(datadir)/font/; \
+	done
+ifeq ($(GROFF_X11),yes)
+	$(MAKE) -C src/xditview install install.man DESTDIR=$(CURDIR)/$(gtmp)
+else
+	set -e; for x in $(devx11); do \
+		rm -rf $(gtmp)/$(datadir)/font/dev$$x; \
+	done
+endif
+
+binary-indep:
+
+binary-groff-base: DH_OPTIONS=-pgroff-base
+binary-groff-base: install debian/groff-base.links
+	dh_testdir
+	dh_testroot
+	# Conffiles should go in /etc
+	mv $(gbtmp)/usr/share/groff/site-tmac $(gbtmp)/etc/groff
+	# Debian additions to *.local
+	cat debian/mandoc.local >> $(gbtmp)/etc/groff/man.local
+	cat debian/mandoc.local >> $(gbtmp)/etc/groff/mdoc.local
+	# Scripts should be executable
+	chmod +x $(gbtmp)/$(datadir)/font/devps/generate/afmname \
+		 $(gbtmp)/$(datadir)/font/devps/generate/symbol.sed
+	dh_installdocs
+	dh_installmime
+	dh_installchangelogs ChangeLog
+	dh_link
+
+binary-groff: DH_OPTIONS=-pgroff
+binary-groff: install
+	dh_testdir
+	dh_testroot
+	# Scripts should be executable
+	chmod +x $(gtmp)/$(datadir)/font/devdvi/generate/CompileFonts
+	# Now in groff-base
+	rmdir $(gtmp)/usr/lib/groff/site-tmac   || true
+	rmdir $(gtmp)/usr/share/groff/site-tmac || true
+	# 'make install' creates this directory when installing documentation.
+	dh_link usr/share/doc/groff-base usr/share/doc/groff
+	dh_installdocs -Xcopyright
+ifeq ($(GROFF_X11),yes)
+	install -m644 src/xditview/ChangeLog \
+		      $(gtmp)/usr/share/doc/groff/ChangeLog.gxditview
+endif
+	dh_installinfo doc/groff doc/groff-[0-9]*
+	dh_link
+
+binary-arch: DH_OPTIONS=-a $(DH_EXCLUDE)
+binary-arch: $(BINARY_TARGETS)
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+ifneq ($(GROFF_X11),yes)
+	@echo
+	@echo "=========================================================="
+	@echo "WARNING! groff has been built without X support."
+	@echo "Please do not upload these packages to the Debian archive!"
+	@echo "=========================================================="
+	@echo
+endif
+
+binary: binary-indep binary-arch
+
+.PHONY: configure build build-arch build-indep clean install
+.PHONY: binary binary-arch binary-indep binary-groff-base binary-groff
--- groff-1.18.1.orig/debian/README.build
+++ groff-1.18.1/debian/README.build
@@ -0,0 +1,20 @@
+Debian groff build process
+--------------------------
+
+People starting new ports of Debian should be aware that there is a circular
+build-dependency between the groff and xfree86 source packages. Fortunately,
+in both cases this is in order to build optional components: xfree86 needs
+groff to build some of its documentation, and groff needs xfree86 to build
+the gxditview display program.
+
+To build groff without xfree86 installed, set the DEB_BUILD_OPTIONS
+environment variable to include the string "no-groff-x11". Please do not
+upload packages to the Debian archive that have been built in this way.
+
+The gs, netpbm, and psutils build-dependencies need not be satisfied while
+bootstrapping. They are only necessary to build HTML documentation.
+
+Once a new port has been fully bootstrapped, there should be no problems
+building groff routinely as with any other package.
+
+ -- Colin Watson <cjwatson@debian.org>  Tue, 22 Jan 2002 14:18:58 +0000
--- groff-1.18.1.orig/debian/copyright
+++ groff-1.18.1/debian/copyright
@@ -0,0 +1,86 @@
+This is the Debian GNU/Linux prepackaged version of the GNU groff
+document formatting system. 
+GNU groff was written by James Clark <jjc@jclark.com>.  
+It is now maintained by Ted Harding <ted.harding@nessie.mcc.ac.uk> and
+Werner Lemberg <wl@gnu.org>.
+
+This Debian package was previously maintained by Fabrizio Polacco
+<fpolacco@debian.org>.
+It is now maintained by Colin Watson <cjwatson@debian.org>.
+
+The original tarball came from <URL:ftp://groff.ffii.org/pub/groff/>:
+  4c7a1b478d230696f14743772f31639f  groff-1.18.1.tar.gz
+and was simply renamed to groff_1.18.1.orig.tar.gz.
+
+Some patches have been applied to groff outside the debian directory. The
+most visible of these is a patch for Japanese support (contributed by
+Fumitoshi UKAI and others in the jgroff team), which adds the ascii8 and
+nippon devices and a number of font files. This has been discussed on the
+upstream mailing list, and the opinion there was that multi-byte language
+support would be better implemented using preprocessors and a UTF-8 core.
+However, at the time of writing, there are no known problems caused by this
+patch, and until a more complete solution is implemented upstream this
+provides a useful service to Japanese users of Debian.
+
+The Debian diff also appends /usr/share/groff/tmac to the default macro path
+for compatibility with versions of groff earlier than 1.17 (patch by Colin
+Watson).
+
+=========================================================================
+
+Copyright (C) 1989-2000 Free Software Foundation, Inc.
+     Written by James Clark (jjc@jclark.com)
+
+This file is part of groff.
+
+groff is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+groff is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License along
+with groff; see the file COPYING.  If not, write to the Free Software
+Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+On Debian systems, a copy of the GNU General Public License is available
+in /usr/share/common-licenses/GPL as part of the base-files package.
+
+=========================================================================
+
+Included in this release are implementations of troff, pic, eqn, tbl,
+grn, refer, -man, -mdoc, and -ms macros, and drivers for PostScript, TeX
+dvi format, HP LaserJet 4 printers, Canon CAPSL printers, HTML format
+(still alpha), and typewriter-like devices.  Also included is a modified
+version of the Berkeley -me macros, an enhanced version of the X11
+xditview previewer, and an implementation of the -mm macros contributed
+by Joergen Haegg (jh@axis.se).
+
+xditview is copyrighted by MIT under the usual X terms.
+
+/*
+ * Copyright 1991 Massachusetts Institute of Technology
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of M.I.T. not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  M.I.T. makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ *
+ * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
+ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
--- groff-1.18.1.orig/debian/groff.dirs
+++ groff-1.18.1/debian/groff.dirs
@@ -0,0 +1 @@
+usr
--- groff-1.18.1.orig/debian/groff.postinst
+++ groff-1.18.1/debian/groff.postinst
@@ -0,0 +1,17 @@
+#! /bin/sh -e
+
+[ "$1" = configure ] || exit 0
+
+if dpkg --compare-versions "$2" lt-nl 1.17-1; then
+    # dpkg won't replace the directory /usr/share/doc/groff with a symlink,
+    # so do that now.
+    if [ ! -L /usr/share/doc/groff -a -d /usr/share/doc/groff ]; then
+	if rmdir /usr/share/doc/groff 2>/dev/null; then
+	    ln -sf groff-base /usr/share/doc/groff
+	fi
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0
--- groff-1.18.1.orig/debian/groff-base.dirs
+++ groff-1.18.1/debian/groff-base.dirs
@@ -0,0 +1,2 @@
+etc
+usr/lib/groff/site-tmac
--- groff-1.18.1.orig/debian/groff.links
+++ groff-1.18.1/debian/groff.links
@@ -0,0 +1,2 @@
+usr/share/man/man1/grohtml.1.gz usr/share/man/man1/post-grohtml.1.gz
+usr/share/man/man1/grohtml.1.gz usr/share/man/man1/pre-grohtml.1.gz
--- groff-1.18.1.orig/debian/groff-base.files.in
+++ groff-1.18.1/debian/groff-base.files.in
@@ -0,0 +1,50 @@
+usr/bin/eqn
+usr/bin/groff
+usr/bin/grog
+usr/bin/grops
+usr/bin/grotty
+usr/bin/neqn
+usr/bin/nroff
+usr/bin/pic
+usr/bin/soelim
+usr/bin/tbl
+usr/bin/troff
+usr/share/man/man1/eqn.1
+usr/share/man/man1/groff.1
+usr/share/man/man1/grog.1
+usr/share/man/man1/grops.1
+usr/share/man/man1/grotty.1
+usr/share/man/man1/neqn.1
+usr/share/man/man1/nroff.1
+usr/share/man/man1/pic.1
+usr/share/man/man1/soelim.1
+usr/share/man/man1/tbl.1
+usr/share/man/man1/troff.1
+usr/share/groff/@VERSION@/eign
+usr/share/groff/@VERSION@/tmac/an-old.tmac
+usr/share/groff/@VERSION@/tmac/an.tmac
+usr/share/groff/@VERSION@/tmac/andoc.tmac
+usr/share/groff/@VERSION@/tmac/doc.tmac
+usr/share/groff/@VERSION@/tmac/doc-old.tmac
+usr/share/groff/@VERSION@/tmac/eqnrc
+usr/share/groff/@VERSION@/tmac/euc-jp.tmac
+usr/share/groff/@VERSION@/tmac/hyphen.us
+usr/share/groff/@VERSION@/tmac/latin1.tmac
+usr/share/groff/@VERSION@/tmac/man.tmac
+usr/share/groff/@VERSION@/tmac/mandoc.tmac
+usr/share/groff/@VERSION@/tmac/mdoc.tmac
+usr/share/groff/@VERSION@/tmac/mdoc/doc-common
+usr/share/groff/@VERSION@/tmac/mdoc/doc-ditroff
+usr/share/groff/@VERSION@/tmac/mdoc/doc-nroff
+usr/share/groff/@VERSION@/tmac/mdoc/doc-syms
+usr/share/groff/@VERSION@/tmac/pic.tmac
+usr/share/groff/@VERSION@/tmac/ps.tmac
+usr/share/groff/@VERSION@/tmac/psatk.tmac
+usr/share/groff/@VERSION@/tmac/psold.tmac
+usr/share/groff/@VERSION@/tmac/pspic.tmac
+usr/share/groff/@VERSION@/tmac/safer.tmac
+usr/share/groff/@VERSION@/tmac/troffrc
+usr/share/groff/@VERSION@/tmac/troffrc-end
+usr/share/groff/@VERSION@/tmac/tty-char.tmac
+usr/share/groff/@VERSION@/tmac/tty.tmac
+usr/share/groff/site-tmac
--- groff-1.18.1.orig/debian/groff-base.docs
+++ groff-1.18.1/debian/groff-base.docs
@@ -0,0 +1,9 @@
+BUG-REPORT
+ChangeLog.jp
+MORE.STUFF
+NEWS
+PROBLEMS
+PROJECTS
+README
+README.jp
+TODO
--- groff-1.18.1.orig/debian/groff-base.mime
+++ groff-1.18.1/debian/groff-base.mime
@@ -0,0 +1 @@
+application/x-troff-man; /usr/bin/nroff -mandoc -Tlatin1; copiousoutput; print=/usr/bin/nroff -mandoc -Tlatin1 | print text/plain:-
--- groff-1.18.1.orig/debian/README.Debian
+++ groff-1.18.1/debian/README.Debian
@@ -0,0 +1,53 @@
+groff for Debian
+----------------
+
+As of version 1.17-1, Debian groff was split into three packages:
+groff-base, groff, and groff-x11. At version 1.18-1 the groff-x11 package
+was merged back into groff. The current organization is as follows:
+
+  groff-base - a stripped-down groff package containing the components
+               required to read man pages in ASCII, Latin-1, UTF-8, and
+               PostScript
+  groff      - all other components
+
+If you only need groff in order to read man pages in common formats, you can
+remove the main groff package and save some disk space. For more
+information, please see 'dpkg --print-avail <package>' or 'apt-cache show
+<package>'.
+
+If you see error messages like "groff: can't find `DESC' file", make sure
+that you have the groff package installed as well as groff-base, as this
+message indicates that the requested output device is not installed.
+
+Where is the groff documentation? It's not easy to find when you're
+unfamiliar with the system (as I well remember). The 'SEE ALSO' section of
+the roff(7) man page has a good index.
+
+The macro path in Debian groff is as follows:
+
+  /usr/lib/groff/site-tmac
+    - old directory for compatibility purposes
+  /usr/share/groff/site-tmac (symlink to /etc/groff)
+    - local macro configuration, such as man.local
+  /usr/share/groff/<version>/tmac
+    - macros installed as part of groff
+  /usr/share/groff/tmac
+    - macros installed by other Debian packages
+
+If you're using a UTF-8 locale and are having problems searching for dashes
+in man pages such as those in command-line options, this may be because the
+man page uses "-" rather than "\-" to represent them, so they get rendered
+as a Unicode hyphen which isn't the one you can type conveniently on your
+keyboard. These man pages should be fixed. However, you can make groff use a
+plain ASCII dash in this case by editing both /etc/groff/man.local and
+/etc/groff/mdoc.local and uncommenting the final request, so that it looks
+like this:
+
+.  \" Many UTF-8 man pages use "-" instead of "\-" for dashes such as those
+.  \" in command-line options. This is a bug in those pages, but if you want
+.  \" all hyphens to be rendered as the ASCII-compatible HYPHEN-MINUS
+.  \" anyway, then uncomment this.
+.  if '\*[.T]'utf8' \
+.    char - \N'45'
+
+ -- Colin Watson <cjwatson@debian.org>  Sat, 15 Nov 2003 17:42:38 +0000
--- groff-1.18.1.orig/debian/groff-base.preinst
+++ groff-1.18.1/debian/groff-base.preinst
@@ -0,0 +1,30 @@
+#! /bin/sh -e
+
+case $1 in
+    install|upgrade)
+	if dpkg --compare-versions "$2" lt 1.17-2; then
+	    if [ -d /usr/share/groff/site-tmac ]; then
+		if [ -d /etc/groff ]; then
+		    # Erm. This shouldn't happen.
+		    echo "Moving /usr/share/groff/site-tmac out of the way."
+		    mv -f /usr/share/groff/site-tmac \
+			  /usr/share/groff/site-tmac.old
+		else
+		    echo "Moving /usr/share/groff/site-tmac to /etc/groff."
+		    mv -f /usr/share/groff/site-tmac /etc/groff
+		    touch /usr/share/groff/site-tmac.moved-by-preinst
+		fi
+	    fi
+	    if [ -e /etc/tmac.man.local ]; then
+		echo "Moving /etc/tmac.man.local to /etc/groff/man.local."
+		mkdir -p /etc/groff
+		mv -f /etc/tmac.man.local /etc/groff/man.local
+		touch /etc/tmac.man.local.moved-by-preinst
+	    fi
+	fi
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- groff-1.18.1.orig/debian/groff-base.postinst
+++ groff-1.18.1/debian/groff-base.postinst
@@ -0,0 +1,16 @@
+#! /bin/sh -e
+
+case $1 in
+    configure)
+	if [ -e /etc/tmac.man.local.moved-by-preinst ]; then
+	    rm -f /etc/tmac.man.local.moved-by-preinst
+	fi
+	if [ -e /usr/share/groff/site-tmac.moved-by-preinst ]; then
+	    rm -f /usr/share/groff/site-tmac.moved-by-preinst
+	fi
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- groff-1.18.1.orig/debian/groff-base.postrm
+++ groff-1.18.1/debian/groff-base.postrm
@@ -0,0 +1,21 @@
+#! /bin/sh -e
+
+case $1 in
+    abort-install|abort-upgrade)
+	if [ -e /etc/tmac.man.local.moved-by-preinst ]; then
+	    mv -f /etc/groff/man.local /etc/tmac.man.local
+	    rm -f /etc/tmac.man.local.moved-by-preinst
+	fi
+	if [ -e /usr/share/groff/site-tmac.moved-by-preinst ]; then
+	    mv -f /etc/groff /usr/share/groff/site-tmac
+	    rm -f /usr/share/groff/site-tmac.moved-by-preinst
+	fi
+	if [ -d /usr/share/groff/site-tmac.old ]; then
+	    mv -f /usr/share/groff/site-tmac.old /usr/share/groff/site-tmac
+	fi
+	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- groff-1.18.1.orig/debian/groff-base.links.in
+++ groff-1.18.1/debian/groff-base.links.in
@@ -0,0 +1,8 @@
+etc/groff usr/share/groff/site-tmac
+usr/bin/eqn usr/bin/geqn
+usr/bin/tbl usr/bin/gtbl
+usr/bin/pic usr/bin/gpic
+usr/share/groff/@VERSION@ usr/share/groff/current
+usr/share/man/man1/eqn.1.gz usr/share/man/man1/geqn.1.gz
+usr/share/man/man1/tbl.1.gz usr/share/man/man1/gtbl.1.gz
+usr/share/man/man1/pic.1.gz usr/share/man/man1/gpic.1.gz
--- groff-1.18.1.orig/debian/groff.docs
+++ groff-1.18.1/debian/groff.docs
@@ -0,0 +1,3 @@
+doc/meintro.txt
+doc/meref.txt
+doc/pic.txt
--- groff-1.18.1.orig/ChangeLog.jp
+++ groff-1.18.1/ChangeLog.jp
@@ -0,0 +1,345 @@
+2002-11-04  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* src/libs/libgroff/encoding.cc: for C or POSIX locale,
+		use ascii8 encoding handler
+	* font/devX*: new font desc for M, G
+	* src/xditview: support ENABLE_MULTIBYTE (Japanese only?)
+
+2002-10-09  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* update groff-1.18-7
+
+2002-09-23  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* src/roff/troff/input.cc: fix bug in wchar_charinfo()
+				check u<CODE> where <CODE> is 4- HEX chars
+	* src/device/grohtml/post-html.cc: works ENABLE_MULTIBYTE
+	* font/devhtml: add font M, G for Japanese
+
+2002-09-22  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* new multibyte patch
+
+2001-08-16  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* tmac/euc-jp.tmac:
+	  fix disappearing `-' char
+
+2001-07-21  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* add ENABLE_MULTIBYTE support to src/xditview
+
+2001-07-20  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* introduce "fontset" in font/*/DESC
+	  obsoletes "ondemand"
+
+2001-07-19  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* don't use input_encoding->is_wchar_code()
+	* fix troffrc empty line
+	* fix duplicate strcasecmp()
+
+2001-07-19  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* sub font selection move into environment::add_char()
+	  it makes possible to use \[uni<code>]
+
+2001-07-19  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* use generic iconv_handler instead of euc_handler
+	* internal code now uses UCS-2
+
+2001-07-19  Fumitoshi UKAI  <ukai@debian.or.jp
+
+	* wchar%x -> uni%X
+	  - still no code conversion
+	  - font description is not accurate
+	* change "fixed" to charset range
+
+2001-07-18  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* Configuration Change: 
+	   obsolete: --enable-japanese (#ifdef NIPPON) 
+	   new:      --enable-multibyte (#ifdef ENABLE_MULTIBYTE)
+
+2001-07-18  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* create charinfo for wchar on demand (src/roff/troff/input.cc)
+	* use "fixed" for font wchar metric (src/libs/libgroff/font.cc)
+	  - font/*/M,G
+
+2001-07-17  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* add utf8 encoding handler to src/libs/libgroff/encoding.cc
+	   (this utf8 encodig handler is too slow!)
+
+2001-07-15  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* based on groff 1.17.2-1
+	* use src/include/encoding.h instead of eucmac.h
+	* introduce src/libs/libgroff/encoding.cc
+	* introduce tmac/euc-jp.tmac for EUC-JP documents
+
+2001-05-24  Fumitoshi UKAI  <ukai@debian.or.jp>
+
+	* Apply for groff-1.17
+
+2000-01-06  Yoshiaki Yanagihara  <yochi@debian.or.jp>
+
+	* Apply japanese patch "jgroff-0.101"
+	  (thanks hanataka@abyss.rim.or.jp).
+	* Added japanese extention option at configure.in, aclocal.m4.
+
+Sat Jan  1 17:10:32 JST 2000  HANATAKA Shinya  <hanataka@abyss.rim.or.jp>
+
+	* jgroff-0.100 をそのまま groff-1.14 に適用して jgroff-101
+	  とした。
+	* grohtml を日本語に対応させる。
+	* 日本語マニュアル用に tmac.docj と tmac.andocj マクロを追加。
+
+Sun Mar 15 18:23:12 1998  Yoshiaki Yanagihara  <yochi@debian.or.jp>
+
+	* jgroff のベースを groff-1.11a に変更し、jgroff-0.99パッチを
+	  適用したものを jgroff-0.100 とした。
+	  基本的に jgroff-0.99 と機能は同じ *はず*。
+
+Fri Dec 22 11:47:46 1995  Kitagawa Toshiyuki  <tm-kita@kh.rim.or.jp>
+
+	* バージョン0.99。
+
+Mon Dec 18 18:28:37 1995  Kitagawa Toshiyuki  <tm-kita@kh.rim.or.jp>
+
+	* tmac/Makefile.sub: ターゲット stamp-wrap、uninstall_sub が一部
+	OSのshで構文エラーとなるオリジナルバグを修正。
+
+Wed Dec 13 15:09:26 1995  Kitagawa Toshiyuki  <tm-kita@kh.rim.or.jp>
+
+	* jgroff.sh: オリジナルでインストールパスが変更されたのに合わせ、
+	GROFF_TMAC_PATH、GROFF_FONT_PATHをshare/groff配下に変更。
+
+Sat Dec  9 15:28:36 1995  Kitagawa Toshiyuki  <tm-kita@kh.rim.or.jp>
+
+	* wchar.hからeucmac.hにファイル名を変更。
+
+Fri Dec  8 12:15:47 1995  Yoshio Takaeda  <shio@yinyan.bekkoame.or.jp>
+
+	* troff/env.cc(add_char): 『ASCII文字 + 改行コード + EUC文字』という
+	パターンの時、改行コードがスペースに変換されないバグを修正。
+
+Thu Dec  7 21:35:06 1995  Yanagihara Yoshiaki  <yosiaki@bsd2.kbnes.nec.co.jp>
+
+	* troff/input.cc (process_input_stack): gcc-2.7.0で変数定義がスコープ
+	違反となってしまう箇所を修正。
+
+Thu Dec  7 21:35:06 1995  Yanagihara Yoshiaki  <yosiaki@bsd2.kbnes.nec.co.jp>
+
+	* jgroffのベースソースをgroff-1.10に変更。
+
+Thu Apr  6 16:56:32 1995  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* devdvi/M.proto-NTT: DNPのpkフォントのチェックサム値が0なので、こ
+	れに合わせてchecksumの値を0に変更。
+
+Mon Apr  3 20:36:37 1995  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* troff/env.cc (possibly_break_line):
+	lineリスト中のkword_space_nodeを調整する処理で、line中にこのノード
+	が含まれていない場合は処理をスキップするようにした(EUCコードを含ま
+	ないroffを処理する場合にはkword_space_nodeは現れないので処理が高速
+	化される)。
+
+Mon Apr  3 20:36:37 1995  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* troff/env.cc (add_char): hwkern、vlowerの初期化はdevice初期化後
+	に一度だけ行えば良いのでenvironmentクラスのコンストラクタでこれを
+	行うように変更。
+
+Sat Apr  1 17:57:23 1995  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* troff/input.cc (mount_on_demand): on demandでマウントされるフォ
+	ント名をデバイスごとのDESCファイルで指定できるように変更。
+	ディレクティブondemandで指定したフォントがon demandでマウントされる。
+
+Fri Mar 31 20:23:43 1995  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* libgroff/font.cc (load): 漢字フォントファイル用にディレクティブ
+	fixedkanjiを追加。これは各文字のメトリックが全て同じである事を指定
+	するもので、fixedkanjiが指定されている場合はcharsetは評価されない
+	ため漢字フォントのロードが速い。
+
+Thu Mar 30 18:20:24 1995  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* troff: node識別を文字列比較で行っていたが高速化のため数値比較に
+	変更した。
+
+Wed Mar 29 20:20:49 1995  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* troff/input.cc: 漢字フォント(MとG)をon demandでマウントするよう
+	に変更。これによって漢字を含まないroffファイルの処理時間が高速化さ
+	れた。
+
+Fri Mar 10 15:34:26 1995  Shigeki Yoshida <shige@theta.iis.u-tokyo.ac.jp>
+
+	* troff/input.cc (process): geqnで、
+
+		.EQ
+		要素 sub 記号
+		.EN
+
+	を処理すると、"illegal token in argument to \Z"となってしまうバグ
+	(\Zシーケンスの引数にEUC文字が来た場合の対応漏れ)を修正。
+
+Mon Feb  6 11:22:33 1995  Yoshio Takaeda <e50110@sakura.kudpc.kyoto-u.ac.jp>
+
+	* troff/input.cc: 行頭禁則文字のEUCコードの一部が不正。
+
+Mon Jan 30 14:02:54 1995  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* バージョン0.97。
+
+Fri Dec 10 14:26:14 1994  Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+
+	* devdvi/M.proto: NTT JTeXとASCII日本語TeX両方のdviファイルを扱えるよう
+	M.protoファイルを変更。
+
+Fri Dec  9 14:26:14 1994  Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+
+	* troff/node.cc: boldfont_list[]にフォント名 B を登録していなかっ
+	たため、dviファイルにゴシック体が出力されていなかった。
+
+Fri Dec  9 14:23:22 1994  Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+
+	* grotty/tty.cc (add_char): EUC文字に対してWCHAR_MODEを設定してい
+	なかったため、tty出力でゴシック体が二重打ちされていなかった。
+
+Fri Dec  9 14:19:33 1994  Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
+
+	* devdvi/Makefile.sub: フォントファイル G で、nameディレクティブが
+	`name M'になっている。
+
+Wed Nov 30 13:24:54 1994  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* バージョン0.96。
+
+	* grodvi/dvi.cc: FreeBSD 1.1.5Rのstrcmp(3)では引数にヌルポインタを
+	渡すとコアダンプしてしまうので、これを回避するコードを追加した。
+
+Tue Nov 29 13:52:54 1994  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* troff/input.cc: EUCのスペース文字(0xa1a1)はASCIIのスペース文字と
+	して処理するよう修正。
+
+	* devnippon/createM: JISX0208において文字が未定義の部分については
+	フォントファイルに出力しないよう修正。
+
+Mon Nov 28 18:15:31 1994  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* grodvi/dvi.cc: grodviを日本語化した。
+
+Fri Nov 25 15:39:05 1994  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* troff/env.cc: EUC文字で始まる行に対して均等割り付けが行われた場
+	合、行頭に余分な空白が入る事があったのでこれを修正した。
+
+Fri Nov 18 20:19:55 1994  Masubuchi Toshimichi <tmasu@st.rim.or.jp>
+
+	* devnippon/createM.c: createMの終了ステータスが不定になるため、
+	makeが終了してしまう。createMの終了ステータスが0になるよう修正。
+
+	* devnippon/Makefile.sub: PATH環境変数にカレントディレクトリが含ま
+	れていない場合、devnippon/Mをmakeする時点でcreateMが見つからずmake
+	エラーになるバグを修正。
+
+Thu Nov 17 17:11:26 1994  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* devnippon/createM.c: gets()をfgets()に変更。
+
+Sat Nov 12 13:38:19 1994  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* バージョン0.95。
+
+	* troff/env.cc: .stt リクエストを追加(ローカルなマニュアル書式に合
+	わせるため -> このリクエストは非公開)。
+
+	* troff/input.cc (init_charset_table): ASCIIの行頭禁則文字として
+	,:;>}を追加した。
+
+	* EUCフォントファイルは、make時にツールによって生成するよう変更。
+	これによりpatchサイズがかなり小さくなった。
+
+Fri Nov 11 20:53:00 1994  Kitagawa Toshiyuki  <kitagawa@bsd2.kbnes.nec.co.jp>
+
+	* troff/env.cc (add_char): <EUC文字> + <ASCII文字>の場合、間に入れ
+	る空白は禁則に違反しないかぎりブレーク可能な空白が入るよう修正した。
+
+
+Tue Oct 25 04:46:09 1994  Kitagawa Toshiyuki  (kitagawa@bsd2.kbnes.nec.co.jp)
+
+	* バージョン0.94。
+
+	* libdriver/input.cc (do_file): -Tlatin1でEUCではない文字コードを
+	EUCと判断してしまうバグを修正。
+
+Mon Oct 24 07:16:19 1994  Kitagawa Toshiyuki  (kitagawa@bsd2.kbnes.nec.co.jp)
+
+	* troff/node.cc (is_boldfont): FreeBSD 1.1.5で、ゼロ番地参照のためコ
+	アダンプするバグを修正。
+
+	* indxbib/dirnamemax.c: FreeBSD 1.1.5はpathconf()を持っていないので
+	_POSIX_VERSIONをundefした。
+
+	* バージョン0.93。
+
+	* geqnを日本語化した。
+
+	* devps/DESCのwcharkernを設定すると行頭に空白が入ってしまうバグの
+	修正方法を変更。
+
+Sat Oct 22 08:19:15 1994  Kitagawa Toshiyuki  (kitagawa@bsd2.kbnes.nec.co.jp)
+
+	* バージョン0.90。
+
+	* xtotroffを日本語化。
+
+Fri Oct 21 05:33:02 1994  Kitagawa Toshiyuki  (kitagawa@bsd2.kbnes.nec.co.jp)
+
+	* devps/DESCのwcharkernを設定すると行頭に空白が入ってしまう事があ
+	ったので、これを修正。
+
+	* pre-releaseバージョン。
+
+	* gxditviewを日本語化した(フォントメトリックの取り出しがいい加減)。
+
+Thu Oct 20 05:23:09 1994  Kitagawa Toshiyuki  (kitagawa@bsd2.kbnes.nec.co.jp)
+
+	* フォント番号3にボールド体以外のフォントをマウントした場合、漢字フォ
+	ントがゴシック体になってしまうバグを修正。
+
+Wed Oct 19 06:48:55 1994  Kitagawa Toshiyuki  (kitagawa@bsd2.kbnes.nec.co.jp)
+
+	* betaバージョン。
+
+Tue Oct 18 05:02:59 1994  Kitagawa Toshiyuki  (kitagawa@bsd2.kbnes.nec.co.jp)
+
+	* pic: 
+	gpicを日本語対応した。
+
+	* tbl: 
+	gtblを日本語対応した。
+
+	* troff/troff: 
+	Times-Bold以外のボールド体がカレントフォントの時、漢字フォントがゴ
+	シックに切り替わらないバグを修正。
+
+	* troff/troff: 
+	DESCにディレクティブwcharkernを追加し、ASCII文字とEUC文字の間に、
+	指定したunit数だけbreak不可能な空白を入れるようにした。
+
+	* troff/troff: 
+	DESCにディレクティブlowerwcharを追加し、ASCII文字に対してEUC文字を、
+	指定したunit数だけ下げるようにした(ASCII文字が落ち込んで見えるため)。
+	
+Fri Oct 14 08:29:06 1994  Kitagawa Toshiyuki  (kitagawa@bsd2.kbnes.nec.co.jp)
+
+	* aplahバージョン。
--- groff-1.18.1.orig/README.jp
+++ groff-1.18.1/README.jp
@@ -0,0 +1,142 @@
+
+                日本語対応版 groff-1.12 (jgroff-0.101)
+
+
+                                           北川 信亨 (Kitagawa Toshiyuki)
+                                                     tm-kita@kh.rim.or.jp
+
+                                           柳原 良亮 (Yanagihara Yoshiaki)
+                                                      yochi@debian.or.jp
+
+ GNUのroffフォーマッタgroff(version 1.12)の日本語対応を行ないました。
+ 上位互換となっていますので、日本語を含まないroffデータはオリジナルど
+おりの動作になります。日本語化に関する修正部分についての著作権はGNU
+General Public License Version 2 に従います(詳細はCOPYINGを御覧ください)。
+
+ 日本語groff(jgroff)の現バージョンは0.101(最終β版)です。このバージョン
+では以下のモジュールが日本語化されています。
+
+	groff	  ...	groffドライバ
+ 	gtroff	  ...	groff本体
+	grotty	  ...	端末用ポストプロセッサ
+	grops	  ...	PostScript用ポストプロセッサ
+        grohtml   ...   HTML用ポストプロセッサ(Thanks HANATAKA Shinya
+                                               <hanataka@abyss.rim.or.jp>)
+	grodvi	  ...	DVI用ポストプロセッサ (NTT JTeX or ASCII日本語TeX)
+	gxditview ...	Xウィンドウ用ポストプロセッサ
+	gtbl	  ...	tblマクロ用プリプロセッサ
+	gpic	  ...	picマクロ用プリプロセッサ
+	geqn	  ...	eqnマクロ用プリプロセッサ
+	xtotroff  ...	Xのフォントからgroff用フォントファイルを作成す
+	            	るツール
+
+# lj4ポストプロセッサ、bib関連のコマンドは日本語未対応です。
+
+
+◎ インストール
+
+ 以下の環境でmake出来ることを確認しています。
+
+	☆  FreeBSD 2.1.0-RELEASE
+	    XFree86-3.1.2, gcc 2.6.3
+
+	☆  Debian GNU/Linux 2.2
+
+	☆  NEC EWS/4800/310
+	    SVR4.2 Release9.1 Rev.B, X11R5, gcc 2.6.0
+
+ (1) オリジナルと同様configureを実行した後、make & installして下さい。
+    詳しくはINSTALLを参照してください。
+
+    *) grodviはNTT JTeX形式またはASCII日本語TeX形式のDVIファイルをサポー
+       トしています。groffが出力するDVIファイルをASCII日本語TeX形式に
+       したい場合はconfigure --JTeX=ASCIIとしてください。
+       --JTeXオプションを指定しなかった場合はNTT JTeX形式になります。
+
+ (2) groffのmakeの後、gxditview(groffのXウィンドウ用ポストプロセッサ)
+    をmakeします。トップディレクトリ直下のxditviewへcdして、
+
+	% xmkmf
+	% make depend
+	% make all
+	% make install install.man
+
+    で、インストール完了です。
+
+
+◎ 使い方
+
+ groffの-Tオプションに-Tnippon(端末表示)を追加した以外はオリジナルのま
+まです。
+以下は使用例。
+
+ (1)  groff -Tnippon -man groff.jman
+
+ 日本語を含むroffファイル(groff.jman)をmanマクロを使ってフォーマットし、
+端末に表示します。
+ 
+ (2)  groff -Tps -man groff.jman
+
+ 日本語を含むroffファイルをフォーマットし、PostScriptに変換します。
+
+ (3)  groff -TX100 -man groff.jman
+
+ 日本語を含むroffファイルをフォーマットし、Xウィンドウに表示します。
+
+ (4)  groff -Tdvi -man groff.jman
+
+ 日本語を含むroffファイルをフォーマットし、DVIファイルを出力します。
+
+
+◎ 日本語化について
+
+・ 日本語文字コードは日本語EUC(のコードセット1)のみサポートしています。
+
+・ 日本語フォントについては、カレントフォントがボールド体の時はゴシッ
+   ク体に、それ以外のフォント(ローマン、イタリック、イタリックボールド
+   等)がカレントフォントの時は明朝体に、自動的に切り替わります。日本語
+   フォントを直接指定することは出来ません。
+
+   (注) フォントファイル名が'B'で終っているフォント(B、TB、HNBなど)を
+        ボールドフォントとしています。
+
+・ 行頭、および行末禁則に対応しています。それぞれの禁則文字は、
+
+   行頭禁則文字:	 、 。,.・:;?!)〕]}」』】
+			ぁぃぅぇぉっゃゅょァィゥェォッャュョ
+			. ? ! " ' ) ] * , : ; > }
+   行末禁則文字:	( 〔[{「『【
+
+   を定義しています。
+
+・ -Tpsを指定した場合、EUC文字とASCII文字の間には、幅の狭い空白が自動
+   的に挿入されます。この空白の幅はdevps/DESCのwcharkernで指定します。
+   unit単位です。0を指定すると空白は挿入されなくなります。
+
+・ -Tpsを指定した場合、EUC文字はASCII文字に対して少し下げて出力されま
+   す(そのままだとASCII文字が落ち込んで見えるため)。この下げ幅は
+   devps/DESCのlowerwcharで指定します。unit単位です。0を指定すると字下
+   げは行なわれません。
+
+・ オリジナルでは改行コードは無条件にスペース文字に変換されますが、EUC
+   文字で囲まれた改行コードはスペースに変換せず無視するようにしました。
+
+・ EUCのスペース文字(0xa1a1)はASCIIのスペース文字として処理されます。
+
+
+◎ 謝辞
+
+grodviのASCII日本語TeX対応は、宇都宮大学の横田さんが行なってくださいま
+した。grohtmlの日本語(EUC)対応は、花嵩信哉さんが行ってくれました。
+また、多くの方からバグに関する報告、修正イメージを送って頂きました。
+御協力くださった皆様にはとても感謝しております。有難うございました。
+
+
+◎ お願い
+
+現バージョンではlj4ポストプロセッサ、bib関連のコマンド群が日本語化され
+ておりません。これらの日本語化を行ってくださる方を募集致しております。
+ぜひ御協力ください。また、日本語対応groffに関して御意見、御希望等を
+是非お聞かせください。今後の参考にさせて頂きます(もちろんバグ報告も
+歓迎です!)。
+以上はE-Mailにて、tm-kita@kh.rim.or.jp宛にお送りください。
--- groff-1.18.1.orig/TODO.jp
+++ groff-1.18.1/TODO.jp
@@ -0,0 +1,19 @@
+TODO lists
+
+- configure
+    nl_langinfo()
+    iconv()
+
+- font/devdvi
+	G,M  -- NTT and/or ASCII
+- src/devices
+	grohtml
+	grodvi
+	grolbp
+	grolj4
+- src/xditview
+
+- command line option to specify input/output encoding
+- font code?
+	can we assume wchar code == font code?
+	[to simplify indexing]