a2ps-ja stable port information

Package: a2ps-ja
Version: 4.13c
Revision: 6
Description: Any to PostScript filter with Japanese extension
License: GPL
Maintainer: Todai Fink Team
Depends: psutils-a4 | psutils, libgettext3-shlibs, libiconv, libpaper1-shlibs
BuildDepends: fink (>= 0.24.12), libgettext3-dev, gettext-tools, gperf (>= 2.7.2-1), libiconv-dev, libpaper1-dev, texinfo
Conflicts: a2ps
Replaces: a2ps
Suggests: bzip2, emacsen, imagemagick, ptex3-base, wdiff, ghostscript | ghostscript-nox
#Source: gnu
Source: ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO/distfiles/a2ps-%v.tar.gz
Source-MD5: 97164e84ba911e4604155507e0893669
SourceDirectory: a2ps-4.13
Source2: http://www.on.cs.keio.ac.jp/~yasu/linux/GNU/a2ps-4.13-ja_nls.patch
Source2-MD5: 75820c89316d271519e8c5a18c479c1e
Source3: ftp://ftp.riken.go.jp/pub/Linux/gentoo/app-text/a2ps/files/a2ps-4.13-select-freebsd.patch
Source3-MD5: b62538dbd828d995bdc3ce36188b0768
Source4: ftp://ftp.riken.go.jp/pub/Linux/gentoo/app-text/a2ps/files/a2ps-%v-fixps.patch
Source4-MD5: df6bc895cc6fb0fd47f22fd1c36d1ed3
Source5: ftp://ftp.riken.go.jp/pub/Linux/gentoo/app-text/a2ps/files/a2ps-%v-psmandup.diff
Source5-MD5: d68d0bfab547ef1ce70576c7a5570f13
PatchFile: %n.patch
PatchFile-MD5: e401165b9d7ce5228a7427b45624fe26
PatchScript: <<
sed -e '1,40d; 136,150d; 172,188d; 238,275d; 279,295d; 4404,4449d' ../a2ps-4.13-ja_nls.patch | patch -p1
sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1

# Fix a vulnerability in a2ps filename handling, CVE-2004-1170.
patch -p0 < ../a2ps-4.13-select-freebsd.patch

# Fix insecure tempfile handlings, CVE-2004-1377.
patch -p0 < ../a2ps-%v-fixps.patch
patch -p0 < ../a2ps-%v-psmandup.diff

# Fix for 10.6
perl -ni -e 'print unless /extern char \* stpcpy/' lib/xstrrpl.c
<<
ConfigureParams: <<
--build=%m-apple-darwin`uname -r|sed 's/\..*//'` --enable-nls \
--mandir='${prefix}/share/man' --infodir='${prefix}/share/info' --sysconfdir='${prefix}/etc/%n' \
--includedir='${prefix}/include' lispdir='${prefix}/share/emacs/site-lisp/%n' \
ACLOCAL=: AUTOCONF=: AUTOMAKE=: AUTOHEADER=: MAKEINFO='env LC_ALL=C %p/bin/makeinfo' \
YACC=/usr/bin/yacc file_prog=/usr/bin/file EMACS=no
<<
InstallScript: <<
make install prefix=%i

install -m 755 -d %i/etc/emacs/site-start.d
install -m 644 fink/%n-startup %i/etc/emacs/site-start.d/50%n.el

install -m 755 -d %i/lib/emacsen-common/packages/{install,remove}
install -m 755 fink/%n-install %i/lib/emacsen-common/packages/install/%n
install -m 755 fink/%n-remove %i/lib/emacsen-common/packages/remove/%n
<<
DocFiles: ANNOUNCE AUTHORS COPYING ChangeLog FAQ NEWS README* THANKS TODO
PostInstScript: <<
if [ "$1" = "configure" ] && [ -x %p/lib/emacsen-common/emacs-package-install ]
then
%p/lib/emacsen-common/emacs-package-install %n
fi
<<
PreRmScript: <<
if [ -x %p/lib/emacsen-common/emacs-package-remove ] ; then
%p/lib/emacsen-common/emacs-package-remove %n
fi
<<
ConfFiles: <<
%p/etc/%n/a2ps.cfg
%p/etc/%n/a2ps-site.cfg
<<
#%p/etc/emacs/site-start.d/50%n.el
InfoDocs: a2ps.info ogonkify.info regex.info
#
Homepage: http://www.on.cs.keio.ac.jp/~yasu/jp_a2ps.html
DescDetail: <<
GNU a2ps is an Any to PostScript filter. Of course it processes plain
text files, but also pretty prints quite a few popular languages.
More detailed web pages about GNU a2ps, including documentation,
flashes, updates, mailing lists, FAQ etc., is available at
http://www.inf.enst.fr/~demaille/a2ps.
<<

a2ps-ja stable port .patch

diff -Naur a2ps-4.13c.work/Makefile.am a2ps-4.13/Makefile.am
--- a2ps-4.13c.work/Makefile.am Sat Sep 27 04:40:36 2003
+++ a2ps-4.13/Makefile.am Wed Mar 23 16:27:52 2005
@@ -20,7 +20,7 @@

## Make sure to drop doc at the end: it causes may problems, so
## let's do the maximum before it
-SUBDIRS = auxdir m4 etc ps ogonkify \
+SUBDIRS = auxdir m4 etc ps ogonkify libjcode \
lib src po tests sheets encoding afm fonts ppd contrib doc man

ACLOCAL_AMFLAGS = -I m4
diff -Naur a2ps-4.13c.work/Makefile.in a2ps-4.13/Makefile.in
--- a2ps-4.13c.work/Makefile.in Sat Sep 27 05:07:20 2003
+++ a2ps-4.13/Makefile.in Wed Mar 23 16:27:52 2005
@@ -141,7 +141,7 @@

AUTOMAKE_OPTIONS = check-news 1.6.3 dist-bzip2 readme-alpha

-SUBDIRS = auxdir m4 etc ps ogonkify \
+SUBDIRS = auxdir m4 etc ps ogonkify libjcode \
lib src po tests sheets encoding afm fonts ppd contrib doc man


diff -Naur a2ps-4.13c.work/README.fink a2ps-4.13/README.fink
--- a2ps-4.13c.work/README.fink Thu Jan 1 09:00:00 1970
+++ a2ps-4.13/README.fink Thu Mar 24 12:21:14 2005
@@ -0,0 +1,14 @@
+このa2psは、日本語化パッチ
+Homepage: http://www.on.cs.keio.ac.jp/~yasu/jp_a2ps.html
+の機能に加え、UTF-8で書かれた日本語のテキストファイルを処理できるよう
+拡張されています。
+
+また、LANG=ja_JP.UTF-8の環境でも動作しますが、ヘッダ・フッタや
+メッセージが英語になります。LANG=ja_JP.eucJPの環境ではこの制限は
+ありません。
+
+また、いわゆる半角カナやJIS X 0212補助漢字、JIS X 0213の第3水準、
+第4水準を含むファイルを入力すると正しい出力が得られません。
+これは日本語化パッチが元々抱えていた制限です。
+
+東大Finkチーム
diff -Naur a2ps-4.13c.work/config.h.in a2ps-4.13/config.h.in
--- a2ps-4.13c.work/config.h.in Sat Sep 27 04:45:04 2003
+++ a2ps-4.13/config.h.in Wed Mar 23 16:27:52 2005
@@ -24,6 +24,9 @@
/* Define if TIOCGWINSZ requires sys/ioctl.h */
#undef GWINSZ_IN_SYS_IOCTL

+/* Define if you use libjcode for japanese */
+#undef USE_LIBJCODE
+
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM

@@ -177,6 +180,9 @@

/* Define to 1 if you have the `rename' function. */
#undef HAVE_RENAME
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_LOCALE_H

/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
diff -Naur a2ps-4.13c.work/configure a2ps-4.13/configure
--- a2ps-4.13c.work/configure Tue Mar 22 19:33:37 2005
+++ a2ps-4.13/configure Wed Mar 23 16:27:52 2005
@@ -1872,7 +1872,7 @@


# Available translations
-ALL_LINGUAS="ca cs da de es fr it ko nl no pl pt ru sl sv tr"
+ALL_LINGUAS="ca cs da de es fr it ko nl no pl pt ru sl sv tr ja"

## --------------------- ##
## Checks for programs. ##
@@ -19670,7 +19670,7 @@
ac_config_files="$ac_config_files contrib/psset"


- ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile man/Makefile tests/Makefile tests/defs lib/Makefile auxdir/Makefile m4/Makefile etc/Makefile etc/a2ps_cfg etc/a2ps-site.cfg po/Makefile.in sheets/Makefile encoding/Makefile ps/Makefile afm/Makefile contrib/Makefile contrib/sample/Makefile contrib/emacs/Makefile fonts/Makefile ppd/Makefile"
+ ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile man/Makefile tests/Makefile tests/defs lib/Makefile libjcode/Makefile auxdir/Makefile m4/Makefile etc/Makefile etc/a2ps_cfg etc/a2ps-site.cfg po/Makefile.in sheets/Makefile encoding/Makefile ps/Makefile afm/Makefile contrib/Makefile contrib/sample/Makefile contrib/emacs/Makefile fonts/Makefile ppd/Makefile"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -20239,6 +20239,7 @@
"tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"tests/defs" ) CONFIG_FILES="$CONFIG_FILES tests/defs" ;;
"lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+ "libjcode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libjcode/Makefile" ;;
"auxdir/Makefile" ) CONFIG_FILES="$CONFIG_FILES auxdir/Makefile" ;;
"m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
"etc/Makefile" ) CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
@@ -20425,6 +20426,8 @@
s,@LPR_QUEUE_OPTION@,$LPR_QUEUE_OPTION,;t t
s,@MEDIUM@,$MEDIUM,;t t
s,@ENCODING@,$ENCODING,;t t
+s,@COMPILE_LIBJCODE@,$COMPILE_LIBJCODE,;t t
+s,@LIBJCODELIBS@,$LIBJCODELIBS,;t t
s,@COM_gv@,$COM_gv,;t t
s,@gv@,$gv,;t t
s,@COM_ghostview@,$COM_ghostview,;t t
diff -Naur a2ps-4.13c.work/configure.in a2ps-4.13/configure.in
--- a2ps-4.13c.work/configure.in Tue Mar 22 19:33:37 2005
+++ a2ps-4.13/configure.in Wed Mar 23 16:27:52 2005
@@ -23,7 +23,7 @@
AC_SUBST(GNU_PACKAGE)

