From 5b020457848e276779bba708972d72b877abdba0 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Oct 25 2006 15:24:34 +0000 Subject: - Fixed multibyte handling (bug #212154). - Resolves: rhbz#212154 --- diff --git a/a2ps-mb.patch b/a2ps-mb.patch new file mode 100644 index 0000000..2f79272 --- /dev/null +++ b/a2ps-mb.patch @@ -0,0 +1,23 @@ +--- a2ps-4.13/lib/psgen.c.mb 2006-10-25 16:16:44.000000000 +0100 ++++ a2ps-4.13/lib/psgen.c 2006-10-25 16:18:54.000000000 +0100 +@@ -97,7 +97,8 @@ + fprintf(stderr,"%d\n",job->status->face); + if (encoding_char_exists (job->encoding, job->status->face, c) + && ((0177 < c) || (c < 040))) { +- sprintf ((char *)res, "%s\\%o", res, c); ++ char *p = res + strlen (res); ++ sprintf (p, "\\%o", c); + return 1; + } + +@@ -894,8 +895,8 @@ + 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); ++ nchars = ps_escape_char (job, mb_flag, buf); ++ nchars += ps_escape_char (job, c, buf); + job->status->wx += char_composite_WX(job, c); + job->status->column += nchars; + if (line_full) { diff --git a/a2ps.spec b/a2ps.spec index e7fe2a3..c83b4fe 100644 --- a/a2ps.spec +++ b/a2ps.spec @@ -1,7 +1,7 @@ Summary: Converts text and other types of files to PostScript(TM). Name: a2ps Version: 4.13b -Release: 58 +Release: 59 License: GPL Group: Applications/Publishing Source: ftp://ftp.enst.fr/pub/unix/a2ps/%{name}-%{version}.tar.gz @@ -36,6 +36,7 @@ Patch27: a2ps-netscape.patch Patch28: a2ps-wdiff.patch Patch29: a2ps-U.patch Patch30: a2ps-psset.patch +Patch31: a2ps-mb.patch Requires: fileutils sh-utils info BuildRequires: /usr/bin/emacs, gperf, flex, libtool, texinfo, groff BuildRequires: ImageMagick @@ -128,6 +129,9 @@ and medias. # Fixed psset sed expression (bug #209613). %patch30 -p1 -b .psset +# Fixed multibyte handling (bug #212154). +%patch31 -p1 -b .mb + # Fix reference to a2ps binary (bug #112930). perl -pi -e "s,/usr/local/bin,%{_bindir}," contrib/emacs/a2ps.el libtoolize --copy --force @@ -238,6 +242,9 @@ fi %dir %{_datadir}/a2ps %changelog +* Wed Oct 25 2006 Tim Waugh 4.13b-59 +- Fixed multibyte handling (bug #212154). + * Tue Oct 17 2006 Tim Waugh 4.13b-58 - Fixed psset sed expression (bug #209613).