Re: Slow dosemu printing

2007-04-27 Thread Bart Oldeman

Hello,

the attached patch causes
$_lpt2=
to completely disable LPT2, independent of any $_port setting.

It also flushes every second. Let me know if it helps.

Bart
Index: src/base/dev/misc/lpt.c
===
--- src/base/dev/misc/lpt.c	(revision 1716)
+++ src/base/dev/misc/lpt.c	(working copy)
@@ -221,11 +221,11 @@
 lpt[i].remaining = -1;	/* mark not accessed yet */
 if (lpt[i].dev)
   lpt[i].fops = dev_pfops;
-else
+else if (lpt[i].prtcmd)
   lpt[i].fops = pipe_pfops;
 if (i = config.num_lpt) lpt[i].base_port = 0;
 
-if (lpt[i].base_port) {
+if (lpt[i].base_port != 0  lpt[i].fops.open) {
   io_device.start_addr = lpt[i].base_port;
   io_device.end_addr   = lpt[i].base_port + 2;
   port_register_handler(io_device, 0);
@@ -258,6 +258,8 @@
 	lpt[i].remaining--;
 	if (!lpt[i].remaining)
 	  printer_close(i);
+	else if (lpt[i].file != NULL)
+	  fflush(lpt[i].file);
   }
 }
   }


Re: Slow dosemu printing

2007-04-27 Thread Linos
Bart Oldeman escribió:
 Hello,
 
 the attached patch causes
 $_lpt2=
 to completely disable LPT2, independent of any $_port setting.
 
 It also flushes every second. Let me know if it helps.
 
 Bart

Well it seems that it was only my testing zebra printer that was failing
in a strange way, i have tested with others printers an it works very
well with $_printer_timeout = (1) thanks all by the help and sorry for
the silly problem.

Regards,
Miguel Angel.
-
To unsubscribe from this list: send the line unsubscribe linux-msdos in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html