# Available translations
-ALL_LINGUAS="ca cs da de es fr it ko nl no pl pt ru sl sv tr"
+ALL_LINGUAS="ca cs da de es fr it ko nl no pl pt ru sl sv tr ja"

## --------------------- ##
## Checks for programs. ##
@@ -71,7 +71,7 @@
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 locale.h)

## --------------------- ##
## Checks for typedefs. ##
@@ -286,7 +286,8 @@
COMPILE_LIBJCODE=$enableval, COMPILE_LIBJCODE=yes)
if test "$COMPILE_LIBJCODE" = "yes"; then
LIBJCODELIBS=\$\(top_builddir\)/libjcode/libjcode.a
- AC_DEFINE(USE_LIBJCODE)
+ AC_DEFINE(USE_LIBJCODE, 1,
+ [Define if you want to use libjcode.])
ENCODING=euc-jp
fi
AC_SUBST(COMPILE_LIBJCODE)
diff -Naur a2ps-4.13c.work/contrib/sample/Makefile.am a2ps-4.13/contrib/sample/Makefile.am
--- a2ps-4.13c.work/contrib/sample/Makefile.am Sat Sep 27 04:40:37 2003
+++ a2ps-4.13/contrib/sample/Makefile.am Wed Mar 23 16:56:27 2005
@@ -34,5 +34,5 @@
sample_SOURCES = main.c

INCLUDES = -I. -I.. -I$(top_builddir) -I$(top_srcdir)/intl -I$(top_srcdir)/lib
-sample_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+sample_LDADD = $(top_builddir)/lib/liba2ps.la $(LTLIBINTL) -lm
DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\"
diff -Naur a2ps-4.13c.work/contrib/sample/Makefile.in a2ps-4.13/contrib/sample/Makefile.in
--- a2ps-4.13c.work/contrib/sample/Makefile.in Sat Sep 27 05:07:22 2003
+++ a2ps-4.13/contrib/sample/Makefile.in Wed Mar 23 16:56:42 2005
@@ -171,7 +171,7 @@
sample_SOURCES = main.c

