Bug 97764 - missing newlines and percents in mpage.c (v2.5.3)
missing newlines and percents in mpage.c (v2.5.3)
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: mpage (Show other bugs)
7.3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-06-20 12:28 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:
Environment:
Last Closed: 2003-06-23 12:57:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to fix missing newlines and percents in mpage.c (1.17 KB, patch)
2003-06-20 12:33 EDT, Need Real Name
no flags Details | Diff

  None (edit)
Description Need Real Name 2003-06-20 12:28:58 EDT
Here is a patch to mpage 2.5.3.  With the -t switch, mpage produces output that
contains:

%BeginFeature: *Duplex DuplexNoTumble
<< /Duplex true /Tumble false >> setpagedevice%EndFeaturestatusdict /setduplexm
ode known { statusdict begin true setduplexmode end } if

Looks like a couple missing newlines in fprintf's in mpage.c.  While
looking at the output, I just realized that the %BeginFeature and
%EndFeature comments probably should have %%, like all the other
postscript comments, so I changed the relevant %% to %%%% in the
fprintf's (also in the patch).

Warning, I'm no postscript expert!

-Sanjoy

*** mpage-2.5.3/mpage.c.old	Wed Oct 16 16:34:51 2002
--- mpage-2.5.3/mpage.c		Wed Jun 18 16:23:58 2003
***************
*** 231,239 ****
      fprintf(outfd, "/mp_pgc statusdict begin pagecount end def\n");
      fprintf(outfd, "statusdict begin /jobname (%s) def end\n", name);
      if (opt_duplex) {
!        fprintf(outfd, "%%BeginFeature: *Duplex DuplexNoTumble\n");
!        fprintf(outfd, "<< /Duplex true /Tumble false >> setpagedevice");
!        fprintf(outfd, "%%EndFeature");
         fprintf(outfd, "statusdict /setduplexmode known");
         fprintf(outfd, " { statusdict begin true setduplexmode end } if\n");
         if (opt_tumble) {
--- 231,239 ----
      fprintf(outfd, "/mp_pgc statusdict begin pagecount end def\n");
      fprintf(outfd, "statusdict begin /jobname (%s) def end\n", name);
      if (opt_duplex) {
!        fprintf(outfd, "%%%%BeginFeature: *Duplex DuplexNoTumble\n");
!        fprintf(outfd, "<< /Duplex true /Tumble false >> setpagedevice\n");
!        fprintf(outfd, "%%%%EndFeature\n");
         fprintf(outfd, "statusdict /setduplexmode known");
         fprintf(outfd, " { statusdict begin true setduplexmode end } if\n");
         if (opt_tumble) {
Comment 1 Need Real Name 2003-06-20 12:33:28 EDT
Created attachment 92511 [details]
Patch to fix missing newlines and percents in mpage.c

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