Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 97763 - mpage-2.5.3-4 produces junk (problem in UTF-8 patch)
mpage-2.5.3-4 produces junk (problem in UTF-8 patch)
Product: Red Hat Linux
Classification: Retired
Component: mpage (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
  Show dependency treegraph
Reported: 2003-06-20 12:24 EDT by Need Real Name
Modified: 2007-04-18 12:54 EDT (History)
0 users

See Also:
Fixed In Version: 2.5.3-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-23 12:57:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2003-06-20 12:24:18 EDT
I have a 25-page postscript file (available gzipped at
that mpage-2.5.3-4 doesn't process right.  It produces a postscript
file with 0 pages.  The vanilla mpage-2.5.3 works fine (I built it
from the .tar.gz file using just 'make' and all the defaults).  I then
applied one patch at a time from the 2.5.3-4 SRPM.  The only patch
that made it break was mpage-2.5.3-utf8.patch

The cmd line that breaks mpage:

% ./mpage -b letter -2o < dimensional-analysis.ps

whereas if I don't use stdin, it works fine:

./mpage -b letter -2o dimensional-analysis.ps

I'm using a Pentium Linux (RH 7.3) system (I built the 2.5.3-4 RPM
from the rawhide SRPM and found the problem originally, then tracked
down the individual patches).

A minor change is that the spec file says the license is BSD but the
COPYING file is GPL v2.


Here's a bit more details of what breaks and the command sequence:

% printenv MPAGE     /* to show that MPAGE is unset */
% rm -fr mpage-2.5.3
% tar xzf mpage-2.5.3.tgz /* reinstall clean sources */
% cd mpage-2.5.3
% make
[compiles with no problem]
% ./mpage -b letter -2o < dimensional-analysis.ps | grep Pages
%%Pages: (atend)
%%%Pages: 25
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 13
[Like it should be -- 25 pages originally, now 13 2-up pages]

[Now I apply the utf8 patch:]
% patch -p1 < /usr/src/redhat/SOURCES/mpage-2.5.3-utf8.patch
patching file file.c
patching file glob.c
patching file mpage.c
patching file mpage.h
patching file text.c

% make
[All compiles fine except for the warning below:]
gcc -O2 -s -DPAGE_DEF=\"A4\" -DLIBDIR=\"/usr/local/share/mpage\" -DDEFAULT_ENCO
-o file.o file.c
file.c: In function `looks_utf8':
file.c:547: warning: array subscript has type `char'

[Now retry mpage:]
% ./mpage -b letter -2o < dimensional-analysis.ps | grep Pages
%%Pages: (atend)
%%Pages: 0
[Ack!  0 pages in the resulting file!]

[And with cmd line input instead of stdin]
% ./mpage -b letter -2o dimensional-analysis.ps | grep Pages
%%Pages: (atend)
%%%Pages: 25
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 1
%%Pages: 13
[If I use the cmd line instead of stdin, no problem.]

Note You need to log in before you can comment on or make changes to this bug.