rpms/a2ps/devel .cvsignore, NONE, 1.1 a2ps-4.13-eucjp.patch, NONE, 1.1 a2ps-4.13-conf.patch, 1.4, 1.5 a2ps-4.13-etc.patch, 1.2, 1.3 a2ps-4.13-euckr.patch, 1.1, 1.2 a2ps-4.13-hebrew.patch, 1.5, 1.6 a2ps.spec, 1.82, 1.83 sources, 1.3, 1.4

Patrice Dumas (pertusus) fedora-extras-commits at redhat.com
Thu May 1 14:08:00 UTC 2008


Author: pertusus

Update of /cvs/extras/rpms/a2ps/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20268

Modified Files:
	a2ps-4.13-conf.patch a2ps-4.13-etc.patch a2ps-4.13-euckr.patch 
	a2ps-4.13-hebrew.patch a2ps.spec sources 
Added Files:
	.cvsignore a2ps-4.13-eucjp.patch 
Log Message:
* Sun Apr 27 2008 Patrice Dumas <pertusus at free.fr> 4.14-1
- update to 4.14
- don't obsolete the provided version of a2ps-i18n
- use html2ps for the html delegation



--- NEW FILE .cvsignore ---
a2ps-4.14.tar.gz
i18n-fonts-0.1.tar.gz

a2ps-4.13-eucjp.patch:

--- NEW FILE a2ps-4.13-eucjp.patch ---
diff -up a2ps-4.14/config.h.in.euc a2ps-4.14/config.h.in
--- a2ps-4.14/config.h.in.euc	2007-12-29 04:28:05.000000000 +0100
+++ a2ps-4.14/config.h.in	2008-04-27 10:39:24.000000000 +0200
@@ -24,6 +24,9 @@
 /* Define if TIOCGWINSZ requires sys/ioctl.h */
 #undef GWINSZ_IN_SYS_IOCTL
 
+/* Define if you want to support japanese  */
+#undef ENABLE_KANJI
+ 
 /* Define to 1 if you have the `alarm' function. */
 #undef HAVE_ALARM
 
diff -up a2ps-4.14/configure.euc a2ps-4.14/configure
--- a2ps-4.14/configure.euc	2008-04-27 10:39:24.000000000 +0200
+++ a2ps-4.14/configure	2008-04-27 10:41:39.000000000 +0200
@@ -1587,7 +1587,8 @@ Optional Packages:
   --with-medium=medium    specify the default medium (A4, Letter, Legal, etc.)
                           default=A4
   --with-encoding=enc     specify the default encoding (ascii, latin1,
-                          latin2... latin6, hp etc.) default=latin1
+                          latin2... latin6, euc-jp, hp etc.) default=latin1
+  --enable-kanji 	  support Japanese (default=yes)
 
 Some influential environment variables:
   CC          C compiler command
@@ -22521,7 +22522,7 @@ fi
 
 for ac_header in sys/time.h sys/stat.h sys/types.h sys/ioctl.h  \
  math.h string.h strings.h stdlib.h unistd.h stdarg.h pwd.h malloc.h \
- memory.h errno.h fcntl.h stdbool.h fnmatch.h
+ memory.h errno.h fcntl.h stdbool.h fnmatch.h iconv.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -30947,6 +30948,22 @@ fi
 
 
 
+# Check whether --enable-kanji or --disable-kanji was given.
+if test "${enable_kanji+set}" = set; then
+  enableval="$enable_kanji"
+  SUPPORT_KANJI=$enableval
+else
+  SUPPORT_KANJI=yes
+fi
+
+if test "$SUPPORT_KANJI" = "yes"; then
+	cat >> confdefs.h <<\EOF
+#define ENABLE_KANJI 1
+EOF
+#	ENCODING=euc-jp
+fi
+
+
 ########################
 # Nice special printers
 ########################
diff -up a2ps-4.14/configure.in.euc a2ps-4.14/configure.in
--- a2ps-4.14/configure.in.euc	2008-04-27 10:39:24.000000000 +0200
+++ a2ps-4.14/configure.in	2008-04-27 10:39:24.000000000 +0200
@@ -72,7 +72,7 @@ AC_HEADER_SYS_WAIT
 AC_HEADER_DIRENT
 AC_CHECK_HEADERS(sys/time.h sys/stat.h sys/types.h sys/ioctl.h  \
  math.h string.h strings.h stdlib.h unistd.h stdarg.h pwd.h malloc.h \
- memory.h errno.h fcntl.h stdbool.h fnmatch.h)
+ memory.h errno.h fcntl.h stdbool.h fnmatch.h iconv.h)
 
 ## --------------------- ##
 ## Checks for typedefs.  ##
@@ -276,11 +276,23 @@ AC_SUBST(MEDIUM)
 #
 AC_ARG_WITH(encoding,
 AC_HELP_STRING([--with-encoding=enc],
-               [specify the default encoding (ascii, latin1, latin2... latin6, hp etc.) [default=latin1]]),
+               [specify the default encoding (ascii, latin1, latin2... latin6, euc-jp, hp etc.) [default=latin1]]),
 ENCODING=$with_encoding,
 ENCODING=latin1)
 AC_SUBST(ENCODING)
 
+#
+# use libjcode
+#
+AC_ARG_ENABLE(kanji,
+	[  --enable-kanji	  support Japanese/kanji (default: yes)],
+			SUPPORT_KANJI=$enableval, SUPPORT_KANJI=yes)
+if test "$SUPPORT_KANJI" = "yes"; then
+	AC_DEFINE(ENABLE_KANJI)
+	dnl ENCODING=euc-jp
+fi
+
+
 ########################
 # Nice special printers
 ########################
diff -up a2ps-4.14/encoding/encoding.map.euc a2ps-4.14/encoding/encoding.map
--- a2ps-4.14/encoding/encoding.map.euc	2007-12-29 02:39:21.000000000 +0100
+++ a2ps-4.14/encoding/encoding.map	2008-04-27 10:39:24.000000000 +0200
@@ -93,6 +93,12 @@ koi8r			koi8
 koi8			koi8
 koi			koi8
 
+euc-jp			euc-jp
+eucjp			euc-jp
+japanese		euc-jp
+ja			euc-jp
+jp			euc-jp
+
 ########################################################################
 # Some architectures specific char sets
 ########################################################################
diff -up /dev/null a2ps-4.14/encoding/euc-jp.edf
--- /dev/null	2008-04-27 11:55:27.307012118 +0200
+++ a2ps-4.14/encoding/euc-jp.edf	2008-04-27 10:39:24.000000000 +0200
@@ -0,0 +1,109 @@
+# Description of the EUC-JP encoding
+# Copyright (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
+# Copyright (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
+#
+
+#
+# This file is part of a2ps.
+# 
+# This program 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.
+#
+# This program 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+#
+
+Name: EUC-JP
+
+# This text is reproduced by a courtesy of Roman Czyborra
+# http://czyborra.com/charsets/iso8859.html
+Documentation
+The EUC-JP character set, often simply referred to as Latin 1,
+covers most West European languages, such as French, Spanish, Catalan,
+Basque, Portuguese, Italian, Albanian, Rhaeto-Romanic, Dutch, German,
+Danish, Swedish, Norwegian, Finnish, Faroese, Icelandic, Irish,
+Scottish, and English, incidentally also Afrikaans and Swahili, thus
+in effect also the entire American continent, Australia and the
+southern two-thirds of Africa. The lack of the ligatures Dutch IJ,
+French OE and ,,German`` quotation marks is considered tolerable.
+
+The lack of the new C=-resembling Euro currency symbol U+20AC has
+opened the discussion of a new Latin0.
+EndDocumentation
+
+# If there is an unknown font requested, use Courier
+Default: Courier
+
+# Automatic spell checking :)
+Substitute: 	Times			Times-Roman
+Substitute: 	Helvetica-Italic	Helvetica-Oblique
+Substitute: 	Helvetica-BoldItalic	Helvetica-BoldOblique
+
+
+# SlantFont for Japanese Italic Kanji font
+#		new font			source font		value
+SlantFont:	Ryumin-Light-EUC-H-Italic	Ryumin-Light-EUC-H	0.2
+SlantFont:	GothicBBB-Medium-EUC-H-Italic	GothicBBB-Medium-EUC-H	0.2
+
+# Compose font for japanese EUC code
+#		target font		additional font			width	size rate
+DefaultComposite:			Ryumin-Light-EUC-H		1.0	1.1
+
+# 1:2 fixed
+#DefaultComposite:			Ryumin-Light-EUC-H		1.0	0.8333
+
+# 1:1 fixed
+#DefaultComposite:			Ryumin-Light-EUC-H		1.0	1.6666
+
+Composite:	Helvetica		GothicBBB-Medium-EUC-H		1.0	1.1
+Composite:	Helvetica-Oblique	GothicBBB-Medium-EUC-H-Italic	1.0 	1.1
+Composite:	Helvetica-Bold		GothicBBB-Medium-EUC-H  	1.0 	1.1
+Composite:	Helvetica-BoldOblique	GothicBBB-Medium-EUC-H-Italic	1.0	1.1
+
+Composite:	Courier-Oblique		Ryumin-Light-EUC-H-Italic	1.0	1.1
+Composite:	Courier-Bold		GothicBBB-Medium-EUC-H		1.0	1.1
+Composite:	Courier-BoldOblique	GothicBBB-Medium-EUC-H-Italic	1.0	1.1
+Composite:	Times-Bold		GothicBBB-Medium-EUC-H		1.0	1.1
+
+Vector:
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+space exclam quotedbl numbersign dollar percent ampersand quoteright
+parenleft parenright asterisk plus comma minus period slash
+zero one two three four five six seven
+eight nine colon semicolon less equal greater question
+at A B C D E F G
+H I J K L M N O
+P Q R S T U V W
+X Y Z bracketleft backslash bracketright asciicircum underscore
+quoteleft a b c d e f g
+h i j k l m n o
+p q r s t u v w
+x y z braceleft bar braceright asciitilde .notdef
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+space exclamdown cent sterling currency yen brokenbar section
+dieresis copyright ordfeminine guillemotleft logicalnot hyphen registered macron
+degree plusminus twosuperior threesuperior acute mu paragraph bullet
+cedilla onesuperior ordmasculine guillemotright onequarter onehalf threequarters questiondown
+Agrave Aacute Acircumflex Atilde Adieresis Aring AE Ccedilla
+Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis
+Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis multiply
+Oslash Ugrave Uacute Ucircumflex Udieresis Yacute Thorn germandbls
+agrave aacute acircumflex atilde adieresis aring ae ccedilla
+egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis
+eth ntilde ograve oacute ocircumflex otilde odieresis divide
+oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis
diff -up a2ps-4.14/encoding/Makefile.am.euc a2ps-4.14/encoding/Makefile.am
--- a2ps-4.14/encoding/Makefile.am.euc	2007-12-29 02:39:27.000000000 +0100
+++ a2ps-4.14/encoding/Makefile.am	2008-04-27 10:39:24.000000000 +0200
@@ -16,7 +16,7 @@ major_encodings = ascii.edf iso1.edf
 minor_encodings = \
 ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf	\
 iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf	\
-iso15.edf koi8.edf ms-cp1251.edf
+iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf
 
 if EXTENSIONS
 encodings_DATA = encoding.map $(major_encodings) $(minor_encodings)
diff -up a2ps-4.14/encoding/Makefile.in.euc a2ps-4.14/encoding/Makefile.in
--- a2ps-4.14/encoding/Makefile.in.euc	2007-12-29 04:28:07.000000000 +0100
+++ a2ps-4.14/encoding/Makefile.in	2008-04-27 10:39:24.000000000 +0200
@@ -270,7 +270,7 @@ major_encodings = ascii.edf iso1.edf
 minor_encodings = \
 ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf	\
 iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf	\