INCLUDES = -I. -I.. -I$(top_builddir) -I$(top_srcdir)/intl -I$(top_srcdir)/lib
-sample_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+sample_LDADD = $(top_builddir)/lib/liba2ps.la $(LTLIBINTL) -lm
DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\"
subdir = contrib/sample
mkinstalldirs = $(SHELL) $(top_srcdir)/auxdir/mkinstalldirs
diff -Naur a2ps-4.13c.work/fink/a2ps-ja-install a2ps-4.13/fink/a2ps-ja-install
--- a2ps-4.13c.work/fink/a2ps-ja-install Thu Jan 1 09:00:00 1970
+++ a2ps-4.13/fink/a2ps-ja-install Wed Mar 23 16:27:52 2005
@@ -0,0 +1,41 @@
+#! /bin/sh -e
+# @PREFIX@/lib/emacsen-common/packages/install/a2ps-ja
+
+FLAVOR=$1
+PACKAGE=a2ps-ja
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+# SITEFLAG="-no-site-file"
+#else
+# SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=@PREFIX@/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=@PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist.
+# Maybe somebody will write it.
+if test -x @PREFIX@/sbin/install-info-altdir; then
+ echo install/${PACKAGE}: install Info links for ${FLAVOR}
+ install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} @PREFIX@/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
diff -Naur a2ps-4.13c.work/fink/a2ps-ja-remove a2ps-4.13/fink/a2ps-ja-remove
--- a2ps-4.13c.work/fink/a2ps-ja-remove Thu Jan 1 09:00:00 1970
+++ a2ps-4.13/fink/a2ps-ja-remove Wed Mar 23 16:27:52 2005
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# @PREFIX@/lib/emacsen-common/packages/remove/a2ps-ja
+
+FLAVOR=$1
+PACKAGE=a2ps-ja
+
+if [ ${FLAVOR} != emacs ]; then
+ if test -x @PREFIX@/sbin/install-info-altdir; then
+ echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+ install-info-altdir --quiet --remove --dirname=${FLAVOR} @PREFIX@/info/a2ps.info.gz
+ fi
+
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf @PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
diff -Naur a2ps-4.13c.work/fink/a2ps-ja-startup a2ps-4.13/fink/a2ps-ja-startup
--- a2ps-4.13c.work/fink/a2ps-ja-startup Thu Jan 1 09:00:00 1970
+++ a2ps-4.13/fink/a2ps-ja-startup Wed Mar 23 16:27:52 2005
@@ -0,0 +1,31 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for the Fink a2ps package
+
+;; We have to add this to the load-path:
+(setq load-path (cons (concat "@PREFIX@/share/"
+ (symbol-name fink-emacs-flavor)
+ "/site-lisp/a2ps-ja") load-path))
+;; a2ps
+(autoload 'a2ps-mode "a2ps-mode" nil t)
+(setq auto-mode-alist
+ (cons '(".*\\.a2ps$" . a2ps-mode)
+ auto-mode-alist))
+
+;; a2ps-print
+(load "a2ps-print")
+
+(if (featurep 'xemacs)
+ (progn
+ (global-set-key 'f22 'a2ps-buffer)
+ (global-set-key '(shift f22) 'a2ps-region-1)
+ (add-menu-button '("File") ["a2ps-print" a2ps-buffer "--"])
+ )
+ (progn
+ (global-set-key [f22] 'a2ps-buffer)
+ (global-set-key [S-f22] 'a2ps-region-1)
+ (define-key-after menu-bar-files-menu [a2ps-print]
+ '(menu-item "a2ps" a2ps-buffer :help "Print with a2ps")
+ 'ps-print-region)
+ )
+ )
diff -Naur a2ps-4.13c.work/lib/printers.c a2ps-4.13/lib/printers.c
--- a2ps-4.13c.work/lib/printers.c Sat Sep 27 04:40:39 2003
+++ a2ps-4.13/lib/printers.c Wed Mar 23 16:27:52 2005
@@ -315,8 +315,8 @@
res->ppd = NULL; /* Printer's ppd are not read yet */

/* Output */
- /* Default is to send to default printer */
- res->flag_output_is_printer = true;
+ /* Default is to send to stdout */
+ res->flag_output_is_printer = false;
res->flag_output_name = NULL;
res->output_is_file = true;
res->output_name = NULL;
diff -Naur a2ps-4.13c.work/lib/userdata.c a2ps-4.13/lib/userdata.c
--- a2ps-4.13c.work/lib/userdata.c Tue Mar 5 03:46:25 2002
+++ a2ps-4.13/lib/userdata.c Wed Mar 23 16:27:52 2005
@@ -76,9 +76,11 @@
else
login = NULL;

+#if defined(USE_LIBJCODE)
+ name = login; /* XXX */
+#elif defined(HAVE_STRUCT_PASSWD_PW_GECOS)
/* The field `pw_gecos' contains the full name and comments, such as
phone number etc. */
-#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
if (passwd && passwd->pw_gecos)
{
char *gecos = NULL;
diff -Naur a2ps-4.13c.work/po/ja.po a2ps-4.13/po/ja.po
--- a2ps-4.13c.work/po/ja.po Tue Mar 22 19:33:37 2005
+++ a2ps-4.13/po/ja.po Wed Mar 23 16:27:52 2005
@@ -4,33 +4,36 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: a2ps 4.13\n"
-"POT-Creation-Date: 2000-06-20 19:30+0900\n"
-"PO-Revision-Date: 2000-06-20 21:30+0900\n"
-"Last-Translator: Yasuyuki Furukawa \n"
+"Project-Id-Version: a2ps 4.13c\n"
+"POT-Creation-Date: 2003-09-27 05:14+0900\n"
+"PO-Revision-Date: 2003-09-27 05:14+0900\n"
+"Last-Translator: Mamoru KOMACHI \n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=EUC-JP\n"
"Content-Transfer-Encoding: 8-bit\n"

-#. TRANS: the type of the end-of-line rules, is `any type', i.e.
-#. lines ended by \n, or \r, or \r\n, or \n\r are OK
-#: src/buffer.c:67
+#: src/buffer.c:68
msgid "any type"
msgstr "全てのタイプ"

-#: lib/routines.c:160 lib/xbackupfile.c:248 lib/xbackupfile.c:276
-#: lib/xbackupfile.c:284 src/delegate.c:260
+#: src/delegate.c:137 lib/confg.c:268 lib/encoding.c:530 lib/encoding.c:576
+#: lib/encoding.c:616 lib/output.c:302 lib/pair_ht.c:296 lib/prolog.c:146
+#, c-format
+msgid "missing argument for `%s'"
+msgstr "`%s' に必要な引数が足りません"
+
+#: src/delegate.c:260 lib/routines.c:160 lib/xbackupfile.c:248
+#: lib/xbackupfile.c:276 lib/xbackupfile.c:284
#, c-format
msgid "cannot create file `%s'"
msgstr "ファイル`%s'を作成できません"

-#: lib/routines.c:190 lib/routines.c:196 src/delegate.c:269 src/select.c:159
+#: src/delegate.c:269 src/select.c:159 lib/routines.c:190 lib/routines.c:196
#, c-format
msgid "cannot open a pipe on `%s'"
msgstr "`%s'のパイプを開けません"

-#. E.g.: Delegation `PsNup', from ps to ps
#: src/delegate.c:389
#, c-format
msgid "Delegation `%s', from %s to %s\n"
@@ -45,14 +48,13 @@
msgid "`%s' is a directory"
msgstr "`%s'はディレクトリです"

-#: lib/confg.c:288 lib/confg.c:451 lib/routines.c:154 src/generate.c:96
-#: src/main.c:558 src/main.c:580
+#: src/generate.c:96 src/main.c:558 src/main.c:580 lib/confg.c:292
+#: lib/confg.c:455 lib/routines.c:154
#, c-format
msgid "cannot open file `%s'"
msgstr "ファイル`%s'を開けません"

-#. Another kind of error occured: exit
-#: lib/xbackupfile.c:224 src/generate.c:101
+#: src/generate.c:101 lib/xbackupfile.c:224
#, c-format
msgid "cannot get informations on file `%s'"
msgstr "ファイル`%s'上の情報を取得できません"
@@ -89,12 +91,12 @@

#: src/generate.c:226
msgid "[1 line wrapped]\n"
-msgstr "[1行 折り畳み]\n"
+msgstr "[1行 折り返し]\n"

#: src/generate.c:229
#, c-format
msgid "[%d lines wrapped]\n"
-msgstr "[%d行 折り畳み]\n"
+msgstr "[%d行 折り返し]\n"

#: src/generate.c:242
msgid "[No output produced]\n"
@@ -103,7 +105,7 @@
#: src/generate.c:314
#, c-format
msgid "%s, delegated to %s"
-msgstr "%s, %sへフィルタます "
+msgstr "%s, %sへフィルタします "

#: src/generate.c:322
#, c-format
@@ -124,13 +126,11 @@
msgid "plain"
msgstr "プレーン"

-#: /home/akim/src/a2ps-4.12/src/lexssh.l:348
+#: lexssh.l:348
msgid "end-of-line in string constant"
msgstr "文字列中に行末がきています"

-#. TRANS: %s is ".." or <..> or /../ etc.
-#: /home/akim/src/a2ps-4.12/src/lexssh.l:415 src/sheets-map.l:152
-#: src/sheets-map.l:191
+#: lexssh.l:415 src/sheets-map.l:152 src/sheets-map.l:191
#, c-format
msgid "end of line inside a %s"
msgstr "%s 文字列中に行末がきています"
@@ -140,27 +140,23 @@
msgid "received signal %d: %s"
msgstr "シグナル%dを受け取りました: %s"

-#. TRANS: highlighting level = heavy (2/2)
#: src/main.c:240
msgid "heavy"
msgstr "ヘビー"

-#. TRANS: highlighting level = normal (1/2)
#: src/main.c:244
msgid "normal"
msgstr "通常"

-#. TRANS: highlighting level = none (0/2)
#: src/main.c:248
msgid "none"
msgstr "なし"

-#. This is just so that gettext knows I use those two strings.
-#: src/main.c:322
+#: src/main.c:322 src/main.c:326
msgid "yes"
msgstr ""

-#: src/main.c:323 src/main.c:367
+#: src/main.c:323 src/main.c:326 src/main.c:367
msgid "no"
msgstr "無効"

@@ -211,12 +207,10 @@
msgid "font size is %gpt"
msgstr "%gptフォントサイズ"

-#. number line: each line
#: src/main.c:371
msgid "each line"
msgstr "各行"

-#. number line: each %d line
#: src/main.c:375
#, c-format
msgid "each %d lines"
@@ -289,8 +283,6 @@
" 強制印刷 = %s\n"
" 外部フィルタリング = %s\n"

-#. TRANS: a2ps -E --list=options. Warning, this answer is also
-#. used for the PPD file. Make it compatible with both.
#: src/main.c:436 src/main.c:502
msgid "selected automatically"
msgstr "自動選択"
@@ -318,7 +310,6 @@
msgid "simple backups of every file"
msgstr "各ファイルの単純バックアップ"

-#. appears in a2ps --version-=existing --list=defaults
#: src/main.c:469
msgid ""
"numbered backups of files already numbered,\n"
@@ -366,7 +357,7 @@
" 標準 PPD = %s\n"
" ページラベル形式 = %s\n"
" 印刷部数 = %d\n"
-" サイド/シート = %d\n"
+" サイド/シート = %s\n"
" ページデバイス定義 = "

#: src/main.c:513
@@ -376,11 +367,8 @@
#: src/main.c:516
#, c-format
msgid " page prefeed = %s\n"
-msgstr " ページプレフィード = %d\n"
+msgstr " ページ先送り = %s\n"

-#.
-#. * Internal Details
-#.
#: src/main.c:525
msgid "Internals:\n"
msgstr "内部情報:\n"
@@ -429,8 +417,8 @@
" --list=defaults display default settings and parameters\n"
" --list=TOPIC detailed list on TOPIC (delegations, encodings, "
"features,\n"
-" variables, media, ppd, printers, prologues, "
-"style-sheets,\n"
+" variables, media, ppd, printers, prologues, style-"
+"sheets,\n"
" user-options)\n"
msgstr ""
" --version バージョンを表示する\n"
@@ -692,8 +680,8 @@

#: src/main.c:818
msgid ""
-"News, updates and documentation: visit "
-"http://www.inf.enst.fr/~demaille/a2ps/.\n"
+"News, updates and documentation: visit http://www.inf.enst.fr/~demaille/"
+"a2ps/.\n"
msgstr ""
"新着情報や、更新情報、ドキュメントには、\n"
" http://www.inf.enst.fr/~demaille/a2ps/ を訪れてください。\n"
@@ -731,15 +719,12 @@
msgid "no key defined for `%s'"
msgstr "`%s'に対するキーは定義されていません"

-#: /home/akim/src/a2ps-4.12/lib/fonts.l:837
-#: /home/akim/src/a2ps-4.12/lib/fonts.l:839
-#: /home/akim/src/a2ps-4.12/lib/fonts.l:841 lib/pathwalk.c:328
-#: lib/pathwalk.c:414 src/select.c:122 src/ssheet.c:866
+#: src/select.c:122 src/ssheet.c:866 fonts.l:837 fonts.l:839 fonts.l:841
+#: lib/pathwalk.c:328 lib/pathwalk.c:414
#, c-format
msgid "cannot find file `%s'"
msgstr "ファイル`%s'が見つかりません"

-#. sheets.map can not be found: there is no automatic prettyprinting
#: src/select.c:124
msgid "automatic style selection cancelled"
msgstr "自動スタイル選択がキャンセルされました"
@@ -813,40 +798,35 @@
msgid "write error"
msgstr "書き込みエラー"

-#: lib/confg.c:253 lib/encoding.c:639
+#: lib/confg.c:257 lib/encoding.c:638
#, c-format
msgid "invalid option `%s'"
msgstr "間違ったオプションです: `%s'"

-#: lib/confg.c:264 lib/encoding.c:577 lib/encoding.c:617 lib/prolog.c:146
-#, c-format
-msgid "missing argument for `%s'"
-msgstr "`%s'に対する引数が足りません"
-
-#: lib/confg.c:320 lib/confg.c:327 lib/confg.c:334
+#: lib/confg.c:324 lib/confg.c:331 lib/confg.c:338
#, c-format
msgid "invalid definition for printer `%s': %s"
msgstr "おかしなプリンタの定義です `%s': %s"

-#: lib/confg.c:325 lib/confg.c:328
+#: lib/confg.c:329 lib/confg.c:332 lib/printers.c:47
msgid "Unknown Printer"
msgstr "不明なプリンタ"

-#: lib/confg.c:332 lib/confg.c:335
+#: lib/confg.c:336 lib/confg.c:339 lib/printers.c:46
msgid "Default Printer"
msgstr "標準プリンタ"

-#: lib/confg.c:388 lib/options.c:703
+#: lib/confg.c:392 lib/options.c:697
#, c-format
msgid "invalid variable identifier `%s'"
msgstr "おかしな変数証明です `%s'"

-#: lib/confg.c:417
+#: lib/confg.c:421
#, c-format
msgid "obsolete `%s' entry. Ignored"
msgstr "旧式の`%s'エントリです. 無効です"

-#: lib/encoding.c:1115 lib/encoding.c:1136
+#: lib/encoding.c:1114 lib/encoding.c:1135
msgid "Known Encodings"
msgstr "利用可能なエンコード"

@@ -904,13 +884,16 @@
msgid "dimensions"
msgstr "ディメンジョン"

-#. TRANS: Variables (formely called `macro meta sequences', eeeaerk)
-#. are things such as #(psnup) which is substituted to a bigger strings,
-#. e.g. -#v #?q|-q|| #?j|-d|| #?r||-c| -w#w -h#h
#: lib/metaseq.c:104 lib/metaseq.c:113
msgid "Known Variables"
msgstr "利用可能な変数"

+#: lib/metaseq.c:162 lib/metaseq.c:531 lib/metaseq.c:548 lib/metaseq.c:608
+#: lib/metaseq.c:951 lib/metaseq.c:972
+#, c-format
+msgid "%s: missing `%c' for %s%c escape"
+msgstr "%s: 文字 `%c' が %s%c エスケープに必要です"
+
#: lib/metaseq.c:288 lib/metaseq.c:300
#, c-format
msgid "Printed by %s"
@@ -931,16 +914,10 @@
msgid "%s: too long argument for %s escape"
msgstr "%s: エスケープ%sに対する引数が長過ぎます"

-#. Translators: please make a short date format
-#. * according to the std form in your language, using
-#. * the standard strftime(3)
#: lib/metaseq.c:364 lib/metaseq.c:675
msgid "%b %d, %y"
msgstr "%y年 %b%e日"

-#. Translators: please make a long date format
-#. * according to the std form in your language, using
-#. * GNU strftime(3)
#: lib/metaseq.c:373 lib/metaseq.c:684
msgid "%A %B %d, %Y"
msgstr "%Y年 %b%e日 %A"
@@ -952,35 +929,26 @@
msgid "%s: unknown `%s' escape `%c' (%d)"
msgstr "%s: 不明な `%s'エスケープ `%c' (%d)"

-#. `%q' localized `Page %d'
#: lib/metaseq.c:426 lib/metaseq.c:815
#, c-format
msgid "Page %d"
msgstr "%dページ"

-#. `%Q' localized `Page %d/%c'
#: lib/metaseq.c:431 lib/metaseq.c:826
#, c-format
msgid "Page %d/%c"
msgstr "%d/%c ページ"

-#: lib/metaseq.c:531 lib/metaseq.c:548 lib/metaseq.c:608 lib/metaseq.c:951
-#: lib/metaseq.c:972
-#, c-format
-msgid "%s: missing `%c' for %s%c escape"
-msgstr "%s: `%c'がエスケープ %s%cに対して不足しています"
-
#: lib/metaseq.c:593 lib/metaseq.c:1021
#, c-format
msgid "%s: invalid separator `%s%c' for `%s' escape"
-msgstr "%s: `%s%c'はエスケープ %s%cに対して不適切です"
+msgstr "%s: セパレータ`%s%c'はエスケープ%sに対して不適切です"

#: lib/metaseq.c:601 lib/metaseq.c:611
#, c-format
msgid "%s: invalid argument for %s%c escape"
msgstr "%s: エスケープ %s%cに対して不適切な引数です"

-#. This file is finised, we do know its real number of pages
#: lib/metaseq.c:822
#, c-format
msgid "Page %d/%d"
@@ -1093,8 +1061,6 @@
msgid "Known User Options"
msgstr "利用可能なユーザオプション"

-#. If XALLOC_FAIL_FUNC is NULL, or does return, display this message
-#. before exiting when memory is exhausted. Goes through gettext.
#: lib/xbackupfile.c:105 lib/xmalloc.c:66
msgid "Memory exhausted"
msgstr "メモリが足りません"
@@ -1119,8 +1085,6 @@
msgid "ambiguous argument %s for `%s'"
msgstr "曖昧な引数`%s'が`%s'に対して指定されています"

-#. We try to put synonyms on the same line. The assumption is that
-#. synonyms follow each other
#: lib/argmatch.c:178
msgid "Valid arguments are:"
msgstr "おかしな引数です:"
@@ -1149,19 +1113,16 @@
msgid "%s: option `%s' requires an argument\n"
msgstr "%s: オプション`%s'には引数が必要です\n"

-#. --option
#: lib/getopt.c:752
#, c-format
msgid "%s: unrecognized option `--%s'\n"
msgstr "%s: 不明なオプションです `--%s'\n"

-#. +option or -option
#: lib/getopt.c:756
#, c-format
msgid "%s: unrecognized option `%c%s'\n"
msgstr "%s: 不明なオプションです `%c%s'\n"

-#. 1003.2 specifies the format of this message.
#: lib/getopt.c:782
#, c-format
msgid "%s: illegal option -- %c\n"
@@ -1172,7 +1133,6 @@
msgid "%s: invalid option -- %c\n"
msgstr "%s: 不適切なオプションです -- %c\n"

-#. 1003.2 specifies the format of this message.
#: lib/getopt.c:815 lib/getopt.c:945
#, c-format
msgid "%s: option requires an argument -- %c\n"
@@ -1187,4 +1147,3 @@
#, c-format
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr "%s: オプション`-W %s'は引数を取りません\n"
-
diff -Naur a2ps-4.13c.work/src/Makefile.am a2ps-4.13/src/Makefile.am
--- a2ps-4.13c.work/src/Makefile.am Sat Sep 27 04:40:42 2003
+++ a2ps-4.13/src/Makefile.am Wed Mar 23 16:27:52 2005
@@ -28,7 +28,7 @@

bin_PROGRAMS = a2ps

-DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/locale\"
+DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/locale\" -DUSE_GNU_ICONV

a2ps_SOURCES = main.c \
read.c sshread.c ssheet.c select.c generate.c \
@@ -49,8 +49,8 @@
# I don't really understand why I have to put srcdir here, but
# it is needed for yacc and lex files (seems related to #line, but
# I really don't understand why)...
-INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/intl
+INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/intl -I$(top_builddir)/libjcode

-a2ps_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+a2ps_LDADD = $(top_builddir)/lib/liba2ps.la $(LTLIBINTL) @LEXLIB@ @LIBJCODELIBS@ -liconv -lm

EXTRA_DIST = $(BUILT_SOURCES)
diff -Naur a2ps-4.13c.work/src/Makefile.in a2ps-4.13/src/Makefile.in
--- a2ps-4.13c.work/src/Makefile.in Sat Sep 27 05:07:37 2003
+++ a2ps-4.13/src/Makefile.in Wed Mar 23 16:27:52 2005
@@ -142,7 +142,7 @@

bin_PROGRAMS = a2ps

-DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/locale\"
+DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/locale\" -DUSE_GNU_ICONV

a2ps_SOURCES = main.c \
read.c sshread.c ssheet.c select.c generate.c \
@@ -164,9 +164,9 @@
# I don't really understand why I have to put srcdir here, but
# it is needed for yacc and lex files (seems related to #line, but
# I really don't understand why)...
-INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/intl
+INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/intl -I$(top_builddir)/libjcode

-a2ps_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+a2ps_LDADD = $(top_builddir)/lib/liba2ps.la $(LTLIBINTL) @LEXLIB@ @LIBJCODELIBS@ -liconv -lm

EXTRA_DIST = $(BUILT_SOURCES)
subdir = src
diff -Naur a2ps-4.13c.work/src/buffer.c a2ps-4.13/src/buffer.c
--- a2ps-4.13c.work/src/buffer.c Tue Mar 22 19:33:38 2005
+++ a2ps-4.13/src/buffer.c Thu Mar 24 12:14:11 2005
@@ -44,6 +44,9 @@
#ifdef USE_LIBJCODE
#include "jlib.h"
extern use_libjcode;
+#ifdef USE_GNU_ICONV
+#include
+#endif
#endif

/****************************************************************/
@@ -426,8 +429,78 @@
obstack_1grow (&buffer->obstack, '\0');
if (use_libjcode == true)
{
+ const char *input = obstack_finish(&buffer->obstack);
if(buffer->content) free(buffer->content);
- buffer->content = toStringEUC(obstack_finish (&buffer->obstack));
+#ifdef USE_GNU_ICONV
+ {
+ static iconv_t ucs4_cd, eucjp_cd;
+ static open_done = 0, open_err = 0;
+ size_t r;
+ static char buf[16384]; /* XXX */
+ size_t inbytesleft, outbytesleft;
+ const char *ip;
+ char *op;
+
+ buf[sizeof(buf) - 1] = 0;
+ if (open_err) {
+ goto not_utf8;
+ } else if (!open_done) {
+ /* GNU libiconv only */
+ ucs4_cd = iconv_open("utf-32be", "utf-8");
+ eucjp_cd = iconv_open("euc-jp//TRANSLIT", "utf-8");
+ if (eucjp_cd == (iconv_t)-1 && errno == EINVAL)
+ eucjp_cd = iconv_open("euc-jp", "utf-8");
+ if (ucs4_cd == (iconv_t)-1 || eucjp_cd == (iconv_t)-1) {
+ open_err = 1;
+ goto not_utf8;
+ }
+ open_done = 1;
+ }
+ ip = input;
+ inbytesleft = strlen(input) + 1;
+ op = buf;
+ outbytesleft = sizeof(buf) - 1;
+ r = iconv(ucs4_cd, &ip, &inbytesleft, &op, &outbytesleft);
+ if (r || inbytesleft)
+ goto not_utf8;
+
+ ip = input;
+ inbytesleft = strlen(input);
+ op = buf;
+ outbytesleft = sizeof(buf) - 1;
+
+ while (inbytesleft) {
+ r = iconv(eucjp_cd, &ip, &inbytesleft, &op, &outbytesleft);
+ if (r == (size_t)-1) {
+ if (errno == E2BIG)
+ break;
+ else if (errno == EINVAL)
+ goto not_utf8;
+ assert(errno == EILSEQ);
+ assert(inbytesleft != 0);
+ /* dispose an unicode character */
+ do {
+ ++ip;
+ --inbytesleft;
+ } while(inbytesleft && (((unsigned char)*ip & 0xc0) == 0x80));
+ /* then output "geta" */
+ if (outbytesleft >= 2) {
+ *op++ = '\xa2';
+ *op++ = '\xae';
+ outbytesleft -= 2;
+ }
+ }
+ }
+ *op = 0;
+ buffer->content = (uchar *)xstrdup(buf);
+ goto conv_done;
+ }
+not_utf8:
+#endif
+ buffer->content = toStringEUC((char *)input);
+#ifdef USE_GNU_ICONV
+conv_done:;
+#endif
}
else
buffer->content = (uchar *) obstack_finish (&buffer->obstack);
diff -Naur a2ps-4.13c.work/src/main.c a2ps-4.13/src/main.c
--- a2ps-4.13c.work/src/main.c Sat Sep 27 04:40:42 2003
+++ a2ps-4.13/src/main.c Thu Mar 24 11:48:31 2005
@@ -940,11 +940,23 @@
Copyright (c) 1995-2000 Akim Demaille, Miguel Santana");

/* Set the NLS on */
- setlocale (LC_TIME, "");
+ {
+ char *locale = setlocale(LC_ALL, "");
+ locale = xstrdup(locale ? locale : "C");
+ setlocale(LC_ALL, "C");
+ if (!strcmp(locale, "ja_JP.UTF-8")) {
+ setenv("LC_TIME", "C", 1); /* for libintl */
+ setenv("LC_MESSAGES", "C", 1); /* for libintl */
+ setlocale(LC_CTYPE, "ja_JP.eucJP");
+ } else {
+ setlocale(LC_TIME, "");
#ifdef HAVE_LC_MESSAGES
- setlocale (LC_MESSAGES, "");
+ setlocale (LC_MESSAGES, "");
#endif
- setlocale (LC_CTYPE, "");
+ setlocale (LC_CTYPE, "");
+ }
+ free(locale);
+ }

bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);

a2ps-ja _unstable_ port information

Package: a2ps-ja
Version: 4.13c
Revision: 6
Description: Any to PostScript filter with Japanese extension
License: GPL
Maintainer: Todai Fink Team
Depends: psutils-a4 | psutils, libgettext3-shlibs, libiconv, libpaper1-shlibs
BuildDepends: fink (>= 0.24.12), libgettext3-dev, gettext-tools, gperf (>= 2.7.2-1), libiconv-dev, libpaper1-dev, texinfo
Conflicts: a2ps
Replaces: a2ps
Suggests: bzip2, emacsen, imagemagick, ptex3-base, wdiff, ghostscript | ghostscript-nox
#Source: gnu
Source: ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO/distfiles/a2ps-%v.tar.gz
Source-MD5: 97164e84ba911e4604155507e0893669
SourceDirectory: a2ps-4.13
Source2: http://www.on.cs.keio.ac.jp/~yasu/linux/GNU/a2ps-4.13-ja_nls.patch
Source2-MD5: 75820c89316d271519e8c5a18c479c1e
Source3: ftp://ftp.riken.go.jp/pub/Linux/gentoo/app-text/a2ps/files/a2ps-4.13-select-freebsd.patch
Source3-MD5: b62538dbd828d995bdc3ce36188b0768
Source4: ftp://ftp.riken.go.jp/pub/Linux/gentoo/app-text/a2ps/files/a2ps-%v-fixps.patch
Source4-MD5: df6bc895cc6fb0fd47f22fd1c36d1ed3
Source5: ftp://ftp.riken.go.jp/pub/Linux/gentoo/app-text/a2ps/files/a2ps-%v-psmandup.diff
Source5-MD5: d68d0bfab547ef1ce70576c7a5570f13
PatchFile: %n.patch
PatchFile-MD5: e401165b9d7ce5228a7427b45624fe26
PatchScript: <<
sed -e '1,40d; 136,150d; 172,188d; 238,275d; 279,295d; 4404,4449d' ../a2ps-4.13-ja_nls.patch | patch -p1
sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1

# Fix a vulnerability in a2ps filename handling, CVE-2004-1170.
patch -p0 < ../a2ps-4.13-select-freebsd.patch

# Fix insecure tempfile handlings, CVE-2004-1377.
patch -p0 < ../a2ps-%v-fixps.patch
patch -p0 < ../a2ps-%v-psmandup.diff

# Fix for 10.6
perl -ni -e 'print unless /extern char \* stpcpy/' lib/xstrrpl.c
<<
ConfigureParams: <<
--build=%m-apple-darwin`uname -r|sed 's/\..*//'` --enable-nls \
--mandir='${prefix}/share/man' --infodir='${prefix}/share/info' --sysconfdir='${prefix}/etc/%n' \
--includedir='${prefix}/include' lispdir='${prefix}/share/emacs/site-lisp/%n' \
ACLOCAL=: AUTOCONF=: AUTOMAKE=: AUTOHEADER=: MAKEINFO='env LC_ALL=C %p/bin/makeinfo' \
YACC=/usr/bin/yacc file_prog=/usr/bin/file EMACS=no
<<
InstallScript: <<
make install prefix=%i

install -m 755 -d %i/etc/emacs/site-start.d
install -m 644 fink/%n-startup %i/etc/emacs/site-start.d/50%n.el

install -m 755 -d %i/lib/emacsen-common/packages/{install,remove}
install -m 755 fink/%n-install %i/lib/emacsen-common/packages/install/%n
install -m 755 fink/%n-remove %i/lib/emacsen-common/packages/remove/%n
<<
DocFiles: ANNOUNCE AUTHORS COPYING ChangeLog FAQ NEWS README* THANKS TODO
PostInstScript: <<
if [ "$1" = "configure" ] && [ -x %p/lib/emacsen-common/emacs-package-install ]
then
%p/lib/emacsen-common/emacs-package-install %n
fi
<<
PreRmScript: <<
if [ -x %p/lib/emacsen-common/emacs-package-remove ] ; then
%p/lib/emacsen-common/emacs-package-remove %n
fi
<<
ConfFiles: <<
%p/etc/%n/a2ps.cfg
%p/etc/%n/a2ps-site.cfg
<<
#%p/etc/emacs/site-start.d/50%n.el
InfoDocs: a2ps.info ogonkify.info regex.info
#
Homepage: http://www.on.cs.keio.ac.jp/~yasu/jp_a2ps.html
DescDetail: <<
GNU a2ps is an Any to PostScript filter. Of course it processes plain
text files, but also pretty prints quite a few popular languages.
More detailed web pages about GNU a2ps, including documentation,
flashes, updates, mailing lists, FAQ etc., is available at
http://www.inf.enst.fr/~demaille/a2ps.
<<

a2ps-ja _unstable_ port .patch

diff -Naur a2ps-4.13c.work/Makefile.am a2ps-4.13/Makefile.am
--- a2ps-4.13c.work/Makefile.am Sat Sep 27 04:40:36 2003
+++ a2ps-4.13/Makefile.am Wed Mar 23 16:27:52 2005
@@ -20,7 +20,7 @@

## Make sure to drop doc at the end: it causes may problems, so
## let's do the maximum before it
-SUBDIRS = auxdir m4 etc ps ogonkify \
+SUBDIRS = auxdir m4 etc ps ogonkify libjcode \
lib src po tests sheets encoding afm fonts ppd contrib doc man

ACLOCAL_AMFLAGS = -I m4
diff -Naur a2ps-4.13c.work/Makefile.in a2ps-4.13/Makefile.in
--- a2ps-4.13c.work/Makefile.in Sat Sep 27 05:07:20 2003
+++ a2ps-4.13/Makefile.in Wed Mar 23 16:27:52 2005
@@ -141,7 +141,7 @@

AUTOMAKE_OPTIONS = check-news 1.6.3 dist-bzip2 readme-alpha

-SUBDIRS = auxdir m4 etc ps ogonkify \
+SUBDIRS = auxdir m4 etc ps ogonkify libjcode \
lib src po tests sheets encoding afm fonts ppd contrib doc man


diff -Naur a2ps-4.13c.work/README.fink a2ps-4.13/README.fink
--- a2ps-4.13c.work/README.fink Thu Jan 1 09:00:00 1970
+++ a2ps-4.13/README.fink Thu Mar 24 12:21:14 2005
@@ -0,0 +1,14 @@
+このa2psは、日本語化パッチ
+Homepage: http://www.on.cs.keio.ac.jp/~yasu/jp_a2ps.html
+の機能に加え、UTF-8で書かれた日本語のテキストファイルを処理できるよう
+拡張されています。
+
+また、LANG=ja_JP.UTF-8の環境でも動作しますが、ヘッダ・フッタや
+メッセージが英語になります。LANG=ja_JP.eucJPの環境ではこの制限は
+ありません。
+
+また、いわゆる半角カナやJIS X 0212補助漢字、JIS X 0213の第3水準、
+第4水準を含むファイルを入力すると正しい出力が得られません。
+これは日本語化パッチが元々抱えていた制限です。
+
+東大Finkチーム
diff -Naur a2ps-4.13c.work/config.h.in a2ps-4.13/config.h.in
--- a2ps-4.13c.work/config.h.in Sat Sep 27 04:45:04 2003
+++ a2ps-4.13/config.h.in Wed Mar 23 16:27:52 2005
@@ -24,6 +24,9 @@
/* Define if TIOCGWINSZ requires sys/ioctl.h */
#undef GWINSZ_IN_SYS_IOCTL

+/* Define if you use libjcode for japanese */
+#undef USE_LIBJCODE
+
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM

@@ -177,6 +180,9 @@

/* Define to 1 if you have the `rename' function. */
#undef HAVE_RENAME
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_LOCALE_H

/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
diff -Naur a2ps-4.13c.work/configure a2ps-4.13/configure
--- a2ps-4.13c.work/configure Tue Mar 22 19:33:37 2005
+++ a2ps-4.13/configure Wed Mar 23 16:27:52 2005
@@ -1872,7 +1872,7 @@


# Available translations
-ALL_LINGUAS="ca cs da de es fr it ko nl no pl pt ru sl sv tr"
+ALL_LINGUAS="ca cs da de es fr it ko nl no pl pt ru sl sv tr ja"

## --------------------- ##
## Checks for programs. ##
@@ -19670,7 +19670,7 @@
ac_config_files="$ac_config_files contrib/psset"


- ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile man/Makefile tests/Makefile tests/defs lib/Makefile auxdir/Makefile m4/Makefile etc/Makefile etc/a2ps_cfg etc/a2ps-site.cfg po/Makefile.in sheets/Makefile encoding/Makefile ps/Makefile afm/Makefile contrib/Makefile contrib/sample/Makefile contrib/emacs/Makefile fonts/Makefile ppd/Makefile"
+ ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile man/Makefile tests/Makefile tests/defs lib/Makefile libjcode/Makefile auxdir/Makefile m4/Makefile etc/Makefile etc/a2ps_cfg etc/a2ps-site.cfg po/Makefile.in sheets/Makefile encoding/Makefile ps/Makefile afm/Makefile contrib/Makefile contrib/sample/Makefile contrib/emacs/Makefile fonts/Makefile ppd/Makefile"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -20239,6 +20239,7 @@
"tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
"tests/defs" ) CONFIG_FILES="$CONFIG_FILES tests/defs" ;;
"lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+ "libjcode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libjcode/Makefile" ;;
"auxdir/Makefile" ) CONFIG_FILES="$CONFIG_FILES auxdir/Makefile" ;;
"m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
"etc/Makefile" ) CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
@@ -20425,6 +20426,8 @@
s,@LPR_QUEUE_OPTION@,$LPR_QUEUE_OPTION,;t t
s,@MEDIUM@,$MEDIUM,;t t
s,@ENCODING@,$ENCODING,;t t
+s,@COMPILE_LIBJCODE@,$COMPILE_LIBJCODE,;t t
+s,@LIBJCODELIBS@,$LIBJCODELIBS,;t t
s,@COM_gv@,$COM_gv,;t t
s,@gv@,$gv,;t t
s,@COM_ghostview@,$COM_ghostview,;t t
diff -Naur a2ps-4.13c.work/configure.in a2ps-4.13/configure.in
--- a2ps-4.13c.work/configure.in Tue Mar 22 19:33:37 2005
+++ a2ps-4.13/configure.in Wed Mar 23 16:27:52 2005
@@ -23,7 +23,7 @@
AC_SUBST(GNU_PACKAGE)

# Available translations
-ALL_LINGUAS="ca cs da de es fr it ko nl no pl pt ru sl sv tr"
+ALL_LINGUAS="ca cs da de es fr it ko nl no pl pt ru sl sv tr ja"

## --------------------- ##
## Checks for programs. ##
@@ -71,7 +71,7 @@
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 locale.h)

## --------------------- ##
## Checks for typedefs. ##
@@ -286,7 +286,8 @@
COMPILE_LIBJCODE=$enableval, COMPILE_LIBJCODE=yes)
if test "$COMPILE_LIBJCODE" = "yes"; then
LIBJCODELIBS=\$\(top_builddir\)/libjcode/libjcode.a
- AC_DEFINE(USE_LIBJCODE)
+ AC_DEFINE(USE_LIBJCODE, 1,
+ [Define if you want to use libjcode.])
ENCODING=euc-jp
fi
AC_SUBST(COMPILE_LIBJCODE)
diff -Naur a2ps-4.13c.work/contrib/sample/Makefile.am a2ps-4.13/contrib/sample/Makefile.am
--- a2ps-4.13c.work/contrib/sample/Makefile.am Sat Sep 27 04:40:37 2003
+++ a2ps-4.13/contrib/sample/Makefile.am Wed Mar 23 16:56:27 2005
@@ -34,5 +34,5 @@
sample_SOURCES = main.c

INCLUDES = -I. -I.. -I$(top_builddir) -I$(top_srcdir)/intl -I$(top_srcdir)/lib
-sample_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+sample_LDADD = $(top_builddir)/lib/liba2ps.la $(LTLIBINTL) -lm
DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\"
diff -Naur a2ps-4.13c.work/contrib/sample/Makefile.in a2ps-4.13/contrib/sample/Makefile.in
--- a2ps-4.13c.work/contrib/sample/Makefile.in Sat Sep 27 05:07:22 2003
+++ a2ps-4.13/contrib/sample/Makefile.in Wed Mar 23 16:56:42 2005
@@ -171,7 +171,7 @@
sample_SOURCES = main.c

INCLUDES = -I. -I.. -I$(top_builddir) -I$(top_srcdir)/intl -I$(top_srcdir)/lib
-sample_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+sample_LDADD = $(top_builddir)/lib/liba2ps.la $(LTLIBINTL) -lm
DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\"
subdir = contrib/sample
mkinstalldirs = $(SHELL) $(top_srcdir)/auxdir/mkinstalldirs
diff -Naur a2ps-4.13c.work/fink/a2ps-ja-install a2ps-4.13/fink/a2ps-ja-install
--- a2ps-4.13c.work/fink/a2ps-ja-install Thu Jan 1 09:00:00 1970
+++ a2ps-4.13/fink/a2ps-ja-install Wed Mar 23 16:27:52 2005
@@ -0,0 +1,41 @@
+#! /bin/sh -e
+# @PREFIX@/lib/emacsen-common/packages/install/a2ps-ja
+
+FLAVOR=$1
+PACKAGE=a2ps-ja
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+# SITEFLAG="-no-site-file"
+#else
+# SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=@PREFIX@/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=@PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist.
+# Maybe somebody will write it.
+if test -x @PREFIX@/sbin/install-info-altdir; then
+ echo install/${PACKAGE}: install Info links for ${FLAVOR}
+ install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} @PREFIX@/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
diff -Naur a2ps-4.13c.work/fink/a2ps-ja-remove a2ps-4.13/fink/a2ps-ja-remove
--- a2ps-4.13c.work/fink/a2ps-ja-remove Thu Jan 1 09:00:00 1970
+++ a2ps-4.13/fink/a2ps-ja-remove Wed Mar 23 16:27:52 2005
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# @PREFIX@/lib/emacsen-common/packages/remove/a2ps-ja
+
+FLAVOR=$1
+PACKAGE=a2ps-ja
+
+if [ ${FLAVOR} != emacs ]; then
+ if test -x @PREFIX@/sbin/install-info-altdir; then
+ echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+ install-info-altdir --quiet --remove --dirname=${FLAVOR} @PREFIX@/info/a2ps.info.gz
+ fi
+
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf @PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
diff -Naur a2ps-4.13c.work/fink/a2ps-ja-startup a2ps-4.13/fink/a2ps-ja-startup
--- a2ps-4.13c.work/fink/a2ps-ja-startup Thu Jan 1 09:00:00 1970
+++ a2ps-4.13/fink/a2ps-ja-startup Wed Mar 23 16:27:52 2005
@@ -0,0 +1,31 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file for the Fink a2ps package
+
+;; We have to add this to the load-path:
+(setq load-path (cons (concat "@PREFIX@/share/"
+ (symbol-name fink-emacs-flavor)
+ "/site-lisp/a2ps-ja") load-path))
+;; a2ps
+(autoload 'a2ps-mode "a2ps-mode" nil t)
+(setq auto-mode-alist
+ (cons '(".*\\.a2ps$" . a2ps-mode)
+ auto-mode-alist))
+
+;; a2ps-print
+(load "a2ps-print")
+
+(if (featurep 'xemacs)
+ (progn
+ (global-set-key 'f22 'a2ps-buffer)
+ (global-set-key '(shift f22) 'a2ps-region-1)
+ (add-menu-button '("File") ["a2ps-print" a2ps-buffer "--"])
+ )
+ (progn
+ (global-set-key [f22] 'a2ps-buffer)
+ (global-set-key [S-f22] 'a2ps-region-1)
+ (define-key-after menu-bar-files-menu [a2ps-print]
+ '(menu-item "a2ps" a2ps-buffer :help "Print with a2ps")
+ 'ps-print-region)
+ )
+ )
diff -Naur a2ps-4.13c.work/lib/printers.c a2ps-4.13/lib/printers.c
--- a2ps-4.13c.work/lib/printers.c Sat Sep 27 04:40:39 2003
+++ a2ps-4.13/lib/printers.c Wed Mar 23 16:27:52 2005
@@ -315,8 +315,8 @@
res->ppd = NULL; /* Printer's ppd are not read yet */

/* Output */
- /* Default is to send to default printer */
- res->flag_output_is_printer = true;
+ /* Default is to send to stdout */
+ res->flag_output_is_printer = false;
res->flag_output_name = NULL;
res->output_is_file = true;
res->output_name = NULL;
diff -Naur a2ps-4.13c.work/lib/userdata.c a2ps-4.13/lib/userdata.c
--- a2ps-4.13c.work/lib/userdata.c Tue Mar 5 03:46:25 2002
+++ a2ps-4.13/lib/userdata.c Wed Mar 23 16:27:52 2005
@@ -76,9 +76,11 @@
else
login = NULL;

+#if defined(USE_LIBJCODE)
+ name = login; /* XXX */
+#elif defined(HAVE_STRUCT_PASSWD_PW_GECOS)
/* The field `pw_gecos' contains the full name and comments, such as
phone number etc. */
-#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
if (passwd && passwd->pw_gecos)
{
char *gecos = NULL;
diff -Naur a2ps-4.13c.work/po/ja.po a2ps-4.13/po/ja.po
--- a2ps-4.13c.work/po/ja.po Tue Mar 22 19:33:37 2005
+++ a2ps-4.13/po/ja.po Wed Mar 23 16:27:52 2005
@@ -4,33 +4,36 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: a2ps 4.13\n"
-"POT-Creation-Date: 2000-06-20 19:30+0900\n"
-"PO-Revision-Date: 2000-06-20 21:30+0900\n"
-"Last-Translator: Yasuyuki Furukawa \n"
+"Project-Id-Version: a2ps 4.13c\n"
+"POT-Creation-Date: 2003-09-27 05:14+0900\n"
+"PO-Revision-Date: 2003-09-27 05:14+0900\n"
+"Last-Translator: Mamoru KOMACHI \n"
"Language-Team: Japanese\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=EUC-JP\n"
"Content-Transfer-Encoding: 8-bit\n"

-#. TRANS: the type of the end-of-line rules, is `any type', i.e.
-#. lines ended by \n, or \r, or \r\n, or \n\r are OK
-#: src/buffer.c:67
+#: src/buffer.c:68
msgid "any type"
msgstr "全てのタイプ"

-#: lib/routines.c:160 lib/xbackupfile.c:248 lib/xbackupfile.c:276
-#: lib/xbackupfile.c:284 src/delegate.c:260
+#: src/delegate.c:137 lib/confg.c:268 lib/encoding.c:530 lib/encoding.c:576
+#: lib/encoding.c:616 lib/output.c:302 lib/pair_ht.c:296 lib/prolog.c:146
+#, c-format
+msgid "missing argument for `%s'"
+msgstr "`%s' に必要な引数が足りません"
+
+#: src/delegate.c:260 lib/routines.c:160 lib/xbackupfile.c:248
+#: lib/xbackupfile.c:276 lib/xbackupfile.c:284
#, c-format
msgid "cannot create file `%s'"
msgstr "ファイル`%s'を作成できません"

-#: lib/routines.c:190 lib/routines.c:196 src/delegate.c:269 src/select.c:159
+#: src/delegate.c:269 src/select.c:159 lib/routines.c:190 lib/routines.c:196
#, c-format
msgid "cannot open a pipe on `%s'"
msgstr "`%s'のパイプを開けません"

-#. E.g.: Delegation `PsNup', from ps to ps
#: src/delegate.c:389
#, c-format
msgid "Delegation `%s', from %s to %s\n"
@@ -45,14 +48,13 @@
msgid "`%s' is a directory"
msgstr "`%s'はディレクトリです"

-#: lib/confg.c:288 lib/confg.c:451 lib/routines.c:154 src/generate.c:96
-#: src/main.c:558 src/main.c:580
+#: src/generate.c:96 src/main.c:558 src/main.c:580 lib/confg.c:292
+#: lib/confg.c:455 lib/routines.c:154
#, c-format
msgid "cannot open file `%s'"
msgstr "ファイル`%s'を開けません"

-#. Another kind of error occured: exit
-#: lib/xbackupfile.c:224 src/generate.c:101
+#: src/generate.c:101 lib/xbackupfile.c:224
#, c-format
msgid "cannot get informations on file `%s'"
msgstr "ファイル`%s'上の情報を取得できません"
@@ -89,12 +91,12 @@

#: src/generate.c:226
msgid "[1 line wrapped]\n"
-msgstr "[1行 折り畳み]\n"
+msgstr "[1行 折り返し]\n"

#: src/generate.c:229
#, c-format
msgid "[%d lines wrapped]\n"
-msgstr "[%d行 折り畳み]\n"
+msgstr "[%d行 折り返し]\n"

#: src/generate.c:242
msgid "[No output produced]\n"
@@ -103,7 +105,7 @@
#: src/generate.c:314
#, c-format
msgid "%s, delegated to %s"
-msgstr "%s, %sへフィルタます "
+msgstr "%s, %sへフィルタします "

#: src/generate.c:322
#, c-format
@@ -124,13 +126,11 @@
msgid "plain"
msgstr "プレーン"

-#: /home/akim/src/a2ps-4.12/src/lexssh.l:348
+#: lexssh.l:348
msgid "end-of-line in string constant"
msgstr "文字列中に行末がきています"

-#. TRANS: %s is ".." or <..> or /../ etc.
-#: /home/akim/src/a2ps-4.12/src/lexssh.l:415 src/sheets-map.l:152
-#: src/sheets-map.l:191
+#: lexssh.l:415 src/sheets-map.l:152 src/sheets-map.l:191
#, c-format
msgid "end of line inside a %s"
msgstr "%s 文字列中に行末がきています"
@@ -140,27 +140,23 @@
msgid "received signal %d: %s"
msgstr "シグナル%dを受け取りました: %s"

-#. TRANS: highlighting level = heavy (2/2)
#: src/main.c:240
msgid "heavy"
msgstr "ヘビー"

-#. TRANS: highlighting level = normal (1/2)
#: src/main.c:244
msgid "normal"
msgstr "通常"

-#. TRANS: highlighting level = none (0/2)
#: src/main.c:248
msgid "none"
msgstr "なし"

-#. This is just so that gettext knows I use those two strings.
-#: src/main.c:322
+#: src/main.c:322 src/main.c:326
msgid "yes"
msgstr ""

-#: src/main.c:323 src/main.c:367
+#: src/main.c:323 src/main.c:326 src/main.c:367
msgid "no"
msgstr "無効"

@@ -211,12 +207,10 @@
msgid "font size is %gpt"
msgstr "%gptフォントサイズ"

-#. number line: each line
#: src/main.c:371
msgid "each line"
msgstr "各行"

-#. number line: each %d line
#: src/main.c:375
#, c-format
msgid "each %d lines"
@@ -289,8 +283,6 @@
" 強制印刷 = %s\n"
" 外部フィルタリング = %s\n"

-#. TRANS: a2ps -E --list=options. Warning, this answer is also
-#. used for the PPD file. Make it compatible with both.
#: src/main.c:436 src/main.c:502
msgid "selected automatically"
msgstr "自動選択"
@@ -318,7 +310,6 @@
msgid "simple backups of every file"
msgstr "各ファイルの単純バックアップ"

-#. appears in a2ps --version-=existing --list=defaults
#: src/main.c:469
msgid ""
"numbered backups of files already numbered,\n"
@@ -366,7 +357,7 @@
" 標準 PPD = %s\n"
" ページラベル形式 = %s\n"
" 印刷部数 = %d\n"
-" サイド/シート = %d\n"
+" サイド/シート = %s\n"
" ページデバイス定義 = "

#: src/main.c:513
@@ -376,11 +367,8 @@
#: src/main.c:516
#, c-format
msgid " page prefeed = %s\n"
-msgstr " ページプレフィード = %d\n"
+msgstr " ページ先送り = %s\n"

-#.
-#. * Internal Details
-#.
#: src/main.c:525
msgid "Internals:\n"
msgstr "内部情報:\n"
@@ -429,8 +417,8 @@
" --list=defaults display default settings and parameters\n"
" --list=TOPIC detailed list on TOPIC (delegations, encodings, "
"features,\n"
-" variables, media, ppd, printers, prologues, "
-"style-sheets,\n"
+" variables, media, ppd, printers, prologues, style-"
+"sheets,\n"
" user-options)\n"
msgstr ""
" --version バージョンを表示する\n"
@@ -692,8 +680,8 @@

#: src/main.c:818
msgid ""
-"News, updates and documentation: visit "
-"http://www.inf.enst.fr/~demaille/a2ps/.\n"
+"News, updates and documentation: visit http://www.inf.enst.fr/~demaille/"
+"a2ps/.\n"
msgstr ""
"新着情報や、更新情報、ドキュメントには、\n"
" http://www.inf.enst.fr/~demaille/a2ps/ を訪れてください。\n"
@@ -731,15 +719,12 @@
msgid "no key defined for `%s'"
msgstr "`%s'に対するキーは定義されていません"

-#: /home/akim/src/a2ps-4.12/lib/fonts.l:837
-#: /home/akim/src/a2ps-4.12/lib/fonts.l:839
-#: /home/akim/src/a2ps-4.12/lib/fonts.l:841 lib/pathwalk.c:328
-#: lib/pathwalk.c:414 src/select.c:122 src/ssheet.c:866
+#: src/select.c:122 src/ssheet.c:866 fonts.l:837 fonts.l:839 fonts.l:841
+#: lib/pathwalk.c:328 lib/pathwalk.c:414
#, c-format
msgid "cannot find file `%s'"
msgstr "ファイル`%s'が見つかりません"

-#. sheets.map can not be found: there is no automatic prettyprinting
#: src/select.c:124
msgid "automatic style selection cancelled"
msgstr "自動スタイル選択がキャンセルされました"
@@ -813,40 +798,35 @@
msgid "write error"
msgstr "書き込みエラー"

-#: lib/confg.c:253 lib/encoding.c:639
+#: lib/confg.c:257 lib/encoding.c:638
#, c-format
msgid "invalid option `%s'"
msgstr "間違ったオプションです: `%s'"

-#: lib/confg.c:264 lib/encoding.c:577 lib/encoding.c:617 lib/prolog.c:146
-#, c-format
-msgid "missing argument for `%s'"
-msgstr "`%s'に対する引数が足りません"
-
-#: lib/confg.c:320 lib/confg.c:327 lib/confg.c:334
+#: lib/confg.c:324 lib/confg.c:331 lib/confg.c:338
#, c-format
msgid "invalid definition for printer `%s': %s"
msgstr "おかしなプリンタの定義です `%s': %s"

-#: lib/confg.c:325 lib/confg.c:328
+#: lib/confg.c:329 lib/confg.c:332 lib/printers.c:47
msgid "Unknown Printer"
msgstr "不明なプリンタ"

-#: lib/confg.c:332 lib/confg.c:335
+#: lib/confg.c:336 lib/confg.c:339 lib/printers.c:46
msgid "Default Printer"
msgstr "標準プリンタ"

-#: lib/confg.c:388 lib/options.c:703
+#: lib/confg.c:392 lib/options.c:697
#, c-format
msgid "invalid variable identifier `%s'"
msgstr "おかしな変数証明です `%s'"

-#: lib/confg.c:417
+#: lib/confg.c:421
#, c-format
msgid "obsolete `%s' entry. Ignored"
msgstr "旧式の`%s'エントリです. 無効です"

-#: lib/encoding.c:1115 lib/encoding.c:1136
+#: lib/encoding.c:1114 lib/encoding.c:1135
msgid "Known Encodings"
msgstr "利用可能なエンコード"

@@ -904,13 +884,16 @@
msgid "dimensions"
msgstr "ディメンジョン"

-#. TRANS: Variables (formely called `macro meta sequences', eeeaerk)
-#. are things such as #(psnup) which is substituted to a bigger strings,
-#. e.g. -#v #?q|-q|| #?j|-d|| #?r||-c| -w#w -h#h
#: lib/metaseq.c:104 lib/metaseq.c:113
msgid "Known Variables"
msgstr "利用可能な変数"

+#: lib/metaseq.c:162 lib/metaseq.c:531 lib/metaseq.c:548 lib/metaseq.c:608
+#: lib/metaseq.c:951 lib/metaseq.c:972
+#, c-format
+msgid "%s: missing `%c' for %s%c escape"
+msgstr "%s: 文字 `%c' が %s%c エスケープに必要です"
+
#: lib/metaseq.c:288 lib/metaseq.c:300
#, c-format
msgid "Printed by %s"
@@ -931,16 +914,10 @@
msgid "%s: too long argument for %s escape"
msgstr "%s: エスケープ%sに対する引数が長過ぎます"

-#. Translators: please make a short date format
-#. * according to the std form in your language, using
-#. * the standard strftime(3)
#: lib/metaseq.c:364 lib/metaseq.c:675
msgid "%b %d, %y"
msgstr "%y年 %b%e日"

-#. Translators: please make a long date format
-#. * according to the std form in your language, using
-#. * GNU strftime(3)
#: lib/metaseq.c:373 lib/metaseq.c:684
msgid "%A %B %d, %Y"
msgstr "%Y年 %b%e日 %A"
@@ -952,35 +929,26 @@
msgid "%s: unknown `%s' escape `%c' (%d)"
msgstr "%s: 不明な `%s'エスケープ `%c' (%d)"

-#. `%q' localized `Page %d'
#: lib/metaseq.c:426 lib/metaseq.c:815
#, c-format
msgid "Page %d"
msgstr "%dページ"

-#. `%Q' localized `Page %d/%c'
#: lib/metaseq.c:431 lib/metaseq.c:826
#, c-format
msgid "Page %d/%c"
msgstr "%d/%c ページ"

-#: lib/metaseq.c:531 lib/metaseq.c:548 lib/metaseq.c:608 lib/metaseq.c:951
-#: lib/metaseq.c:972
-#, c-format
-msgid "%s: missing `%c' for %s%c escape"
-msgstr "%s: `%c'がエスケープ %s%cに対して不足しています"
-
#: lib/metaseq.c:593 lib/metaseq.c:1021
#, c-format
msgid "%s: invalid separator `%s%c' for `%s' escape"
-msgstr "%s: `%s%c'はエスケープ %s%cに対して不適切です"
+msgstr "%s: セパレータ`%s%c'はエスケープ%sに対して不適切です"

#: lib/metaseq.c:601 lib/metaseq.c:611
#, c-format
msgid "%s: invalid argument for %s%c escape"
msgstr "%s: エスケープ %s%cに対して不適切な引数です"

-#. This file is finised, we do know its real number of pages
#: lib/metaseq.c:822
#, c-format
msgid "Page %d/%d"
@@ -1093,8 +1061,6 @@
msgid "Known User Options"
msgstr "利用可能なユーザオプション"

-#. If XALLOC_FAIL_FUNC is NULL, or does return, display this message
-#. before exiting when memory is exhausted. Goes through gettext.
#: lib/xbackupfile.c:105 lib/xmalloc.c:66
msgid "Memory exhausted"
msgstr "メモリが足りません"
@@ -1119,8 +1085,6 @@
msgid "ambiguous argument %s for `%s'"
msgstr "曖昧な引数`%s'が`%s'に対して指定されています"

-#. We try to put synonyms on the same line. The assumption is that
-#. synonyms follow each other
#: lib/argmatch.c:178
msgid "Valid arguments are:"
msgstr "おかしな引数です:"
@@ -1149,19 +1113,16 @@
msgid "%s: option `%s' requires an argument\n"
msgstr "%s: オプション`%s'には引数が必要です\n"

-#. --option
#: lib/getopt.c:752
#, c-format
msgid "%s: unrecognized option `--%s'\n"
msgstr "%s: 不明なオプションです `--%s'\n"

-#. +option or -option
#: lib/getopt.c:756
#, c-format
msgid "%s: unrecognized option `%c%s'\n"
msgstr "%s: 不明なオプションです `%c%s'\n"

-#. 1003.2 specifies the format of this message.
#: lib/getopt.c:782
#, c-format
msgid "%s: illegal option -- %c\n"
@@ -1172,7 +1133,6 @@
msgid "%s: invalid option -- %c\n"
msgstr "%s: 不適切なオプションです -- %c\n"

-#. 1003.2 specifies the format of this message.
#: lib/getopt.c:815 lib/getopt.c:945
#, c-format
msgid "%s: option requires an argument -- %c\n"
@@ -1187,4 +1147,3 @@
#, c-format
msgid "%s: option `-W %s' doesn't allow an argument\n"
msgstr "%s: オプション`-W %s'は引数を取りません\n"
-
diff -Naur a2ps-4.13c.work/src/Makefile.am a2ps-4.13/src/Makefile.am
--- a2ps-4.13c.work/src/Makefile.am Sat Sep 27 04:40:42 2003
+++ a2ps-4.13/src/Makefile.am Wed Mar 23 16:27:52 2005
@@ -28,7 +28,7 @@

bin_PROGRAMS = a2ps

-DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/locale\"
+DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/locale\" -DUSE_GNU_ICONV

a2ps_SOURCES = main.c \
read.c sshread.c ssheet.c select.c generate.c \
@@ -49,8 +49,8 @@
# I don't really understand why I have to put srcdir here, but
# it is needed for yacc and lex files (seems related to #line, but
# I really don't understand why)...
-INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/intl
+INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/intl -I$(top_builddir)/libjcode

-a2ps_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+a2ps_LDADD = $(top_builddir)/lib/liba2ps.la $(LTLIBINTL) @LEXLIB@ @LIBJCODELIBS@ -liconv -lm

EXTRA_DIST = $(BUILT_SOURCES)
diff -Naur a2ps-4.13c.work/src/Makefile.in a2ps-4.13/src/Makefile.in
--- a2ps-4.13c.work/src/Makefile.in Sat Sep 27 05:07:37 2003
+++ a2ps-4.13/src/Makefile.in Wed Mar 23 16:27:52 2005
@@ -142,7 +142,7 @@

bin_PROGRAMS = a2ps

-DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/locale\"
+DEFS = @DEFS@ -DLOCALEDIR=\"$(datadir)/locale\" -DUSE_GNU_ICONV

a2ps_SOURCES = main.c \
read.c sshread.c ssheet.c select.c generate.c \
@@ -164,9 +164,9 @@
# I don't really understand why I have to put srcdir here, but
# it is needed for yacc and lex files (seems related to #line, but
# I really don't understand why)...
-INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/intl
+INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/intl -I$(top_builddir)/libjcode

-a2ps_LDADD = $(top_builddir)/lib/liba2ps.la @LIBINTL@ -lm
+a2ps_LDADD = $(top_builddir)/lib/liba2ps.la $(LTLIBINTL) @LEXLIB@ @LIBJCODELIBS@ -liconv -lm

EXTRA_DIST = $(BUILT_SOURCES)
subdir = src
diff -Naur a2ps-4.13c.work/src/buffer.c a2ps-4.13/src/buffer.c
--- a2ps-4.13c.work/src/buffer.c Tue Mar 22 19:33:38 2005
+++ a2ps-4.13/src/buffer.c Thu Mar 24 12:14:11 2005
@@ -44,6 +44,9 @@
#ifdef USE_LIBJCODE
#include "jlib.h"
extern use_libjcode;
+#ifdef USE_GNU_ICONV
+#include
+#endif
#endif

/****************************************************************/
@@ -426,8 +429,78 @@
obstack_1grow (&buffer->obstack, '\0');
if (use_libjcode == true)
{
+ const char *input = obstack_finish(&buffer->obstack);
if(buffer->content) free(buffer->content);
- buffer->content = toStringEUC(obstack_finish (&buffer->obstack));
+#ifdef USE_GNU_ICONV
+ {
+ static iconv_t ucs4_cd, eucjp_cd;
+ static open_done = 0, open_err = 0;
+ size_t r;
+ static char buf[16384]; /* XXX */
+ size_t inbytesleft, outbytesleft;
+ const char *ip;
+ char *op;
+
+ buf[sizeof(buf) - 1] = 0;
+ if (open_err) {
+ goto not_utf8;
+ } else if (!open_done) {
+ /* GNU libiconv only */
+ ucs4_cd = iconv_open("utf-32be", "utf-8");
+ eucjp_cd = iconv_open("euc-jp//TRANSLIT", "utf-8");
+ if (eucjp_cd == (iconv_t)-1 && errno == EINVAL)
+ eucjp_cd = iconv_open("euc-jp", "utf-8");
+ if (ucs4_cd == (iconv_t)-1 || eucjp_cd == (iconv_t)-1) {
+ open_err = 1;
+ goto not_utf8;
+ }
+ open_done = 1;
+ }
+ ip = input;
+ inbytesleft = strlen(input) + 1;
+ op = buf;
+ outbytesleft = sizeof(buf) - 1;
+ r = iconv(ucs4_cd, &ip, &inbytesleft, &op, &outbytesleft);
+ if (r || inbytesleft)
+ goto not_utf8;
+
+ ip = input;
+ inbytesleft = strlen(input);
+ op = buf;
+ outbytesleft = sizeof(buf) - 1;
+
+ while (inbytesleft) {
+ r = iconv(eucjp_cd, &ip, &inbytesleft, &op, &outbytesleft);
+ if (r == (size_t)-1) {
+ if (errno == E2BIG)
+ break;
+ else if (errno == EINVAL)
+ goto not_utf8;
+ assert(errno == EILSEQ);
+ assert(inbytesleft != 0);
+ /* dispose an unicode character */
+ do {
+ ++ip;
+ --inbytesleft;
+ } while(inbytesleft && (((unsigned char)*ip & 0xc0) == 0x80));
+ /* then output "geta" */
+ if (outbytesleft >= 2) {
+ *op++ = '\xa2';
+ *op++ = '\xae';
+ outbytesleft -= 2;
+ }
+ }
+ }
+ *op = 0;
+ buffer->content = (uchar *)xstrdup(buf);
+ goto conv_done;
+ }
+not_utf8:
+#endif
+ buffer->content = toStringEUC((char *)input);
+#ifdef USE_GNU_ICONV
+conv_done:;
+#endif
}
else
buffer->content = (uchar *) obstack_finish (&buffer->obstack);
diff -Naur a2ps-4.13c.work/src/main.c a2ps-4.13/src/main.c
--- a2ps-4.13c.work/src/main.c Sat Sep 27 04:40:42 2003
+++ a2ps-4.13/src/main.c Thu Mar 24 11:48:31 2005
@@ -940,11 +940,23 @@
Copyright (c) 1995-2000 Akim Demaille, Miguel Santana");

/* Set the NLS on */
- setlocale (LC_TIME, "");
+ {
+ char *locale = setlocale(LC_ALL, "");
+ locale = xstrdup(locale ? locale : "C");
+ setlocale(LC_ALL, "C");
+ if (!strcmp(locale, "ja_JP.UTF-8")) {
+ setenv("LC_TIME", "C", 1); /* for libintl */
+ setenv("LC_MESSAGES", "C", 1); /* for libintl */
+ setlocale(LC_CTYPE, "ja_JP.eucJP");
+ } else {
+ setlocale(LC_TIME, "");
#ifdef HAVE_LC_MESSAGES
- setlocale (LC_MESSAGES, "");
+ setlocale (LC_MESSAGES, "");
#endif
- setlocale (LC_CTYPE, "");
+ setlocale (LC_CTYPE, "");
+ }
+ free(locale);
+ }

bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);