1
diff -Nur -x '*.orig' -x '*~' foomatic-filters-4.0.2/ChangeLog foomatic-filters-4.0.2.new/ChangeLog
2
--- foomatic-filters-4.0.2/ChangeLog 2009-06-24 13:54:33.000000000 +0200
3
+++ foomatic-filters-4.0.2.new/ChangeLog 2009-07-13 11:27:59.000000000 +0200
5
+2009-07-01 Till Kamppeter <till.kamppeter@gmail.com>
7
+ * foomaticrip.c: Do not use JCL which is preceeded to the input
8
+ data. We can generate it on our own and even merge it with the JCL
9
+ coming from the driver.
11
+ * renderer.c: Make sure that "@PJL SET ..." commands from the PPD
12
+ file do not get nmerged into the driver's PJL header too early,
13
+ expecially not before "@PJL JOB ..." lines, as then the commands
14
+ get ignored. This happened especially with the "InputSlot"
15
+ option for the "cdnj500" driver.
17
2009-06-24 Till Kamppeter <till.kamppeter@gmail.com>
19
* Tagged branch for release 4.0.2.
20
diff -Nur -x '*.orig' -x '*~' foomatic-filters-4.0.2/foomaticrip.c foomatic-filters-4.0.2.new/foomaticrip.c
21
--- foomatic-filters-4.0.2/foomaticrip.c 2009-06-24 13:54:33.000000000 +0200
22
+++ foomatic-filters-4.0.2.new/foomaticrip.c 2009-07-13 11:28:00.000000000 +0200
24
n = fread(buf, 1, sizeof(buf) - 1, file);
26
type = guess_file_type(buf, n, &startpos);
28
+ /* We do not use any JCL preceeded to the inputr data, as it is simply
29
+ the PJL commands from the PPD file, and these commands we can also
30
+ generate, end we even merge them with PJl from the driver */
31
+ /*if (startpos > 0) {
33
write_output(buf, startpos);
39
diff -Nur -x '*.orig' -x '*~' foomatic-filters-4.0.2/renderer.c foomatic-filters-4.0.2.new/renderer.c
40
--- foomatic-filters-4.0.2/renderer.c 2009-06-24 13:54:33.000000000 +0200
41
+++ foomatic-filters-4.0.2.new/renderer.c 2009-07-13 11:28:00.000000000 +0200
44
char *p = strstr(original_opts[0], jclstr);
47
+ char **optsp1 = NULL, **optsp2 = NULL;
49
/* No JCL options in original_opts, just prepend opts */
50
if (argv_count(original_opts) == 1)
52
header[p - original_opts[0]] = '\0';
53
fprintf(stream, "%s", header);
55
- for (optsp = opts; *optsp; optsp++)
56
- if (!jcl_options_find_keyword(original_opts, *optsp, jclstr))
57
- fprintf(stream, "%s\n", *optsp);
59
- for (optsp = original_opts; *(optsp + 1); optsp++) {
60
- if (optsp != original_opts) p = *optsp;
61
+ /* Insert the JCL commands from the PPD file right before the first
62
+ "@PJL SET ..." line from the, if there are no "@PJL SET ..." lines,
63
+ directly before "@PJL ENTER LANGUAGE ...", otherwise after the JCL
64
+ commands from the driver */
65
+ for (optsp1 = original_opts; *(optsp1 + 1); optsp1++) {
66
+ if (optsp2 == NULL &&
67
+ ((strstr(*optsp1, "ENTER LANGUAGE") != NULL) ||
68
+ (strncasecmp(*optsp1, "@PJL SET ", 9) == 0))) {
69
+ for (optsp2 = opts; *optsp2; optsp2++)
70
+ if (!jcl_options_find_keyword(original_opts, *optsp2, jclstr))
71
+ fprintf(stream, "%s\n", *optsp2);
73
+ if (optsp1 != original_opts) p = *optsp1;
74
if (jcl_options_find_keyword(opts, p, jclstr))
75
fprintf(stream, "%s\n", jcl_options_find_keyword(opts, p, jclstr));
77
fprintf(stream, "%s\n", p);
79
- write_binary_data(stream, *optsp, readbinarybytes);
81
+ for (optsp2 = opts; *optsp2; optsp2++)
82
+ if (!jcl_options_find_keyword(original_opts, *optsp2, jclstr))
83
+ fprintf(stream, "%s\n", *optsp2);
85
+ write_binary_data(stream, *optsp1, readbinarybytes);