-iso15.edf koi8.edf ms-cp1251.edf
+iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf
 
 @EXTENSIONS_FALSE at encodings_DATA = encoding.map $(major_encodings)
 @EXTENSIONS_TRUE at encodings_DATA = encoding.map $(major_encodings) $(minor_encodings)
diff -up a2ps-4.14/lib/encoding.c.euc a2ps-4.14/lib/encoding.c
--- a2ps-4.14/lib/encoding.c.euc	2007-12-29 02:37:54.000000000 +0100
+++ a2ps-4.14/lib/encoding.c	2008-04-27 10:39:24.000000000 +0200
@@ -37,6 +37,9 @@
 #include "document.h"
 #include "quotearg.h"
 #include "strverscmp.h"
+#ifdef ENABLE_KANJI
+int use_jcode = false;
+#endif
 
 /* Suffix of the Encoding Description Files */
 #define EDF_SUFFIX ".edf"
@@ -389,15 +392,25 @@ font_entry_set_used (struct hash_table_s
  * Association of suffixes rules, and corresponding style sheet
  * (The hashing is upon `alias')
  */
+struct slantfont_info {
+  char * name;
+  char * src;
+  float raito;
+};
+
 struct encoding {
   char * key;			/* e.g. latin1			*/
   char * name;			/* e.g. ISO Latin 1		*/
+  int    composite_flag;		/* flag for composite font	*/
   uchar * documentation;		/* Useful pieces of text	*/
 
   char * default_font;		/* When a font can't be used
 				   define the font to use	*/
   struct pair_htable * substitutes;	/* e.g. in latin2, don't use
 					 * Courier, but Courier-Ogonki	*/
+  struct pair_htable * composite;
+
+  struct slantfont_info     slantfont[NB_FACES];
 
   char * vector[256];	/* Define the char set			*/
   struct darray * font_names_used;
@@ -407,6 +420,9 @@ struct encoding {
   struct hash_table_s * fonts;	/* Contains cells that are
 				 * 1. name of font, 2. int wx[256] 	*/
   unsigned int * faces_wx[NB_FACES];
+
+  unsigned int   composite_wx[NB_FACES];     /* fixed length font width*/
+  float          composite_raito[NB_FACES];  /* size raito of additonal and orinal font */
 };
 
 /*
@@ -423,9 +439,12 @@ encoding_new (const char * key)
   res->name = NULL;
   res->default_font = NULL;
   res->documentation = NULL;
+  res->composite_flag = false;
 
   /* Vector will be set by setup */
   res->substitutes = pair_table_new ();
+  res->composite = pair_table_new ();
+  res->slantfont[0].name = NULL;
   res->font_names_used = da_new ("List of font names", 10,
 				 da_linear, 10,
 				 (da_print_func_t) da_str_print,
@@ -471,6 +490,34 @@ encoding_add_font_substitute (struct enc
 }
 
 /*
+ * Add a composite font in the current encoding
+ */
+static void
+encoding_add_composite_font (struct encoding * encoding,
+			      const char * orig, const char * subs,
+			      int wx, float raito)
+{
+  encoding->composite_flag = true;
+  pair_add2 (encoding->composite, orig, subs, wx, raito);
+}
+
+/*
+ * Add a composite font in the current encoding
+ */
+static void
+encoding_add_slant_font (struct encoding * encoding,
+			 const char * new, const char * src,
+			 float raito)
+{
+  static num =  0;
+  encoding->slantfont[num].name = strdup(new);
+  encoding->slantfont[num].src  = strdup(src);
+  encoding->slantfont[num].raito = raito;
+  encoding->slantfont[num+1].name = NULL;
+  num++;
+}
+
+/*
  * When FONT_NAME is used with ENCODING, return the
  * real font name to use (e.g., in latin2, Courier-Ogonki
  * should be returned when asked for Courier).
@@ -514,6 +561,77 @@ encoding_resolve_font_substitute (struct
     }
 
   message (msg_enc,
+	   (stderr, "In encoding %s, composite font for %s is resolved as %s\n",
+	    encoding->key, font_name, res));
+  return res;
+}
+
+/*
+ * Get composite font size and raito
+ */
+static int
+composite_font_info_get_wx(struct a2ps_job * job,
+			   struct encoding * encoding,
+			   const char * font_list)
+{
+  int wx= -1;
+  char * font_list_copy;
+  char * font_name;
+  astrcpy (font_list_copy, font_list);
+  font_name = strtok (font_list_copy, ",<>;");
+
+  wx = pair_get_wx (encoding->composite, font_name);
+  if (wx<0)
+      wx = pair_get_wx (encoding->composite, "default_composite__");
+
+  return wx;
+}
+
+static float
+composite_font_info_get_raito(struct a2ps_job * job,
+			      struct encoding * encoding,
+			      const char * font_list)
+{
+  float raito= -1;
+  char * font_list_copy;
+  char * font_name;
+
+  astrcpy (font_list_copy, font_list);
+  font_name = strtok (font_list_copy, ",<>;");
+
+  raito = pair_get_raito (encoding->composite, font_name);
+  if (raito<0)
+      raito = pair_get_raito (encoding->composite, "default_composite__");
+  return raito;
+}
+
+const char *
+encoding_resolve_composite_font (struct a2ps_job * job,
+				  struct encoding * encoding,
+				  const char * font_list)
+{
+  const char * res = NULL;
+  char * font_list_copy;
+  char * font_name;
+
+  astrcpy (font_list_copy, font_list);
+  font_name = strtok (font_list_copy, ",<>;");
+
+  /* Find if there is a substitute for that font */
+  res = pair_get (encoding->composite, font_name);
+
+  /* We've found nothing interesting.  Last chance is the default
+   * font */
+  if (!res)
+    {
+      res = pair_get (encoding->composite, "default_composite__");
+
+      if (!res)
+	error (1, 0, "Cannot find font %s, nor any composite font",
+	       font_name);
+    }
+  
+  message (msg_enc,
 	   (stderr, "In encoding %s, font %s is resolved as %s\n",
 	    encoding->key, font_name, res));
   return res;
@@ -585,6 +703,12 @@ load_encoding_description_file (a2ps_job
 	{
 	  token2 = GET_TOKEN (NULL);
 	  CHECK_TOKEN ();
+#ifdef ENABLE_KANJI
+	  if( strcmp(token2, "EUC-JP")== 0)
+	    use_jcode = true;
+	  else 
+	    use_jcode = false;
+#endif
 	  encoding->name = xstrdup (token2);
 	}
       else if (strequ (token, "Default:"))
@@ -633,6 +757,66 @@ load_encoding_description_file (a2ps_job
 	  subs = token2;
 	  encoding_add_font_substitute (encoding, orig, subs);
 	}
+      else if (strequ (token, "DefaultComposite:"))
+	{
+	  char * orig, * subs;
+	  int wx;
+	  float raito;
+
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  subs = token2;
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  wx = (int)atof(token2)*1000;
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  raito = atof(token2);
+	  encoding_add_composite_font(encoding, "default_composite__",
+				      subs, wx, raito);
+	}
+      else if (strequ (token, "Composite:"))
+	{
+	  char * orig, * subs;
+	  int wx;
+	  float raito;
+
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  orig = token2;
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  subs = token2;
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  wx = (int)atof(token2)*1000;
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  raito = atof(token2);
+	  encoding_add_composite_font(encoding, orig, subs, wx, raito);
+	}
+      else if (strequ (token, "SlantFont:"))
+	{
+	  char * new, * src;
+	  float raito;
+	  unsigned int num;
+
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  new = token2;
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  src = token2;
+	  token2 = GET_TOKEN (NULL);
+	  CHECK_TOKEN ();
+	  raito = atof(token2);
+	  for (num = 0 ; encoding->slantfont[num].name ; num ++ );
+	  if (num > sizeof encoding->slantfont - 1){
+	      error_at_line (1, 0, fname, firstline,
+			   _("too many slant font: `%s'"), new);
+	  }
+	  encoding_add_slant_font(encoding, new, src, raito);
+	}
       else
         error_at_line (1, 0, fname, firstline,
                        _("invalid option `%s'"), quotearg (token));
@@ -754,6 +938,15 @@ encoding_char_exists (struct encoding * 
 }
 
 /*
+ * Return the flag of composite flag
+ */
+int
+encoding_get_composite_flag (struct encoding * enc)
+{
+  return enc->composite_flag;
+}
+
+/*
  * Prepare the environment (a dictionary) for the support
  * of ENCODING, dump it into STREAM.
  *
@@ -766,9 +959,11 @@ dump_encoding_setup (FILE * stream,
 		     struct encoding * encoding)
 {
   size_t i, nb;
+  size_t ns;
   const char * real_font_name;		/* After subsitution	*/
   char ** font_names = (char **) encoding->font_names_used->content;
 
+
   /* How many fonts are there? */
   da_qsort (encoding->font_names_used);
   da_unique (encoding->font_names_used, (da_map_func_t) free);
@@ -787,15 +982,46 @@ dump_encoding_setup (FILE * stream,
    * in the current ENCODING	*/
   nb = encoding->font_names_used->len;
 
+  /* The number of slant fonts */
+  for (i= 0, ns=0 ; encoding->slantfont[i].name ; i++ )
+      ns++;
+
   /* Create the dictionary and fill it */
   fprintf (stream, "%% Dictionary for %s support\n",
 	  encoding->name);
-  fprintf (stream, "/%sdict %d dict begin\n", encoding->key, nb);
+  fprintf (stream, "/%sdict %d dict begin\n", encoding->key,
+	   (encoding->composite_flag == true)? nb+nb+ns:nb+ns);
   for (i = 0 ; i < nb ; i++)
     fprintf (stream, "  /f%s %sEncoding /%s reencode_font\n",
 	     font_names [i],
 	     encoding->name,
 	     encoding_resolve_font_substitute (job, encoding, font_names [i]));
+
+  /* Slant font setting */
+  for (i = 0 ; encoding->slantfont[i].name ; i++ )
+    fprintf (stream, "  /%s /%s %f slantfont  definefont pop\n",
+	     encoding->slantfont[i].name,
+	     encoding->slantfont[i].src,
+	     encoding->slantfont[i].raito);
+
+  /*
+   * Composite font setting.
+   * If kanji font size is larger than alphabet character, 
+   * set base font size to kanji charactor size.
+   */
+  if (encoding->composite_flag == true) {
+    for (i = 0 ; i < nb ; i++)
+      fprintf (stream, "  /f%s /f%s /%s %f %f false  compositefont "
+	               "%f scalefont def\n",
+	       font_names [i],
+	       font_names [i],
+	       encoding_resolve_composite_font (job, encoding, font_names [i]),
+	       encoding->composite_raito[i],
+	       (encoding->composite_raito[i] > 1.0)?
+	       0: (1-encoding->composite_raito[i])/2.0,
+	       (encoding->composite_raito[i] > 1.0)?
+	       1.0/encoding->composite_raito[i]: 1.0 );
+  }
   fputs ("currentdict end def\n", stream);
 }
 
@@ -939,6 +1165,22 @@ encoding_build_faces_wx (a2ps_job * job,
 				   true_font_name,
 				   encoding->vector,
 				   encoding->faces_wx [face]);
+
+      if (encoding->composite_flag)
+	{
+	  encoding->composite_raito[i] =
+	    composite_font_info_get_raito(job, encoding, 
+					  job->face_eo_font [face]);
+
+	  encoding->composite_wx[i] =
+	    composite_font_info_get_wx(job, encoding, 
+				       job->face_eo_font [face]);
+
+	  /* If kanji font size is larger than alphabet character, 
+	     fit kanji charactor size to base font size */
+	  if (encoding->composite_raito[i] < 1.0)
+	      encoding->composite_wx[i] *= encoding->composite_raito[i]; 
+	}
     }
 }
 
@@ -1073,6 +1315,13 @@ char_WX (a2ps_job * job, uchar c)
   return 0;	/* For -Wall */
 }
 
+unsigned int
+char_composite_WX (a2ps_job * job, uchar c)
+{
+  return (job->encoding->composite_wx[job->status->face]/
+	  job->encoding->composite_raito[job->status->face]);
+}
+
 /*
  *	Returns the WX of a string (including M- and ^)
  */
diff -up a2ps-4.14/lib/encoding.h.euc a2ps-4.14/lib/encoding.h
--- a2ps-4.14/lib/encoding.h.euc	2007-12-29 02:58:17.000000000 +0100
+++ a2ps-4.14/lib/encoding.h	2008-04-27 10:39:24.000000000 +0200
@@ -43,6 +43,7 @@ struct a2ps_job;	/* Declared in jobs.h w
  */
 unsigned int char_WX PARAMS ((struct a2ps_job * job, uchar c));
 unsigned int string_WX PARAMS ((struct a2ps_job * job, uchar * string));
+unsigned int char_composite_WX PARAMS ((struct a2ps_job * job, uchar c));
 
 
 /************************************************************************/
@@ -56,6 +57,7 @@ void encoding_self_print PARAMS ((struct
 					FILE * stream));
 int encoding_char_exists PARAMS ((struct encoding * enc,
 					enum face_e face, uchar c));
+int encoding_get_composite_flag (struct encoding * enc);
 struct encoding *
 get_encoding_by_alias PARAMS ((struct a2ps_job * job, 
 			       char *string));
@@ -71,6 +73,12 @@ const char * encoding_resolve_font_subst
 		 struct encoding * encoding,
 		 const char * font_name));
 
+
+const char * encoding_resolve_composite_font
+	PARAMS ((struct a2ps_job * job,
+		 struct encoding * encoding,
+		 const char * font_name));
+
 /*
  * Have a struct encoding determine the faces_wx
  */
diff -up a2ps-4.14/lib/pair_ht.c.euc a2ps-4.14/lib/pair_ht.c
--- a2ps-4.14/lib/pair_ht.c.euc	2007-12-29 02:58:21.000000000 +0100
+++ a2ps-4.14/lib/pair_ht.c	2008-04-27 10:39:24.000000000 +0200
@@ -49,6 +49,8 @@ struct pair
 {
   char * key;
   char * value;
+  float  raito;
+  int    wx;
 };
 
 /*
@@ -165,6 +167,37 @@ pair_add (struct hash_table_s * table,
 }
 
 /*
+ *  Add a pair, with your own allocation for them.
+ * It KEY is yet used, override its value with VALUE
+ */
+void
+pair_add2 (struct hash_table_s * table,
+	  const char * key, const char * value, int wx, float raito)
+{
+  struct pair * item, token;
+  
+  token.key = (char *) key;
+  item = (struct pair *) hash_find_item (table, &token);
+
+  if (item) {
+    if (item->value)
+      free (item->value);
+  } else {
+    item = XMALLOC (struct pair, 1);
+    item->key = xstrdup(key);
+    item->wx    = wx;
+    item->raito = raito;
+  }
+  
+  if (value)
+    item->value = xstrdup (value);
+  else
+    item->value = NULL;
+
+  hash_insert (table, item);
+}
+
+/*
  * Remove a pair and free it.
  * It KEY is yet used, override its value with VALUE
  */
@@ -201,6 +234,34 @@ pair_get (struct hash_table_s * table, c
     return NULL;
 }
 
+int
+pair_get_wx (struct hash_table_s * table, const char * key)
+{
+  struct pair * item, token;
+  
+  token.key = (char *) key;
+  item = (struct pair *) hash_find_item (table, &token);
+
+  if (item)
+    return item->wx;
+  else
+    return -1;
+}
+
+float
+pair_get_raito (struct hash_table_s * table, const char * key)
+{
+  struct pair * item, token;
+  
+  token.key = (char *) key;
+  item = (struct pair *) hash_find_item (table, &token);
+
+  if (item)
+    return item->raito;
+  else
+    return -1;
+}
+
 /*
  * Return the content of the hash table, ordered
  */
diff -up a2ps-4.14/lib/pair_ht.h.euc a2ps-4.14/lib/pair_ht.h
--- a2ps-4.14/lib/pair_ht.h.euc	2007-12-29 02:58:21.000000000 +0100
+++ a2ps-4.14/lib/pair_ht.h	2008-04-27 10:39:24.000000000 +0200
@@ -56,6 +56,10 @@ void pair_table_free PARAMS ((struct pai
 void pair_add PARAMS ((struct pair_htable * table, 
 		       const char * key, const char * value));
 
+void pair_add2 PARAMS ((struct pair_htable * table, 
+		       const char * key, const char * value,
+			int wx, float raito));
+
 /*
  * The key and value of the matching item  will be free'd
  * (No problem if KEY matches nothing)
@@ -68,6 +72,10 @@ void pair_delete PARAMS ((struct pair_ht
  */
 char * pair_get PARAMS ((struct pair_htable * table,
 			 const char * key));
+int    pair_get_wx PARAMS ((struct pair_htable * table,
+			    const char * key));
+float  pair_get_raito PARAMS ((struct pair_htable * table,
+			       const char * key));
 
 void pair_table_list_short PARAMS ((struct pair_htable * table,
 				    FILE * stream));
diff -up a2ps-4.14/lib/psgen.c.euc a2ps-4.14/lib/psgen.c
--- a2ps-4.14/lib/psgen.c.euc	2007-12-29 02:58:22.000000000 +0100
+++ a2ps-4.14/lib/psgen.c	2008-04-27 10:39:24.000000000 +0200
@@ -875,6 +875,7 @@ ps_print_char (a2ps_job * job, int c, en
   print:
   default:
     {
+      static mb_flag= 0;
       uchar buf[256];
       int nchars;
       *buf = '\0';
@@ -889,6 +890,29 @@ ps_print_char (a2ps_job * job, int c, en
     job->status->face_declared = false;
   }
 
+  if (c > 127 && encoding_get_composite_flag (job->encoding) &&
+      job->status->face != Symbol) {
+    if (mb_flag) {
+        nchars = ps_escape_char (job, mb_flag, buf) + 
+	         ps_escape_char (job, c, buf);
+	job->status->wx += char_composite_WX(job, c);
+	job->status->column += nchars;
+	if (line_full) {
+	    if (job->folding) {
+	        fold_line (job, new_face);
+		job->status->column = nchars*2;
+		job->status->wx = char_composite_WX(job, c);
+	    } else {
+	      job->status->is_in_cut = true;
+	      return;
+	    }
+	}
+	mb_flag = 0;
+    } else {
+        mb_flag = c;
+	return;
+    }
+  } else {
       nchars = ps_escape_char (job, c, buf);
       job->status->wx += char_WX (job, c);
       job->status->column += nchars;
@@ -902,8 +926,9 @@ ps_print_char (a2ps_job * job, int c, en
 	  return;
 	}
       }
+  }
       output (jdiv, "%s", buf);
-      job->status->chars++;
+      job->status->chars+=nchars;
     }
     break;
   }
diff -up a2ps-4.14/ps/base.ps.euc a2ps-4.14/ps/base.ps
--- a2ps-4.14/ps/base.ps.euc	2007-12-29 02:58:26.000000000 +0100
+++ a2ps-4.14/ps/base.ps	2008-04-27 10:39:24.000000000 +0200
@@ -153,7 +153,11 @@
 % Return the y size of the current font
 % - => fontsize
 /currentfontsize {
-  currentfont /FontMatrix get 3 get 1000 mul
+  currentfont /FontType get 0 eq {
+    currentfont /FontMatrix get 3 get
+  }{
+    currentfont /FontMatrix get 3 get 1000 mul
+  } ifelse
 } bind def
 
 % reencode the font
@@ -200,6 +204,144 @@
   end 
 } bind def
 
+% composite fonts for ASCII-EUC mixed string
+% Version 1.2 1/31/1990
+% Orignal Ken'ichi HANDA (handa at etl.go.jp)
+% Modified Norio Katayama (katayama at rd.nacsis.ac.jp),1998
+% Extend & Fix Koji Nakamaru (maru at on.cs.keio.ac.jp), 1999
+% Anyone can freely copy, modify, distribute this program.
+
+/copyfont {	% font-dic extra-entry-count  copyfont  font-dic
+	1 index maxlength add dict begin
+	{	1 index /FID ne 2 index /UniqueID ne and
+		{def} {pop pop} ifelse
+	} forall
+	currentdict
+	end
+} bind def
+
+/compositefont { % ASCIIFontName EUCFontName RomanScale RomanOffset Rot(T/F) compositefont font
+    /RomanRotation exch def
+    /RomanOffset exch def
+    /RomanScale exch def
+    userdict /fixeucfont_dict known not {
+	userdict begin
+	    /fixeucfont_dict 2 dict begin
+		/UpperByteEncoding [
+		    16#00 1 16#20 { pop 0 } for
+		    16#21 1 16#28 { 16#20 sub } for
+		    16#29 1 16#2F { pop 0 } for
+		    16#30 1 16#74 { 16#27 sub } for
+		    16#75 1 16#FF { pop 0 } for
+		] def
+	        /LowerByteEncoding [
+		    16#00 1 16#A0 { pop /.notdef } for
+		    16#A1 1 16#FE { 16#80 sub 16 2 string cvrs
+				    (cXX) dup 1 4 -1 roll
+				    putinterval cvn } for
+		    /.notdef
+		] def
+		currentdict
+	    end def
+	end
+    } if
+    findfont dup /FontType get 0 eq {
+	14 dict begin
+	    %
+	    % 7+8 bit EUC font
+	    %
+	    12 dict begin
+		/EUCFont exch def
+		/FontInfo (7+8 bit EUC font) readonly def
+		/PaintType 0 def
+		/FontType 0 def
+		/FontMatrix matrix def
+		% /FontName
+		/Encoding fixeucfont_dict /UpperByteEncoding get def
+		/FMapType 2 def
+		EUCFont /WMode known
+		{ EUCFont /WMode get /WMode exch def }
+		{ /WMode 0 def } ifelse
+		/FDepVector [
+		    EUCFont /FDepVector get 0 get
+		    [ 16#21 1 16#28 {} for 16#30 1 16#74 {} for ]
+		    {
+			13 dict begin
+			    /EUCFont EUCFont def
+			    /UpperByte exch 16#80 add def	
+			    % /FontName
+			    /FontInfo (EUC lower byte font) readonly def
+			    /PaintType 0 def
+			    /FontType 3 def
+			    /FontMatrix matrix def
+			    /FontBBox {0 0 0 0} def
+			    /Encoding
+				fixeucfont_dict /LowerByteEncoding get def
+			    % /UniqueID
+			    % /WMode
+			    /BuildChar {
+				gsave
+				exch dup /EUCFont get setfont
+				/UpperByte get
+				2 string
+				dup 0 4 -1 roll put
+				dup 1 4 -1 roll put
+				dup stringwidth setcharwidth
+				0 0 moveto show
+				grestore
+			    } bind def
+			    currentdict
+			end
+			/lowerbytefont exch definefont
+		    } forall
+		] def
+		currentdict
+	    end
+	    /eucfont exch definefont
+	    exch
+	    findfont 1 copyfont dup begin
+		RomanRotation {
+			/FontMatrix FontMatrix
+			[ 0 RomanScale neg RomanScale 0 RomanOffset neg 0 ]
+			matrix concatmatrix def
+		}{
+			/FontMatrix FontMatrix
+			[ RomanScale 0 0 RomanScale 0 RomanOffset ] matrix concatmatrix
+			def
+			/CDevProc
+			    {pop pop pop pop 0 exch -1000 exch 2 div 880} def
+		} ifelse
+	    end
+	    /asciifont exch definefont
+	    exch
+	    /FDepVector [ 4 2 roll ] def
+	    /FontType 0 def
+	    /WMode 0 def
+	    /FMapType 4 def
+	    /FontMatrix matrix def
+	    /Encoding [0 1] def
+	    /FontBBox {0 0 0 0} def
+%	    /FontHeight 1.0 def % XXXX
+	    /FontHeight RomanScale 1.0 ge { RomanScale }{ 1.0 } ifelse def
+	    /Descent -0.3 def   % XXXX
+	    currentdict
+	end
+	/tmpfont exch definefont
+	pop
+	/tmpfont findfont
+    }{
+	pop findfont 0 copyfont
+    } ifelse
+} def	
+
+/slantfont {	% FontName slant-degree  slantfont  font'
+    exch findfont 1 copyfont begin
+    [ 1 0 4 -1 roll 1 0 0 ] FontMatrix exch matrix concatmatrix
+    /FontMatrix exch def
+    currentdict
+    end
+} def
+
 % Function print line number (<string> # -)
 /# {
   gsave
diff -up /dev/null a2ps-4.14/README.eucJP
--- /dev/null	2008-04-27 11:55:27.307012118 +0200
+++ a2ps-4.14/README.eucJP	2008-04-27 10:39:24.000000000 +0200
@@ -0,0 +1,100 @@
+a2ps euc-jp kanji supported patch:
+by SATO Satoru <ss at gnome.gr.jp>
+
+These patches enables a2ps to support the files written in EUC-JP (and other
+Japanese encodings). I only arranged patches created by FURUKAWA Yasuyuki,
+KATAYAMA Yukio, and replaced libjcode by customized jcode.[ch] (by KITAME
+Takuo).
+
+Notes from the orginal patch by FURUKAWA Yukihiro is follows.
+(sorry, it is written in japanese only):
+
+a2ps 4.12¤Ç´Á»ú¤ò°õºþ¤¹¤ë¤¿¤á¤Î¥Ñ¥Ã¥Á
+				·ÄØæÂç³ØÂç³Ø±¡
+				¸ÅÀî ÂÙÇ· <yasu at on.cs.keio.ac.jp>
+
+composite font ¤ò»È¤Ã¤Æ´Á»ú¤òɽ¼¨¤¹¤ë¤¿¤á¤Î¥Ñ¥Ã¥Á¤Ç¤¹¡£
+composite font¤Ë¤Ï¡¢ÊÒ»³ µªÉפµ¤ó(¤Ï¤¸¤á¤ÆÆüËܸìghostscript¤òºîÀ®¤·¤¿
+¿Í)¤Îfixeucfont ¤ò¥Ù¡¼¥¹¤Ëa2psÍѤË¿¾¯¼ê¤ò¤¤¤ì¤Æ¤ª¤ê¤Þ¤¹¡£¤³¤ì¤òÍøÍѤ¹
+¤ë¤³¤È¤Ç¡¢2¥Ð¥¤¥ÈEUC¡ÜASCII¤Îʸ»úÎó¤ÎPostscript¤Î°·¤¤¤¬¤°¤Ã¤È´Êñ¤Ë¤Ê
+¤ê¤Þ¤¹¡£
+
+¡üComposite¥Õ¥©¥ó¥È¤ÎÀßÄêÊýË¡¤Ë¤Ä¤¤¤Æ
+ºÇÄã¸Â¤ÎÀßÄê¤Ï¥Ñ¥Ã¥Á¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¤Î¤Ç¡¢¤È¤ê¤¢¤¨¤ºÂç¾æÉפÀ¤È¤Ï»×¤¤¤Þ
+¤¹¡£°ì±þ¥á¥â¤·¤Æ¤ª¤­¤Þ¤¹¡£
+
+encoding¥Õ¥¡¥¤¥ë($prefix/share/a2ps/encoding/¤Î²¼¤Î¥Õ¥¡¥¤¥ë)¤Ë¤Ï
+¡ØComposite:¡Ù¤ª¤è¤Ó¡¢¡ØDefaultComposite:¡Ù¤¬¿·¤¿¤Ë»ØÄê¤Ç¤­¤Þ¤¹¡£¤¿¤È
+¤¨¤Ð¡¢±Ñ¸ì¥Õ¥©¥ó¥È¤ËÂбþ¤¹¤ëEUC¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤ÎÆüËܸì¥Õ¥©¥ó¥È¤ò½ñ¤¤
+¤Æ¹Ô¤­¤Þ¤¹¡£¤Þ¤¿¡¢¤³¤ÎºÝ¡¢¥Õ¥©¥ó¥ÈÉý¤ÈȾ³Ñ¤È´Á»ú¤ÎÈæ¤â»ØÄꤷ¤Ê¤¯¤Æ¤Ï¤Ê
+¤ê¤Þ¤»¤ó¡£¼êÈ´¤­¤Ë¤è¤Ã¤Æ¡¢´Á»ú¤Ï¸ÇÄêÉý¥Õ¥©¥ó¥È¤·¤«»ØÄꤷ¤Æ¤Ï¤¤¤±¤Þ¤»¤ó¡£
+
+--------------------------------------------------
+#	                  ÆüËܸì¥Õ¥©¥ó¥È          ¥Õ¥©¥ó²£Éý	Ⱦ³Ñ¤È´Á»ú¤ÎÈæ
+DefaultComposite:         Ryumin-Light-EUC-H      1             1.1	
+#	    ±Ñ¸ì¥Õ¥©¥ó¥È  ÆüËܸì¥Õ¥©¥ó¥È	  ¥Õ¥©¥ó²£Éý	Ⱦ³Ñ¤È´Á»ú¤ÎÈæ
+Composite:  Helvetica     GothicBBB-Medium-EUC-H  1		1.1
+--------------------------------------------------
+
+¤Þ¤¿¡¢¤³¤ì¤À¤È¼ÐÂδÁ»ú¤¬¤Ê¤¯¡¢¤µ¤ß¤·¤¤¤Î¤Ç¡¢SlantFont¤ò»È¤¤¡¢¼ÐÂΤδÁ
+»ú¥Õ¥©¥ó¥È¤âºîÀ®¤Ç¤­¤Þ¤¹¡£
+
+--------------------------------------------------
+#               ¿·µ¬¼ÐÂÎÆüËܸì¥Õ¥©¥ó¥È̾	¥½¡¼¥¹ÆüËܸì¥Õ¥©¥ó¥È	·¹¤­ÅÙ
+SlantFont:	Ryumin-Light-EUC-H-Italic	Ryumin-Light-EUC-H	0.2
+--------------------------------------------------
+
+SlantFont¤ÇÀ¸À®¤·¤¿¼ÐÂÎ¥Õ¥©¥ó¥È¤ÏComposite¥Õ¥©¥ó¥È(Âè2°ú¿ô)¤ÇÍøÍѤǤ­
+¤Þ¤¹¡£
+
+¡ü¤³¤Î¥Ñ¥Ã¥Á¤Î¾ÜºÙ¥Ç¡¼¥¿
+  ¡¦»ÄÇ°¤Ê¤¬¤é2¥Ð¥¤¥ÈEUC¥³¡¼¥É¤òÁ°Äó¤È¤·¤¿¥³¡¼¥Ç¥£¥ó¥°¤ò¤·¤Æ¤¤¤Þ¤¹¡£
+    ¤½¤Î¤¿¤á¡¢¤¢¤Þ¤ê´Á»ú°Ê³°¤Î¸À¸ì¤ò¹Í¤¨¤Æ¤ª¤ê¤Þ¤»¤ó¡Ä¡£
+  ¡¦ÁÒ¸÷ ·¯Ïº»á¤Îlibjcode¤ò»È¤Ã¤ÆÆâÉô¤ÇÆþÎÏ¥Õ¥¡¥¤¥ë¤Î´Á»ú¥¨¥ó¥³¡¼¥Ç¥£
+    ¥ó¥°¤ò¤¹¤Ù¤ÆEUC¤ËÊÑ´¹¤·¤Æ½èÍý¤¹¤ë¤è¤¦¤Ë¤·¤Æ¤¤¤Þ¤¹¡£¤¿¤À¤·¡¢¥ª¥ê¥¸
+    ¥Ê¥ë¤Îlibjcode¤Ï¡¢SJIS¤ª¤è¤ÓEUC¤ÎȽÄ꤬´Å¤«¤Ã¤¿¤Î¤Ç¿¾¯¥«¥¹¥¿¥à¤·
+    ¤Æ¤ª¤ê¤Þ¤¹¡£
+  ¡¦¤Þ¤¿¡¢tex¤Îdelegate(contrib/texi2dvi4a2ps)Ãæ¡¢TeX¥É¥é¥¤¥Ð¤Ë¤ÏpTeX
+    ¤È·è¤á¤¦¤Á¤·¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤¬¤¤¤ä¤Ê¤é¡¢Î㤨¤ÐNTT-jTeX¤ò»ÈÍѤ·¤¿¤¤¾ì
+    ¹ç¡¢´Ä¶­ÊÑ¿ôTEX¤Ë¡Øjtex¡Ù¤ò¡¢LATEX¤Ë¤Ï¡Øjlatex¡Ù¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
+  ¡¦compositefont¤òa2psÍѤË¿¾¯¥«¥¹¥¿¥Þ¥¤¥º¤·¤Æ¤¤¤Þ¤¹¤¬¡¢¥Õ¥©¥ó¥È¤Î¹â
+    ¤µ¤Ê¤É¤Î¾ðÊó¤ò´°Á´¤Ë¸ÇÄê¤Ç·è¤áÂǤÁ¤·¤Æ¤¤¤ë²Õ½ê¤¬¤¢¤ê¤Þ¤¹(XXX¤Ç¥á¥â
+    ¤·¤Æ¤¤¤Þ¤¹)¡£¤½¤Î¤¿¤á¤¢¤Þ¤ê±þÍÑÀ­¤¬Ä㤤¤È»×¤¤¤Þ¤¹¡£
+
+¡üȾ³Ñ¤òÁ´³Ñ¤Î1/2¤ÎÂ礭¤µ¤Ë¤·¤¿¤¤
+¥Ñ¥Ã¥Á¥Ç¥Õ¥©¥ë¥È¤Ç¤ÏÁ´³Ñʸ»ú¤ÈȾ³Ñʸ»ú¤ÎÂ礭¤µ¤Î¥Ð¥é¥ó¥¹¤Ï¡¢¸«¤¿´¶¤¸¤¬
+(¸Ä¿ÍŪ¤Ê¥»¥ó¥¹¤Ç)°ÂÄꤹ¤ë¤è¤¦¤Ë¥Á¥å¡¼¥Ë¥ó¥°¤·¤Æ¤¤¤Þ¤¹¡£¤â¤·¡¢¥Æ¥­¥¹¥È
+¤Çɽ¤òºîÀ®¤·¤Æ¤¤¤Æ¡¢¤½¤Î¤¿¤á¡¢È¾³Ñʸ»ú¤òÁ´³Ñ¤Î¤Á¤ç¤¦¤ÉȾʬ¤Ë¤½¤í¤¨¤¿¤¤
+¤È¤¤¤¦¾ì¹ç¤ÎÂнèÊýË¡¤ò½ñ¤¤¤Æ¤ª¤­¤Þ¤¹¡£
+
+¥¤¥ó¥¹¥È¡¼¥ë¸å¡¢$prefix/share/a2ps/encoding/euc-jpÃæ¤Ë¡¢
+
+--------------------------------------------------
+DefaultComposite:         Ryumin-Light-EUC-H      1.0  1.1
+--------------------------------------------------
+
+¤È¤¤¤¦¤Î¤¬¤¢¤ë¤È»×¤¤¤Þ¤¹¡£ºÇ¸å¤Î¡Ø1.1¡Ù¤ò¡Ø0.8342¡Ù¤¢¤¿¤ê¤ËÊѹ¹¤·¤Æ²¼
+¤µ¤¤¡£¥Î¡¼¥Þ¥ë¸ÇÄêʸ»ú¤Ë´Ø¤·¤Æ¤Ï¤³¤ì¤Ç˾¤ß¤Î·ë²Ì¤¬ÆÀ¤é¤ì¤ë¤È»×¤¤¤Þ¤¹¡£
+
+¾¤ÎÂÀ»ú¥Õ¥©¥ó¥È¤Ê¤É¤â¡¢Î㤨¤Ð
+
+--------------------------------------------------
+Composite: Courier-Bold   GothicBBB-Medium-EUC-H  1.0  0.8342
+--------------------------------------------------
+
+¤Î¤è¤¦¤ËÊѹ¹¤¹¤ì¤Ð¤¤¤¤¤È»×¤¤¤Þ¤¹¡£¤Ê¤ª¡¢Courier¤¬¤Ä¤«¤Ê¤¤¥Õ¥©¥ó¥È
+(HelveticaÅù)¤Ï¤â¤È¤â¤È¥×¥í¥Ý¡¼¥·¥ç¥Ê¥ë¥Õ¥©¥ó¥È¤Ê¤Î¤Ç¡¢¸ÇÄêÉý¤Ë¤Ï¤Ç¤­
+¤Þ¤»¤ó¡£
+
+
+
+¡üºÆÇÛÉۤˤĤ¤¤Æ
+¤Ê¤ó¤À¤«¤ó¤À¤¤¤Ã¤Æ¡¢¤³¤Î¥Ñ¥Ã¥Á¤Ï¡¢
+
+ÁÒ¸÷ ·¯Ïº¤µ¤ó¤Îlibjcode  ¡Ü  ÊÒ»³ µªÉפµ¤ó¤Îfixeucfont 
+
+¤òÁȤ߹ç¤ï¤Æ¤Ç¤­¤¿¤â¤Î¤Ç»ä¼«¿È¤Î¥³¡¼¥É¤Ï¼Â¤Ï¤Û¤È¤ó¤É¤¢¤ê¤Þ¤»¤ó¡Ä¡£
+
+»ä¼«¿È¤Î¥³¡¼¥É¤ÏºÆÇÛÉÕ¡¿²þ¤¤Ë´Ø¤·¤Æ¤Ê¤ó¤éÀ©¸Â¤òÀߤ±¤ë¤Ä¤â¤ê¤Ï¤¢¤ê¤Þ¤»
+¤ó¡£¤¿¤À¤·¡¢»ä°Ê³°¤Î¥³¡¼¥É¤ÎÊý¤¬Â¿¤¤¤¿¤á¡¢°ì±þ¤½¤ì¤À¤±¤Ï¸æλ¾µ¤ª´ê¤¤Ã×
+¤·¤Þ¤¹¡£
diff -up a2ps-4.14/src/buffer.c.euc a2ps-4.14/src/buffer.c
--- a2ps-4.14/src/buffer.c.euc	2007-12-29 02:58:34.000000000 +0100
+++ a2ps-4.14/src/buffer.c	2008-04-27 10:39:24.000000000 +0200
@@ -41,6 +41,21 @@
 #include "argmatch.h"
 #include "buffer.h"
 #include <assert.h>
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef ENABLE_KANJI
+#  include <stdio.h>
+#  include <stdlib.h>
+#  include <string.h>
+#  include <locale.h>
+#  include <errno.h>
+#  include <iconv.h>
+extern use_jcode;
+#endif
+
 
 /****************************************************************/
 /*		 	Handling of the various eol styles	*/
@@ -526,3 +541,278 @@ buffer_test (const char *filename)
   buffer_release (&buffer);
 }
 #endif
+
+/**
+ * from jcode.c by Takuo KITAME <kitame at northeye.org>
+ */
+#ifdef ENABLE_KANJI
+
+enum {
+    JCODE_ASCII,
+    JCODE_EUC,
+    JCODE_JIS,
+    JCODE_SJIS,
+    EUCORSJIS };
+
+#define ESC          0x1b
+#define SS2          0x8e
+
+#define JCODE_LOCALE_EUC   "ja", "ja_JP", "ja_JP.ujis", "ja_JP.EUC", "ja_JP.eucJP"
+#define JCODE_LOCALE_JIS   "ja_JP.JIS", "ja_JP.jis", "ja_JP.iso-2022-jp"
+#define JCODE_LOCALE_SJIS  "ja_JP.SJIS", "ja_JP.sjis"
+
+/****************************************************************************/
+/* Japanese string code detector */
+/****************************************************************************/
+int 
+detect_kanji(unsigned char *str)
+{
+    int expected = JCODE_ASCII;
+    register int c;
+    int c1, c2;
+    int euc_c = 0, sjis_c = 0;
+    unsigned char *ptr = str;
+    
+    while((c = (int)*ptr)!= '\0') {
+        if(c == ESC) {
+            if((c = (int)*(++ptr)) == '\0')
+                break;
+            if(c == '$') {
+                if((c = (int)*(++ptr)) == '\0')
+                    break;
+                if(c == 'B' || c == '@')
+                    return JCODE_JIS;
+            }
+            ptr++;
+            continue;
+        }
+        if((c >= 0x81 && c <= 0x8d) || (c >= 0x8f && c <= 0x9f))
+            return JCODE_SJIS;
+        
+        if(c == SS2) {
+            if((c = (int)*(++ptr)) == '\0')
+                break;
+            if((c >= 0x40 && c <= 0x7e) ||
+               (c >= 0x80 && c <= 0xa0) || 
+               (c >= 0xe0 && c <= 0xfc))
+                return JCODE_SJIS;
+            if(c >= 0xa1 && c <= 0xdf)
+                break;
+            
+            ptr++;
+            continue;
+        }        
+        if(c >= 0xa1 && c <= 0xdf) {
+            if((c = (int)*(++ptr)) == '\0')
+                break;
+            
+            if (c >= 0xe0 && c <= 0xfe)
+                return JCODE_EUC;
+            if (c >= 0xa1 && c <= 0xdf) {
+                expected = EUCORSJIS;
+                ptr++;
+                continue;
+            }
+#if 1
+            if(c == 0xa0 || (0xe0 <= c && c <= 0xfe))
+                return JCODE_EUC;
+            else {
+                expected = EUCORSJIS;
+                ptr++;
+                continue;
+            }
+#else
+            if(c <= 0x9f)
+                return JCODE_SJIS;
+            if(c >= 0xf0 && c <= 0xfe)
+                return JCODE_EUC;
+#endif
+            
+            if(c >= 0xe0 && c <= 0xef) {
+                expected = EUCORSJIS;
+                while(c >= 0x40) {
+                    if(c >= 0x81) {
+                        if(c <= 0x8d || (c >= 0x8f && c <= 0x9f))
+                            return JCODE_SJIS;
+                        else if(c >= 0xfd && c <= 0xfe) {
+                            return JCODE_EUC;
+                        }
+                    }
+                    if((c = (int)*(++ptr)) == '\0')
+                        break;
+                }
+                ptr++;
+                continue;
+            }
+            
+            if(c >= 0xe0 && c <= 0xef) {
+                if((c = (int)*(++ptr)) == '\0')
+                    break;
+                if((c >= 0x40 && c <= 0x7e) || (c >= 0x80 && c <= 0xa0))
+                    return JCODE_SJIS;
+                if(c >= 0xfd && c <= 0xfe)
+                    return JCODE_EUC;
+                if(c >= 0xa1 && c <= 0xfc)
+                    expected = EUCORSJIS;
+            }
+        }
+#if 1
+        if (0xf0 <= c && c <= 0xfe)
+            return JCODE_EUC;
+#endif
+        ptr++;
+    }
+
+   ptr = str;
+   c2 = 0;
+   while((c1 = (int)*ptr++) != '\0') {
+       if(((c2 >  0x80 && c2 < 0xa0) || (c2 >= 0xe0 && c2 < 0xfd)) &&
+          ((c1 >= 0x40 && c1 < 0x7f) || (c1 >= 0x80 && c1 < 0xfd)))
+           sjis_c++, c1 = *ptr++;
+       c2 = c1;
+   }
+   if(sjis_c == 0)
+       expected = JCODE_EUC;
+   else {
+       ptr = str, c2 = 0;
+       while((c1 = (int)*ptr++) != '\0') {
+	     if((c2 > 0xa0  && c2 < 0xff) &&
+            (c1 > 0xa0  && c1 < 0xff))
+             euc_c++, c1 = *ptr++;
+	     c2 = c1;
+       }
+       if(sjis_c > euc_c)
+           expected = JCODE_SJIS;
+       else
+           expected = JCODE_EUC;
+   }
+   return expected;
+}
+
+int
+int_detect_JCode(char *str)
+{
+    int detected;
+
+    if(!str)
+        return 0;
+
+    detected = detect_kanji((unsigned char *)str);
+    
+    if(detected == JCODE_ASCII)
+        return JCODE_ASCII;
+    
+    switch(detected) {
+    case JCODE_EUC:
+        return JCODE_EUC;
+        break;
+    case JCODE_JIS:
+        return JCODE_JIS;
+        break;
+    case JCODE_SJIS:  
+        return JCODE_SJIS;
+        break;
+    default:
+        return JCODE_ASCII;
+        break;
+    }
+    
+    /* not reached */
+    return 0;
+}
+
+const char *
+detect_JCode(char *str)
+{
+    int detected;
+
+    if(!str)
+        return NULL;
+
+    detected = detect_kanji((unsigned char *)str);
+    
+    if(detected == JCODE_ASCII)
+        return "ASCII";
+
+    switch(detected) {
+    case JCODE_EUC:
+        return "EUC-JP";
+        break;
+    case JCODE_JIS:
+        return "ISO-2022-JP";
+        break;
+    case JCODE_SJIS:  
+        return "SJIS";
+        break;
+    default:
+        return "ASCII";
+        break;
+    }
+    
+    /* not reached */
+    return 0;
+}
+
+char *
+kanji_conv_auto(char *str, const char *dstset)
+{
+    unsigned char *buf, *ret;
+    iconv_t cd;
+    size_t insize = 0;
+    size_t outsize = 0;
+    size_t nconv = 0;
+    char *inptr;
+    char *outptr;
+    char srcset[16];
+    
+    if(!str)
+        return NULL;
+    
+    switch (int_detect_JCode(str)) {
+    case JCODE_EUC:
+        strcpy(srcset, "EUC-JP");
+        break;
+    case JCODE_JIS:
+        strcpy(srcset, "ISO-2022-JP");
+        break;
+    case JCODE_SJIS:
+        strcpy(srcset, "SJIS");
+        break;
+    default:
+        return strdup(str);
+        break;
+    }
+    
+    buf = (unsigned char *)malloc(strlen(str)* 4 + 1);
+    if(!buf)
+        return NULL;
+    
+    insize = strlen(str);
+    inptr = str;
+    outsize = strlen(str) * 4 ;
+    outptr = buf;
+    
+    cd = iconv_open(dstset, srcset);
+    if(cd == (iconv_t) -1) {
+        if(errno == EINVAL)
+            return strdup(str);
+    }
+    
+    nconv = iconv(cd, (const char **)&inptr, &insize, &outptr, &outsize);
+    if(nconv == (size_t) -1) {
+        if (errno == EINVAL)
+            memmove (buf, inptr, insize);
+    } else
+        iconv(cd, NULL, NULL, &outptr, &outsize);
+    
+    *outptr = '\0';
+    iconv_close(cd);
+    
+    ret = strdup(buf);
+    free(buf);
+    
+    return ret;
+}
+
+#endif
+
diff -up a2ps-4.14/src/buffer.h.euc a2ps-4.14/src/buffer.h
--- a2ps-4.14/src/buffer.h.euc	2007-12-29 02:58:35.000000000 +0100
+++ a2ps-4.14/src/buffer.h	2008-04-27 10:39:24.000000000 +0200
@@ -104,4 +104,15 @@ void buffer_sample_get PARAMS ((buffer_t
 void buffer_save PARAMS ((buffer_t * buffer, const char * filename));
 
 #define buffer_is_empty(Buf) (Buf->curr >= Buf->len)
+
+
+/**
+ * from jcode.h by Takuo KITAME
+ */
+
+char *kanji_conv_auto(char *str, const char *dstset);
+
+const char *detect_JCode(char *str);
+int int_detect_JCode(char *str);
+
 #endif
diff -up a2ps-4.14/src/Makefile.am.euc a2ps-4.14/src/Makefile.am
--- a2ps-4.14/src/Makefile.am.euc	2007-12-29 02:36:09.000000000 +0100
+++ a2ps-4.14/src/Makefile.am	2008-04-27 10:39:24.000000000 +0200
@@ -33,13 +33,13 @@ DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/l
 a2ps_SOURCES = main.c \
 read.c sshread.c ssheet.c select.c generate.c 			\
 delegate.c regex.c buffer.c versions.c ffaces.c			\
-version-etc.c long-options.c					\
+version-etc.c long-options.c jcode.c				\
 parsessh.y lexssh.l lexps.l sheets-map.l
 
 noinst_HEADERS = main.h \
 read.h sshread.h ssheet.h select.h generate.h			\
 delegate.h regex.h buffer.h versions.h ffaces.h			\
-version-etc.h long-options.h					\
+version-etc.h long-options.h jcode.h				\
 yy2ssh.h lexps.h
 
 BUILT_SOURCES = parsessh.c parsessh.h

a2ps-4.13-conf.patch:

Index: a2ps-4.13-conf.patch
===================================================================
RCS file: /cvs/extras/rpms/a2ps/devel/a2ps-4.13-conf.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- a2ps-4.13-conf.patch	19 Nov 2005 03:22:25 -0000	1.4
+++ a2ps-4.13-conf.patch	1 May 2008 14:07:24 -0000	1.5
@@ -1,7 +1,8 @@
---- a2ps-4.13/configure.config	Wed Feb  9 09:32:31 2000
-+++ a2ps-4.13/configure	Thu Apr 27 19:56:05 2000
-@@ -8433,9 +8433,13 @@
- echo "configure:8434: checking for PostScript fonts path" 1>&5
+diff -up a2ps-4.14/configure.conf a2ps-4.14/configure
+--- a2ps-4.14/configure.conf	2008-04-27 01:01:04.000000000 +0200
++++ a2ps-4.14/configure	2008-04-27 01:04:12.000000000 +0200
+@@ -30758,9 +30758,13 @@ fi
+ echo $ECHO_N "checking for PostScript fonts path... $ECHO_C" >&6; }
  # Try to find some PostScript fonts.
  # Find out if ghostscript is installed
 +# for ac_dir in /usr/local/ghostscript/fonts \
@@ -11,14 +12,15 @@
 -  /usr/local/share/ghostscript/fonts;
 +for ac_dir in /usr/share/fonts/default/Type1 \
 +    /usr/share/fonts/default/ghostscript \
-+    /usr/share/fonts/afms/adobe \
-+    /usr/share/X11/fonts/Type1 ;
++    /usr/share/X11/fonts/Type1 \
++    /usr/share/fonts/culmus ;
  do
    if test "cd $ac_dir 2>/dev/null && echo *.afm"; then
      ac_psfont_path="$ac_psfont_path:$ac_dir";
---- a2ps-4.13/configure.in.conf	2000-02-24 17:53:03.000000000 +0000
-+++ a2ps-4.13/configure.in	2004-12-09 16:25:14.984961138 +0000
-@@ -197,8 +197,10 @@
+diff -up a2ps-4.14/configure.in.conf a2ps-4.14/configure.in
+--- a2ps-4.14/configure.in.conf	2008-04-27 01:00:54.000000000 +0200
++++ a2ps-4.14/configure.in	2008-04-27 01:03:52.000000000 +0200
+@@ -207,8 +207,10 @@ AC_MSG_CHECKING(for PostScript fonts pat
  # Try to find some PostScript fonts.
  # Find out if ghostscript is installed
  ac_psfont_path=
@@ -26,8 +28,8 @@
 -  /usr/local/share/ghostscript/fonts;
 +for ac_dir in /usr/share/fonts/default/Type1 \
 +    /usr/share/fonts/default/ghostscript \
-+    /usr/share/fonts/afms/adobe \
-+    /usr/share/X11/fonts/Type1 ;
++    /usr/share/X11/fonts/Type1 \
++    /usr/share/fonts/culmus ;
  do
    if test "cd $ac_dir 2>/dev/null && echo *.afm"; then
      ac_psfont_path="$ac_psfont_path:$ac_dir";

a2ps-4.13-etc.patch:

Index: a2ps-4.13-etc.patch
===================================================================
RCS file: /cvs/extras/rpms/a2ps/devel/a2ps-4.13-etc.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- a2ps-4.13-etc.patch	9 Mar 2007 12:34:21 -0000	1.2
+++ a2ps-4.13-etc.patch	1 May 2008 14:07:24 -0000	1.3
@@ -1,15 +1,27 @@
---- a2ps-4.13/etc/Makefile.in.etc	Wed Feb  9 09:32:55 2000
-+++ a2ps-4.13/etc/Makefile.in	Thu Apr 27 22:45:03 2000
-@@ -132,7 +132,7 @@
+diff -up a2ps-4.14/etc/a2ps_cfg.in.etc a2ps-4.14/etc/a2ps_cfg.in
+--- a2ps-4.14/etc/a2ps_cfg.in.etc	2007-12-29 02:38:58.000000000 +0100
++++ a2ps-4.14/etc/a2ps_cfg.in	2008-04-27 01:27:55.000000000 +0200
+@@ -73,6 +73,7 @@ LibraryPath: @libpath@
+ # It may be useful to extend it so that a2ps can see some
+ # TeX or X11 resources: it likes AFM files and PF[AB] files.
+ #AppendLibraryPath: foo
++AppendLibraryPath: @apppath@
  
  
- ogonkifydir = $(datadir)/ogonkify
+ #################################################################
+diff -up a2ps-4.14/etc/Makefile.am.etc a2ps-4.14/etc/Makefile.am
+--- a2ps-4.14/etc/Makefile.am.etc	2002-07-19 14:07:27.000000000 +0200
++++ a2ps-4.14/etc/Makefile.am	2008-04-27 01:27:55.000000000 +0200
+@@ -2,7 +2,7 @@
+ ## Makefile for a2ps' etc library directory.
+ 
+ ogonkifydir=$(datadir)/ogonkify
 -libpath = $(pkgdatadir)/sheets:$(pkgdatadir)/ps:$(pkgdatadir)/encoding:$(pkgdatadir)/afm:$(ogonkifydir)/afm:$(pkgdatadir)/ppd:$(pkgdatadir)/fonts:$(ogonkifydir)/fonts:$(pkgdatadir)
 +libpath = $(sysconfdir)/$(PACKAGE):$(pkgdatadir)/sheets:$(pkgdatadir)/ps:$(pkgdatadir)/encoding:$(pkgdatadir)/afm:$(ogonkifydir)/afm:$(pkgdatadir)/ppd:$(pkgdatadir)/fonts:$(ogonkifydir)/fonts:$(pkgdatadir)
  
  pkgdata_DATA = README
  
-@@ -297,7 +297,9 @@
+@@ -40,7 +40,9 @@ DISTCLEANFILES = a2ps.cfg README
  
  # Building the correct a2ps.cfg
  a2ps.cfg: a2ps_cfg Makefile
@@ -20,18 +32,19 @@
  
  # Building a time stamp to know the version.
  README: README.in Makefile
---- a2ps-4.13/etc/Makefile.am.etc	1999-11-30 09:20:09.000000000 +0100
-+++ a2ps-4.13/etc/Makefile.am	2007-03-09 11:05:43.000000000 +0100
-@@ -2,7 +2,7 @@
- ## Makefile for a2ps' etc library directory.
- 
- ogonkifydir=$(datadir)/ogonkify
+diff -up a2ps-4.14/etc/Makefile.in.etc a2ps-4.14/etc/Makefile.in
+--- a2ps-4.14/etc/Makefile.in.etc	2007-12-29 04:28:07.000000000 +0100
++++ a2ps-4.14/etc/Makefile.in	2008-04-27 01:30:55.000000000 +0200
+@@ -262,7 +262,7 @@ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+ tex = @tex@
+ ogonkifydir = $(datadir)/ogonkify
 -libpath = $(pkgdatadir)/sheets:$(pkgdatadir)/ps:$(pkgdatadir)/encoding:$(pkgdatadir)/afm:$(ogonkifydir)/afm:$(pkgdatadir)/ppd:$(pkgdatadir)/fonts:$(ogonkifydir)/fonts:$(pkgdatadir)
 +libpath = $(sysconfdir)/$(PACKAGE):$(pkgdatadir)/sheets:$(pkgdatadir)/ps:$(pkgdatadir)/encoding:$(pkgdatadir)/afm:$(ogonkifydir)/afm:$(pkgdatadir)/ppd:$(pkgdatadir)/fonts:$(ogonkifydir)/fonts:$(pkgdatadir)
- 
  pkgdata_DATA = README
- 
-@@ -40,7 +40,9 @@
+ dsysconf = $(DESTDIR)$(sysconfdir)
+ EXTRA_DIST = README.in
+@@ -482,7 +482,9 @@ uninstall-local:
  
  # Building the correct a2ps.cfg
  a2ps.cfg: a2ps_cfg Makefile
@@ -42,13 +55,5 @@
  
  # Building a time stamp to know the version.
  README: README.in Makefile
---- a2ps-4.13/etc/a2ps_cfg.in.etc	Tue Feb  8 03:24:03 2000
-+++ a2ps-4.13/etc/a2ps_cfg.in	Thu Apr 27 20:49:04 2000
-@@ -73,6 +73,7 @@
- # It may be useful to extend it so that a2ps can see some
- # TeX or X11 resources: it likes AFM files and PF[AB] files.
- #AppendLibraryPath: foo
-+AppendLibraryPath: @apppath@
- 
- 
- #################################################################
+diff -up a2ps-4.14/Makefile.am.etc a2ps-4.14/Makefile.am
+diff -up a2ps-4.14/Makefile.in.etc a2ps-4.14/Makefile.in

a2ps-4.13-euckr.patch:

Index: a2ps-4.13-euckr.patch
===================================================================
RCS file: /cvs/extras/rpms/a2ps/devel/a2ps-4.13-euckr.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- a2ps-4.13-euckr.patch	9 Sep 2004 02:52:29 -0000	1.1
+++ a2ps-4.13-euckr.patch	1 May 2008 14:07:24 -0000	1.2
@@ -1,27 +1,22 @@
---- a2ps-4.13/encoding/Makefile.am.orig	2003-01-09 17:45:41.000000000 +0900
-+++ a2ps-4.13/encoding/Makefile.am	2003-01-09 17:45:50.000000000 +0900
-@@ -16,7 +16,7 @@
- minor_encodings = \
- ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf	\
- iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf	\
--iso15.edf koi8.edf euc-jp.edf
-+iso15.edf koi8.edf euc-jp.edf euc-kr.edf
- 
- if EXTENSIONS
- encodings_DATA = encoding.map $(major_encodings) $(minor_encodings)
---- a2ps-4.13/encoding/Makefile.in.orig	2003-01-09 17:46:09.000000000 +0900
-+++ a2ps-4.13/encoding/Makefile.in	2003-01-09 17:46:14.000000000 +0900
-@@ -141,7 +141,7 @@
- minor_encodings = \
- ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf	\
- iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf	\
--iso15.edf koi8.edf euc-jp.edf
-+iso15.edf koi8.edf euc-jp.edf euc-kr.edf
+diff -up a2ps-4.14/encoding/encoding.map.euckr a2ps-4.14/encoding/encoding.map
+--- a2ps-4.14/encoding/encoding.map.euckr	2008-04-27 01:46:59.000000000 +0200
++++ a2ps-4.14/encoding/encoding.map	2008-04-27 01:46:59.000000000 +0200
+@@ -100,6 +100,12 @@ japanese		euc-jp
+ ja			euc-jp
+ jp			euc-jp
  
- @EXTENSIONS_TRUE at encodings_DATA = @EXTENSIONS_TRUE at encoding.map $(major_encodings) $(minor_encodings)
- @EXTENSIONS_FALSE at encodings_DATA = @EXTENSIONS_FALSE at encoding.map $(major_encodings)
---- a2ps-4.13/encoding/euc-kr.edf.orig	2003-01-09 17:46:22.000000000 +0900
-+++ a2ps-4.13/encoding/euc-kr.edf	2003-01-09 17:47:34.000000000 +0900
++euc-kr			euc-kr
++euc-kr			euc-kr
++korean			euc-kr
++ko			euc-kr
++kr			euc-kr
++
+ ########################################################################
+ # Some architectures specific char sets
+ ########################################################################
+diff -up /dev/null a2ps-4.14/encoding/euc-kr.edf
+--- /dev/null	2008-04-26 20:48:40.298012400 +0200
++++ a2ps-4.14/encoding/euc-kr.edf	2008-04-27 01:46:59.000000000 +0200
 @@ -0,0 +1,104 @@
 +# Description of the EUC-KR encoding
 +# Copyright (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
@@ -127,18 +122,27 @@
 +egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis
 +eth ntilde ograve oacute ocircumflex otilde odieresis divide
 +oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis
---- a2ps-4.13/encoding/encoding.map.orig	2003-01-09 17:46:50.000000000 +0900
-+++ a2ps-4.13/encoding/encoding.map	2003-01-09 17:46:57.000000000 +0900
-@@ -100,6 +100,12 @@
- ja			euc-jp
- jp			euc-jp
+diff -up a2ps-4.14/encoding/Makefile.am.euckr a2ps-4.14/encoding/Makefile.am
+--- a2ps-4.14/encoding/Makefile.am.euckr	2008-04-27 01:46:59.000000000 +0200
++++ a2ps-4.14/encoding/Makefile.am	2008-04-27 01:47:58.000000000 +0200
+@@ -16,7 +16,7 @@ major_encodings = ascii.edf iso1.edf
+ minor_encodings = \
+ ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf	\
+ iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf	\
+-iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf
++iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf euc-kr.edf
  
-+euc-kr			euc-kr
-+euc-kr			euc-kr
-+korean			euc-kr
-+ko			euc-kr
-+kr			euc-kr
-+
- ########################################################################
- # Some architectures specific char sets
- ########################################################################
+ if EXTENSIONS
+ encodings_DATA = encoding.map $(major_encodings) $(minor_encodings)
+diff -up a2ps-4.14/encoding/Makefile.in.euckr a2ps-4.14/encoding/Makefile.in
+--- a2ps-4.14/encoding/Makefile.in.euckr	2008-04-27 01:46:59.000000000 +0200
++++ a2ps-4.14/encoding/Makefile.in	2008-04-27 01:48:09.000000000 +0200
+@@ -270,7 +270,7 @@ major_encodings = ascii.edf iso1.edf
+ minor_encodings = \
+ ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf	\
+ iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf	\
+-iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf
++iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf euc-kr.edf
+ 
+ @EXTENSIONS_FALSE at encodings_DATA = encoding.map $(major_encodings)
+ @EXTENSIONS_TRUE at encodings_DATA = encoding.map $(major_encodings) $(minor_encodings)

a2ps-4.13-hebrew.patch:

Index: a2ps-4.13-hebrew.patch
===================================================================
RCS file: /cvs/extras/rpms/a2ps/devel/a2ps-4.13-hebrew.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- a2ps-4.13-hebrew.patch	13 Jul 2007 15:43:49 -0000	1.5
+++ a2ps-4.13-hebrew.patch	1 May 2008 14:07:24 -0000	1.6
@@ -1,18 +1,19 @@
---- a2ps-4.13/configure.hebrew	2004-01-09 15:29:44.000000000 +0200
-+++ a2ps-4.13/configure	2004-01-09 15:44:14.000000000 +0200
-@@ -8454,7 +8454,9 @@
- for ac_dir in /usr/share/fonts/default/Type1 \
-     /usr/share/fonts/default/ghostscript \
-     /usr/share/fonts/afms/adobe \
--    /usr/share/X11/fonts/Type1 ;
-+    /usr/share/X11/fonts/Type1 \
-+    /usr/share/fonts/hebrew \
-+    /usr/share/fonts/he/Type1 ;
- do
-   if test "cd $ac_dir 2>/dev/null && echo *.afm"; then
-     ac_psfont_path="$ac_psfont_path:$ac_dir";
---- a2ps-4.13/encoding/iso8.edf.hebrew	2004-01-09 15:44:03.000000000 +0200
-+++ a2ps-4.13/encoding/iso8.edf	2004-01-09 15:44:03.000000000 +0200
+diff -up a2ps-4.14/encoding/encoding.map.hebrew a2ps-4.14/encoding/encoding.map
+--- a2ps-4.14/encoding/encoding.map.hebrew	2008-04-27 01:50:14.000000000 +0200
++++ a2ps-4.14/encoding/encoding.map	2008-04-27 01:50:14.000000000 +0200
+@@ -65,6 +65,9 @@ iso-8859-5		iso5
+ iso7			iso7
+ iso-8859-7		iso7
+ 
++iso8			iso8
++iso-8859-8		iso8
++
+ # The following lines _are_not_an_error_.
+ # This is the right correspondance between ISO-8859 names
+ # and the Latin n nick name.
+diff -up /dev/null a2ps-4.14/encoding/iso8.edf
+--- /dev/null	2008-04-26 20:48:40.298012400 +0200
++++ a2ps-4.14/encoding/iso8.edf	2008-04-27 01:50:14.000000000 +0200
 @@ -0,0 +1,77 @@
 +# Description of the ISO-8859-8 encoding
 +# Copyright (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
@@ -91,41 +92,27 @@
 +afii57672 afii57673 afii57674 afii57675 afii57676 afii57677 afii57678 afii57679 
 +afii57680 afii57681 afii57682 afii57683 afii57684 afii57685 afii57686 afii57687 
 +afii57688 afii57689 afii57690 .notdef .notdef .notdef .notdef .notdef 
---- a2ps-4.13/encoding/encoding.map.hebrew
-+++ a2ps-4.13/encoding/encoding.map
-@@ -65,6 +65,9 @@
- iso7			iso7
- iso-8859-7		iso7
+diff -up a2ps-4.14/encoding/Makefile.am.hebrew a2ps-4.14/encoding/Makefile.am
+--- a2ps-4.14/encoding/Makefile.am.hebrew	2008-04-27 01:51:14.000000000 +0200
++++ a2ps-4.14/encoding/Makefile.am	2008-04-27 01:52:11.000000000 +0200
+@@ -15,7 +15,7 @@ encodingsdir = $(pkgdatadir)/encoding
+ major_encodings = ascii.edf iso1.edf
+ minor_encodings = \
+ ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf	\
+-iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf	\
++iso3.edf iso4.edf iso5.edf iso7.edf iso8.edf iso9.edf iso10.edf iso13.edf	\
+ iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf euc-kr.edf
  
-+iso8			iso8
-+iso-8859-8		iso8
-+
- # The following lines _are_not_an_error_.
- # This is the right correspondance between ISO-8859 names
- # and the Latin n nick name.
---- a2ps-4.13/encoding/Makefile.in.hebrew
-+++ a2ps-4.13/encoding/Makefile.in
-@@ -140,8 +140,8 @@
+ if EXTENSIONS
+diff -up a2ps-4.14/encoding/Makefile.in.hebrew a2ps-4.14/encoding/Makefile.in
+--- a2ps-4.14/encoding/Makefile.in.hebrew	2008-04-27 01:50:14.000000000 +0200
++++ a2ps-4.14/encoding/Makefile.in	2008-04-27 01:52:01.000000000 +0200
+@@ -269,7 +269,7 @@ encodingsdir = $(pkgdatadir)/encoding
  major_encodings = ascii.edf iso1.edf
  minor_encodings = \
  ms-cp1250.edf hp.edf mac.edf ibm-cp437.edf ibm-cp850.edf iso2.edf	\
 -iso3.edf iso4.edf iso5.edf iso7.edf iso9.edf iso10.edf iso13.edf	\
--iso15.edf koi8.edf euc-jp.edf euc-kr.edf
-+iso3.edf iso4.edf iso5.edf iso7.edf iso8.edf iso9.edf iso10.edf	\
-+iso13.edf iso15.edf koi8.edf euc-jp.edf euc-kr.edf
++iso3.edf iso4.edf iso5.edf iso7.edf iso8.edf iso9.edf iso10.edf iso13.edf	\
+ iso15.edf koi8.edf ms-cp1251.edf euc-jp.edf euc-kr.edf
  
- @EXTENSIONS_TRUE at encodings_DATA = @EXTENSIONS_TRUE at encoding.map $(major_encodings) $(minor_encodings)
- @EXTENSIONS_FALSE at encodings_DATA = @EXTENSIONS_FALSE at encoding.map $(major_encodings)
---- a2ps-4.13/configure.in.hebrew	2007-01-22 18:19:04.000000000 +0000
-+++ a2ps-4.13/configure.in	2007-01-22 18:19:16.000000000 +0000
-@@ -200,7 +200,9 @@
- for ac_dir in /usr/share/fonts/default/Type1 \
-     /usr/share/fonts/default/ghostscript \
-     /usr/share/fonts/afms/adobe \
--    /usr/share/X11/fonts/Type1 ;
-+    /usr/share/X11/fonts/Type1 \
-+    /usr/share/fonts/hebrew \
-+    /usr/share/fonts/he/Type1 ;
- do
-   if test "cd $ac_dir 2>/dev/null && echo *.afm"; then
-     ac_psfont_path="$ac_psfont_path:$ac_dir";
+ @EXTENSIONS_FALSE at encodings_DATA = encoding.map $(major_encodings)


Index: a2ps.spec
===================================================================
RCS file: /cvs/extras/rpms/a2ps/devel/a2ps.spec,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- a2ps.spec	13 Feb 2008 10:40:38 -0000	1.82
+++ a2ps.spec	1 May 2008 14:07:24 -0000	1.83
@@ -12,31 +12,24 @@
 
 Summary: Converts text and other types of files to PostScript(TM)
 Name: a2ps
-Version: 4.13b
-Release: 71%{?dist}
-License: GPLv2+
+Version: 4.14
+Release: 1%{?dist}
+License: GPLv3+
 Group: Applications/Publishing
-#Source0: ftp://ftp.enst.fr/pub/unix/a2ps/%{name}-%{version}.tar.gz 
-Source0: %{name}-%{version}-GPL.tar.gz 
+Source0: http://ftp.gnu.org/gnu/a2ps/%{name}-%{version}.tar.gz
 Source1: ftp://ftp.enst.fr/pub/unix/a2ps/i18n-fonts-0.1.tar.gz
-# a2ps contains code that we cannot ship due to its license.
-# Therefore we use this script to remove the code in question before
-# shipping it. Download the upstream tarball and invoke this script
-# while in the same directory as the tarball:
-# ./generate-tarball.sh 4.13b
-Source2: a2ps-generate-tarball.sh
 Patch0: a2ps-4.13-conf.patch
 Patch1: a2ps-4.13-etc.patch
-Patch2: a2ps-4.13-flex.patch
+#Patch2: a2ps-4.13-flex.patch
 Patch3: a2ps-4.13-security.patch
 Patch4: a2ps-4.13-glibcpaper.patch
-Patch5: a2ps-4.13-varargs.patch
-Patch6: a2ps-tmpdir.patch
+#Patch5: a2ps-4.13-varargs.patch
+#Patch6: a2ps-tmpdir.patch
 Patch7: a2ps-sort.patch
 Patch8: a2ps-iso5-minus.patch
 Patch9: a2ps-perl.patch
 # EUC-JP support
-Patch10: a2ps-4.13-eucjp.patch.bz2
+Patch10: a2ps-4.13-eucjp.patch
 Patch11: a2ps-4.13-autoenc.patch
 Patch12: a2ps-4.13b-attr.patch
 Patch13: a2ps-4.13b-numeric.patch
@@ -44,17 +37,17 @@
 Patch15: a2ps-4.13b-tilde.patch
 Patch17: a2ps-4.13-euckr.patch
 Patch18: a2ps-4.13-gnusource.patch
-Patch19: a2ps-4.13-bison.patch
+#Patch19: a2ps-4.13-bison.patch
 Patch20: a2ps-4.13-hebrew.patch
-Patch21: a2ps-4.13-malloc.patch
-Patch22: a2ps-shell.patch
-Patch23: a2ps-includes.patch
-Patch24: a2ps-underquoted.patch
+#Patch21: a2ps-4.13-malloc.patch
+#Patch22: a2ps-shell.patch
+#Patch23: a2ps-includes.patch
+#Patch24: a2ps-underquoted.patch
 Patch26: a2ps-make-fonts-map.patch
-Patch27: a2ps-netscape.patch
+#Patch27: a2ps-netscape.patch
 Patch28: a2ps-wdiff.patch
 Patch29: a2ps-U.patch
-Patch30: a2ps-psset.patch
+#Patch30: a2ps-psset.patch
 Patch31: a2ps-mb.patch
 Patch34: a2ps-external-libtool.patch
 Requires: fileutils sh-utils info
@@ -63,18 +56,21 @@
 BuildRequires: groff-perl
 BuildRequires: cups
 BuildRequires: gettext, bison
-BuildRequires: psutils, tetex-dvips, texinfo, tetex-latex
-# Uncomment this after Extras merge:
+BuildRequires: psutils, tetex-dvips, texinfo, tetex-latex, html2ps
+# instead of gv, xdg-open should certainly be used
 #BuildRequires: gv
-Url: http://www.inf.enst.fr/~demaille/a2ps/
+Url: http://www.gnu.org/software/a2ps/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: psutils, ImageMagick, texinfo-tex, gzip, bzip2, groff-perl
-Requires: tetex-dvips, tetex-latex, tetex-fonts, file
+Requires: tetex-dvips, tetex-latex, tetex-fonts, file, html2ps
+# for hebrew support, path set. 
+# culmus-fonts
+# And certainly other font sets for other languages may be needed
 Requires(post): coreutils
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
 Obsoletes: a2ps-i18n <= 0.1-1
-Provides: a2ps-i18n = 0.1-1
+Provides: a2ps-i18n = 0.1-2
 
 
 %package -n emacs-%{name}
@@ -108,18 +104,19 @@
 
 
 %prep
-%setup -q -n %{name}-4.13 -a 1
+%setup -q -a 1
 
-# use __timestamp_configure.in to hold the configure.in timestamp
-touch -r configure.in __timestamp_configure.in
+# use fedora postscript font paths
+%patch0 -p1 -b .conf
 
-%patch0 -p1
-%patch1 -p1 -b .etc
-%patch2 -p1
+# add /etc/a2ps in directories searched for config files
+%patch1 -p1 -b .etc 
+
+#%patch2 -p1
 %patch3 -p1 -b .security
 %patch4 -p1 -b .glibcpaper
-%patch5 -p1
-%patch6 -p1 -b .tmpdir
+#%patch5 -p1
+#%patch6 -p1 -b .tmpdir
 %patch7 -p1 -b .sort
 %patch8 -p1 -b .iso5-minus
 %patch9 -p1 -b .perl
@@ -144,22 +141,22 @@
 %patch18 -p1 -b .gnusource
 
 # Fix problems in .y file spotted by stricter bison.
-%patch19 -p1 -b .bison
+#%patch19 -p1 -b .bison
 
 # Hebrew support (bug #113191).
 %patch20 -p1 -b .hebrew
 
 # Prevent "error: conflicting types for 'malloc'".
-%patch21 -p1 -b .malloc
+#%patch21 -p1 -b .malloc
 
 # Use environment variable to pass filenames to shell (bug #128647).
-%patch22 -p1 -b .shell
+#%patch22 -p1 -b .shell
 
 # Apply patch from bug #122699 to fix "too many includes" error.
-%patch23 -p1 -b .includes
+#%patch23 -p1 -b .includes
 
 # Fixed m4 files.
-%patch24 -p1 -b .underquoted
+#%patch24 -p1 -b .underquoted
 
 # Use external libtool (bug #225235).
 %patch34 -p1 -b .external-libtool
@@ -169,7 +166,7 @@
 %patch26 -p1 -b .make-fonts-map
 
 # Don't try to run netscape.  Run mozilla instead (bug #121393).
-%patch27 -p1 -b .netscape
+#%patch27 -p1 -b .netscape
 
 # Make pdiff default to not requiring wdiff (bug #68537).
 %patch28 -p1 -b .wdiff
@@ -178,11 +175,17 @@
 %patch29 -p1 -b .U
 
 # Fixed psset sed expression (bug #209613).
-%patch30 -p1 -b .psset
+#%patch30 -p1 -b .psset
 
 # Fixed multibyte handling (bug #212154).
 %patch31 -p1 -b .mb
 
+for file in AUTHORS ChangeLog; do
+  iconv -f latin1 -t UTF-8 < $file > $file.utf8
+  touch -c -r $file $file.utf8
+  mv $file.utf8 $file
+done
+
 mv doc/encoding.texi doc/encoding.texi.utf8
 iconv -f KOI-8 -t UTF-8 doc/encoding.texi.utf8 -o doc/encoding.texi
 
@@ -192,22 +195,23 @@
 chmod -x lib/basename.c lib/xmalloc.c
 
 # restore timestamps of patched files
-touch -r __timestamp_configure.in configure.in
-rm __timestamp_configure.in
-touch -r config.h.in.euc config.h.in
-touch -r configure.orig configure Makefile.in
-touch -r src/Makefile.am.euc src/Makefile.am
-touch -r etc/Makefile.am.etc etc/Makefile.am
-touch -r fonts/Makefile.in src/Makefile.in etc/Makefile.in lib/Makefile.in
+touch -c -r configure.in.conf configure.in
+touch -c -r config.h.in.euc config.h.in
+touch -c -r configure.conf configure
+touch -c -r src/Makefile.am.euc src/Makefile.am
+touch -c -r etc/Makefile.am.etc etc/Makefile.am
+#touch -c -r fonts/Makefile.in src/Makefile.in lib/Makefile.in
+touch -c -r etc/Makefile.in.etc etc/Makefile.in
+
+chmod 644 encoding/iso8.edf.hebrew
+chmod 644 encoding/euc-kr.edf.euckr
 
 %build
 # preset the date in README.in to avoid the timestamp of the build time
 sed -e "s!@date@!`date -r NEWS`!" etc/README.in > etc/README.in.tmp
-touch -r etc/README.in etc/README.in.tmp
+touch -c -r etc/README.in etc/README.in.tmp
 mv etc/README.in.tmp etc/README.in
 
-chmod 644 {po/ja.po,encoding/euc-jp.edf,README.eucJP}.euc
-chmod 644 encoding/euc-kr.edf.euckr
 EMACS=emacs %configure \
   --with-medium=_glibc \
   --enable-kanji
@@ -217,15 +221,15 @@
 # force rebuilding scanners by flex - patched or not
 find src lib -name '*.l' -exec touch {} \;
 # these scanners use 'lineno' - incompatible with -CFe flex flags
-(
-    cd src
-    /bin/sh ../auxdir/ylwrap "flex" sheets-map.l lex.yy.c sheets-map.c --
-    /bin/sh ../auxdir/ylwrap "flex" lexssh.l lex.yy.c lexssh.c --
-    cd ../lib
-    /bin/sh ../auxdir/ylwrap "flex" lexppd.l lex.yy.c lexppd.c --
-)
+#(
+#    cd src
+#    /bin/sh ../auxdir/ylwrap "flex" sheets-map.l lex.yy.c sheets-map.c --
+#    /bin/sh ../auxdir/ylwrap "flex" lexssh.l lex.yy.c lexssh.c --
+#    cd ../lib
+#    /bin/sh ../auxdir/ylwrap "flex" lexppd.l lex.yy.c lexppd.c --
+#)
 
-make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
+make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
@@ -245,8 +249,8 @@
 popd
 
 # Don't ship the library file or header (bug #203536).
-rm -f %{buildroot}%{_libdir}/*.{so,a,la}
-rm -f %{buildroot}%{_includedir}/*
+rm %{buildroot}%{_libdir}/*.{so,a,la}
+rm %{buildroot}%{_includedir}/*
 
 rm -f %{buildroot}%{_infodir}/dir
 
@@ -312,6 +316,11 @@
 %{emacs_lispdir}/*.el
 
 %changelog
+* Sun Apr 27 2008 Patrice Dumas <pertusus at free.fr> 4.14-1
+- update to 4.14
+- don't obsolete the provided version of a2ps-i18n
+- use html2ps for the html delegation
+
 * Tue Feb 12 2008 Patrice Dumas <pertusus at free.fr> 4.13b-71
 - use a predictable stamp inside the etc/README file
 - follow emacs packaging guidelines


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/a2ps/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	9 Mar 2007 12:47:36 -0000	1.3
+++ sources	1 May 2008 14:07:24 -0000	1.4
@@ -1,3 +1,2 @@
-8e6a684611da92c9de2a42e7803aa8f0  a2ps-4.13-eucjp.patch.bz2
+781ac3d9b213fa3e1ed0d79f986dc8c7  a2ps-4.14.tar.gz
 fee1456d0e6e94af4fc5b5a1bb9687b7  i18n-fonts-0.1.tar.gz
-4c7efbbbb03558e3c900d2b3b4e3fbf0  a2ps-4.13b-GPL.tar.gz




More information about the scm-commits mailing list