diff options
author | Alan Eldridge <alane@FreeBSD.org> | 2002-07-31 08:43:03 +0000 |
---|---|---|
committer | Alan Eldridge <alane@FreeBSD.org> | 2002-07-31 08:43:03 +0000 |
commit | 5faa5abe21d2cb66cd6fa1b3638dd8f81dd3e342 (patch) | |
tree | 0a6b5bf1bbf6eee7234551b972c0e62941f40c21 | |
parent | Add FreeBSD specific _nl_language_list[] array. Remove a linux only (diff) |
Fix for cups rotatin certain jobs (e.g. a2ps) away from specified orientation.
From cups cvs. Delete this when 1.1.16 come out..
Notes
Notes:
svn path=/head/; revision=63779
-rw-r--r-- | print/cups-base/files/patch-filter-pstops.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/print/cups-base/files/patch-filter-pstops.c b/print/cups-base/files/patch-filter-pstops.c new file mode 100644 index 000000000000..a9fc1bb70767 --- /dev/null +++ b/print/cups-base/files/patch-filter-pstops.c @@ -0,0 +1,57 @@ +--- filter/pstops.c Tue May 28 15:04:50 2002 ++++ /home/alane/sw/src/cups/filter/pstops.c Thu Jun 27 12:31:45 2002 +@@ -1,5 +1,5 @@ + /* +- * "$Id: pstops.c,v 1.83 2002/05/28 19:04:50 mike Exp $" ++ * "$Id: pstops.c,v 1.85 2002/06/27 16:31:45 mike Exp $" + * + * PostScript filter for the Common UNIX Printing System (CUPS). + * +@@ -60,8 +60,8 @@ + #define LAYOUT_RLBT 2 /* Right to left, bottom to top */ + #define LAYOUT_RLTB 3 /* Right to left, top to bottom */ + #define LAYOUT_BTLR 4 /* Bottom to top, left to right */ +-#define LAYOUT_TBLR 5 /* Bottom to top, right to left */ +-#define LAYOUT_BTRL 6 /* Top to bottom, left to right */ ++#define LAYOUT_TBLR 5 /* Top to bottom, right to left */ ++#define LAYOUT_BTRL 6 /* Bottom to top, left to right */ + #define LAYOUT_TBRL 7 /* Top to bottom, right to left */ + + #define LAYOUT_NEGATEY 1 +@@ -418,23 +418,19 @@ + fputs(line, stdout); + level --; + } +- else if (strncmp(line, "%%Orientation", 13) == 0 && level == 0) ++ else if (strncmp(line, "%ESPRotation:", 13) == 0 && level == 0) + { + /* + * Reset orientation of document? + */ + +- if (strstr(line, "Landscape") != NULL && !(Orientation & 1)) +- { +- Orientation ++; +- UpdatePageVars(); +- Orientation = 1; +- } +- else if (strstr(line, "Portrait") != NULL && (Orientation & 1)) ++ int orient = (atoi(line + 13) / 90) & 3; ++ ++ if (orient != Orientation) + { +- Orientation = 4 - Orientation; ++ Orientation = (4 - Orientation + orient) & 3; + UpdatePageVars(); +- Orientation = 0; ++ Orientation = orient; + } + } + else if (strncmp(line, "%%BeginProlog", 13) == 0 && level == 0) +@@ -1646,5 +1642,5 @@ + + + /* +- * End of "$Id: pstops.c,v 1.83 2002/05/28 19:04:50 mike Exp $". ++ * End of "$Id: pstops.c,v 1.85 2002/06/27 16:31:45 mike Exp $". + */ |