ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.415 by root, Sat Apr 26 03:37:18 2008 UTC vs.
Revision 1.416 by root, Tue Jul 15 16:41:22 2008 UTC

2381/*----------------------------------------------------------------------*/ 2381/*----------------------------------------------------------------------*/
2382#ifdef PRINTPIPE 2382#ifdef PRINTPIPE
2383FILE * 2383FILE *
2384rxvt_term::popen_printer () 2384rxvt_term::popen_printer ()
2385{ 2385{
2386 FILE *stream = popen (rs[Rs_print_pipe], "w"); 2386 FILE *stream = popen (rs[Rs_print_pipe] ? rs[Rs_print_pipe] : PRINTPIPE, "w");
2387 2387
2388 if (stream == NULL) 2388 if (stream == NULL)
2389 rxvt_warn ("can't open printer pipe, not printing.\n"); 2389 rxvt_warn ("can't open printer pipe, not printing.\n");
2390 2390
2391 return stream; 2391 return stream;
2402 * simulate attached vt100 printer 2402 * simulate attached vt100 printer
2403 */ 2403 */
2404void 2404void
2405rxvt_term::process_print_pipe () 2405rxvt_term::process_print_pipe ()
2406{ 2406{
2407 int done; 2407 FILE *fd = popen_printer ();
2408 FILE *fd;
2409 2408
2410 if ((fd = popen_printer ()) == NULL) 2409 if (!fd)
2411 return; 2410 return;
2412 2411
2413 /* 2412 /*
2414 * Send all input to the printer until either ESC[4i or ESC[?4i 2413 * Send all input to the printer until either ESC[4i or ESC[?4i
2415 * is received. 2414 * is received.
2416 */ 2415 */
2417 for (done = 0; !done;) 2416 for (int done = 0; !done; )
2418 { 2417 {
2419 unsigned char buf[8]; 2418 unsigned char buf[8];
2420 unicode_t ch; 2419 unicode_t ch;
2421 unsigned int i, len; 2420 unsigned int i, len;
2422 2421

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines