[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

printcmd falls back to LIT (display) after 512 bytes of print output

From: Caylan Larson
Subject: printcmd falls back to LIT (display) after 512 bytes of print output
Date: Wed, 28 Nov 2012 14:34:41 -0600


It seems that printcmd is failing and never creating the pipe.

When I set:

  printcmd "cat > /tmp/screen.print"

and print this output:

^[[1;9H.R^[[24;1H^[[0K>Printing Receipt for the LAST Sale^[[5i^M
^[!)Super Test Market^[!^A^M
Wed Nov 28, 2012 at 11:34 AM  #: 9  0^M
^[! DELI:^[!^A^M
FIVE CHEESE PIZZA       1        $7.99  T L^M
SUBTOTAL   :                     $7.99^M
TAXABLE    : $7.99        TAX:   $0.56^M
TOTAL DUE  :        ^[!)    $8.55^[!^A^M
Item Count : 1^M
Sale#: 3^M
Cash : $8.55^M
^[!)$7.99^[!^A  (100%) of the Items purchased^M
came from LOCAL sources.^[! ^M
Order Everything But the Turkey from our^M
deli & relax this Thanksgiving.^[!^A^M
            T H A N K   Y O U^M
^[m^[[4i^[[24;1H^[[0K^[[1;9H                          ^[[1;9H

The display reads:

Printing Receipt for the LAST Sale
ey from our
deli & relax this Thanksgiving.

The output "ey from our" is right around the 512 byte marker for the print input.  In other words, starting at ^[[5i and ending at ^[[4i equals approximately 512 bytes.

From looking at the source I see that MAXSTR is 512 bytes and PrintFlush() is called.

  display = curr->w_pdisplay;
  if (display && printcmd)
      char *bp = curr->w_string;
      int len = curr->w_stringp - curr->w_string;
      int r;
      while (len && display->d_printfd >= 0)
          r = write(display->d_printfd, bp, len);
          if (r <= 0)
              WMsg(curr, errno, "printing aborted");
              display->d_printfd = -1;

          bp += r;
          len -= r;

My limited knowledge of C leads me to WMsg and LMsg, which should be displayed on the caption.  However, nothing is displayed indicating failure or success.  I've tried logging and verbose mode.  I'm not sure why the printcmd is failing.  What else can I check?

Thank you!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]