[Foomatic] foomatic-rip bug report

Jociel Cavalcante Andrade jcainfo at inf.ufes.br
Thu Dec 16 05:17:42 PST 2004


Olá,

I found a bug into foomatic-rip filter.
When I try to use PJL with two intructions that starts with the same string,
the foomatic-rip replaces the first by the other. Thus, the first PJL
instruction not appear in output code.
For example, when I use "PJL HOLDKEY=1234" and "PJL HOLD=STORE", in this order,
the foomatic-rip think that "PJL HOLD" already exists, because the script found
the string "PJL HOLD...." included before.
Thus, the perl script replaces "PJL HOLDKEY=1234" by "PJL HOLD=STORE".

I solved this, momentarily, using "PJL HoldKey" instead of "PJL HOLDKEY".

To fix it, is enough to change the following code at foomatic-rip:

for (@jclheader) {
     # If the command is there, replace it
     $_ =~ s/$cmd.*(\r\n|\n|\r)/$line/ and
     $cmdfound = 1;
}

by:

for (@jclheader) {
     # If the command is there, replace it
     $_ =~ s/$cmd*(\r\n|\n|\r)/$line/ and
     $cmdfound = 1;
}

Note that the string "$_ =~ s/$cmd.*(\r\n|\n|\r)/$line/ and" has changed.

[]'s
Jociel



More information about the Printing-foomatic mailing list