/[packages]/updates/1/hplip/current/SOURCES/hplip-pjl-duplex-binding.patch
ViewVC logotype

Contents of /updates/1/hplip/current/SOURCES/hplip-pjl-duplex-binding.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 142615 - (show annotations) (download)
Mon Sep 12 08:06:27 2011 UTC (12 years, 7 months ago) by doktor5000
File size: 2624 byte(s)
SILENT: copy from cauldron for updates
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## pjl-duplex-binding.dpatch by <till.kamppeter@gmail.com>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: https://bugs.launchpad.net/hplip/+bug/244295
6
7 @DPATCH@
8 diff -urNad hplip-2.8.7~/prnt/hpijs/ljcolor.cpp hplip-2.8.7/prnt/hpijs/ljcolor.cpp
9 --- hplip-2.8.7~/prnt/hpijs/ljcolor.cpp 2008-07-30 18:44:30.000000000 +0200
10 +++ hplip-2.8.7/prnt/hpijs/ljcolor.cpp 2008-09-23 13:17:01.000000000 +0200
11 @@ -325,6 +325,19 @@
12
13 err = thePrinter->Send ((const BYTE *) res, strlen (res));
14
15 +// Binding directive
16 +
17 + strcpy (res, "@PJL SET BINDING=LONGEDGE\015\012");
18 +
19 +#ifdef APDK_AUTODUPLEX
20 + if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
21 + {
22 + strcpy (res, "@PJL SET BINDING=SHORTEDGE\015\012");
23 + }
24 +#endif
25 +
26 + err = thePrinter->Send ((const BYTE *) res, strlen (res));
27 +
28
29 err = thePrinter->Send ((const BYTE*) EnterLanguage, sizeof (EnterLanguage));
30 ERRCHECK;
31 diff -urNad hplip-2.8.7~/prnt/hpijs/ljjetready.cpp hplip-2.8.7/prnt/hpijs/ljjetready.cpp
32 --- hplip-2.8.7~/prnt/hpijs/ljjetready.cpp 2008-07-30 18:44:30.000000000 +0200
33 +++ hplip-2.8.7/prnt/hpijs/ljjetready.cpp 2008-09-23 13:17:01.000000000 +0200
34 @@ -324,6 +324,17 @@
35 err = thePrinter->Send ((const BYTE *) szScratchStr, strlen (szScratchStr));
36 ERRCHECK;
37
38 + // Send the Binding command
39 + strcpy (szScratchStr, "@PJL SET BINDING=LONGEDGE\015\012");
40 +#ifdef APDK_AUTODUPLEX
41 + if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
42 + {
43 + strcpy (szScratchStr, "@PJL SET BINDING=SHORTEDGE\015\012");
44 + }
45 +#endif
46 + err = thePrinter->Send ((const BYTE *) szScratchStr, strlen (szScratchStr));
47 + ERRCHECK;
48 +
49 //Set the resolution to 600
50 err = thePrinter->Send ((const BYTE*)ccpPJLSetRes,sizeof(ccpPJLSetRes));
51 ERRCHECK;
52 diff -urNad hplip-2.8.7~/prnt/hpijs/ljmono.cpp hplip-2.8.7/prnt/hpijs/ljmono.cpp
53 --- hplip-2.8.7~/prnt/hpijs/ljmono.cpp 2008-07-30 18:44:30.000000000 +0200
54 +++ hplip-2.8.7/prnt/hpijs/ljmono.cpp 2008-09-23 13:17:01.000000000 +0200
55 @@ -207,6 +207,19 @@
56 err = thePrinter->Send ((const BYTE *) res, strlen (res));
57 ERRCHECK;
58
59 +// Binding directive
60 +
61 + strcpy (res, "@PJL SET BINDING=LONGEDGE\015\012");
62 +
63 +#ifdef APDK_AUTODUPLEX
64 + if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
65 + {
66 + strcpy (res, "@PJL SET BINDING=SHORTEDGE\015\012");
67 + }
68 +#endif
69 + err = thePrinter->Send ((const BYTE *) res, strlen (res));
70 + ERRCHECK;
71 +
72 err = thePrinter->Send ((const BYTE*) EnterLanguage, sizeof (EnterLanguage));
73 ERRCHECK;
74

  ViewVC Help
Powered by ViewVC 1.1.30