rpms/cups/FC-5 cups-pstops.patch,NONE,1.1 cups.spec,1.141,1.142
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Apr 6 14:14:03 UTC 2006
Author: twaugh
Update of /cvs/dist/rpms/cups/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv9902
Modified Files:
cups.spec
Added Files:
cups-pstops.patch
Log Message:
* Tue Apr 4 2006 Tim Waugh <twaugh at redhat.com>
- Build requires openldap-devel.
cups-pstops.patch:
pstops.c | 43 ++++++++++++++++++++++++++++++++-----------
1 files changed, 32 insertions(+), 11 deletions(-)
--- NEW FILE cups-pstops.patch ---
--- cups-1.2rc1/filter/pstops.c.pstops 2006-03-23 19:33:35.000000000 +0000
+++ cups-1.2rc1/filter/pstops.c 2006-04-06 15:11:02.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * "$Id: pstops.c 5326 2006-03-23 19:33:35Z mike $"
+ * "$Id: pstops.c 5369 2006-04-03 15:09:58Z mike $"
*
* PostScript filter for the Common UNIX Printing System (CUPS).
*
@@ -307,10 +307,13 @@
fputs("DEBUG: Skipping PJL header...\n", stderr);
- while (strstr(line, "ENTER LANGUAGE") == NULL)
+ while (strstr(line, "ENTER LANGUAGE") == NULL && strncmp(line, "%!", 2))
if ((len = cupsFileGetLine(fp, line, sizeof(line))) == 0)
break;
+ if (!strncmp(line, "%!", 2))
+ break;
+
if ((len = cupsFileGetLine(fp, line, sizeof(line))) == 0)
break;
}
@@ -590,6 +593,12 @@
{
if (saw_bounding_box)
fputs("ERROR: Duplicate %%BoundingBox: comment seen!\n", stderr);
+ else if (strstr(line + 14, "(atend)"))
+ {
+ /*
+ * Do nothing for now but use the default imageable area...
+ */
+ }
else if (sscanf(line + 14, "%d%d%d%d", doc->bounding_box + 0,
doc->bounding_box + 1, doc->bounding_box + 2,
doc->bounding_box + 3) != 4)
@@ -738,14 +747,26 @@
*/
fprintf(stderr, "DEBUG: Before copy_prolog - %s", line);
- copy_prolog(fp, doc, ppd, line, linelen, linesize);
+ linelen = copy_prolog(fp, doc, ppd, line, linelen, linesize);
/*
* Then the document setup section...
*/
fprintf(stderr, "DEBUG: Before copy_setup - %s", line);
- copy_setup(fp, doc, ppd, line, linelen, linesize);
+ linelen = copy_setup(fp, doc, ppd, line, linelen, linesize);
+
+ /*
+ * Copy until we see %%Page:...
+ */
+
+ while (strncmp(line, "%%Page:", 7) && strncmp(line, "%%Trailer", 9))
+ {
+ fwrite(line, 1, linelen, stdout);
+
+ if ((linelen = cupsFileGetLine(fp, line, linesize)) == 0)
+ break;
+ }
/*
* Then process pages until we have no more...
@@ -778,9 +799,9 @@
{
pageinfo = (pstops_page_t *)cupsArrayLast(doc->pages);
- start_nup(doc, doc->number_up - 1, 0, doc->bounding_box);
+ start_nup(doc, doc->number_up, 0, doc->bounding_box);
doc_puts(doc, "showpage\n");
- end_nup(doc, doc->number_up - 1);
+ end_nup(doc, doc->number_up);
pageinfo->length = cupsFileTell(doc->temp) - pageinfo->offset;
}
@@ -802,9 +823,9 @@
printf("%%%%Page: (filler) %d\n", doc->page);
}
- start_nup(doc, doc->number_up - 1, 0, doc->bounding_box);
+ start_nup(doc, doc->number_up, 0, doc->bounding_box);
doc_puts(doc, "showpage\n");
- end_nup(doc, doc->number_up - 1);
+ end_nup(doc, doc->number_up);
pageinfo->length = cupsFileTell(doc->temp) - pageinfo->offset;
}
@@ -1368,7 +1389,7 @@
{
if (level == 0 &&
(!strncmp(line, "%%Page:", 7) ||
- !strncmp(line, "%%Trailer:", 10) ||
+ !strncmp(line, "%%Trailer", 9) ||
!strncmp(line, "%%EOF", 5)))
break;
else if (!strncmp(line, "%%BeginDocument", 15) ||
@@ -2400,7 +2421,7 @@
while ((linelen = cupsFileGetLine(fp, line, linesize)) > 0)
{
if (level == 0 &&
- (!strncmp(line, "%%Page:", 7) || !strncmp(line, "%%Trailer:", 10)))
+ (!strncmp(line, "%%Page:", 7) || !strncmp(line, "%%Trailer", 9)))
break;
else if (!strncmp(line, "%%BeginDocument", 15) ||
!strncmp(line, "%ADO_BeginApplication", 21))
@@ -2870,5 +2891,5 @@
/*
- * End of "$Id: pstops.c 5326 2006-03-23 19:33:35Z mike $".
+ * End of "$Id: pstops.c 5369 2006-04-03 15:09:58Z mike $".
*/
Index: cups.spec
===================================================================
RCS file: /cvs/dist/rpms/cups/FC-5/cups.spec,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- cups.spec 4 Apr 2006 17:23:53 -0000 1.141
+++ cups.spec 6 Apr 2006 14:14:01 -0000 1.142
@@ -7,7 +7,7 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.2
-Release: 0.2.%{beta}.2.6
+Release: 0.2.%{beta}.2.7
License: GPL
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/test/cups-1.2%{beta}-source.tar.bz2
@@ -41,6 +41,7 @@
Patch18: cups-language.patch
Patch19: cups-gnome.patch
Patch20: cups-direct-usb.patch
+Patch21: cups-pstops.patch
Patch22: cups-dest-cache-v2.patch
Patch24: cups-maxlogsize.patch
Patch28: cups-no-propagate-ipp-port.patch
@@ -140,6 +141,7 @@
%patch18 -p1 -b .language
%patch19 -p1 -b .gnome
%patch20 -p1 -b .direct-usb
+%patch21 -p1 -b .pstops
%patch22 -p1 -b .dest-cache-v2
%patch24 -p1 -b .maxlogsize
%patch28 -p1 -b .no-propagate-ipp-port
@@ -390,8 +392,9 @@
%{cups_serverbin}/daemon/cups-lpd
%changelog
-* Tue Apr 4 2006 Tim Waugh <twaugh at redhat.com>
+* Thu Apr 6 2006 Tim Waugh <twaugh at redhat.com> 1:1.2-0.2.rc1.2.7
- Build requires openldap-devel.
+- Sync pstops.c with svn 5372.
* Tue Apr 4 2006 Tim Waugh <twaugh at redhat.com> 1:1.2-0.2.rc1.2.6
- Tweak to allow 'usb:/dev/usb/lp0'-style URIs again (bug #186880).
More information about the fedora-cvs-commits
mailing list