9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "D. Brownlee" <ancipites@earthlink.net>
To: Russ Cox <rsc@plan9.bell-labs.com>
Cc: 9fans@cse.psu.edu
Subject: Re: [9fans] problems
Date: Tue,  1 Aug 2000 13:42:34 -0700	[thread overview]
Message-ID: <39873639.951BBF88@earthlink.net> (raw)
In-Reply-To: <200008011909.PAA15275@smtp3.fas.harvard.edu>

Hello,

The lpt driver is in /sys/src/9/pc/devlpt.c. That file has a
function outch():

	for (tries = 0;; tries++){
		status = inb(base+Qpsr);
		if(!(status & Fselect) || !(status & Fnoerror))
			Error(Eio);  /* occurs when the paper tray is empty */
		.
		.
		.
	}

which might be changed to:

	for (tries = 0;; tries++){
		status = inb(base+Qpsr);
		if(!(status & Fselect) || !(status & Fnoerror))
			if (!(status & Fpe)) { /* paper ran out */
				tries = 0;
				continue;
			}
			else
				Error(Eio);
		.
		.
		.
	}

I haven't tried this -- I haven't discovered how to rebuild
the kernel yet. 'Fpe' is already defined in devlpt.c. I may
have the test on 'Fpe' inverted -- don't know.

I think that the desired behaviour is that when the paper
runs out this will wait until someone comes by and installs
some paper, which should cause the 'Fpe' bit to change. That
is how some other PC *nix systems behave.


D. Brownlee


Russ Cox wrote:
> 
>         1. My printer's paper tray doesn't hold enough sheets to
>         print the manuals. It looks as though, in devlpt.c, that
>         outch() doesn't check for Fpe when it finds an error. This
>         was encountered when trying to print vol1.ps.
> 
> That has always annoyed me.  If you
> tell me what the code should be I'll fix it.
> 
> Russ


  parent reply	other threads:[~2000-08-01 20:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-01 19:09 Russ Cox
2000-08-01 20:10 ` [9fans] nvram etc Boyd Roberts
2000-08-01 20:42 ` D. Brownlee [this message]
2000-08-01 21:04 ` [9fans] problems D. Brownlee
  -- strict thread matches above, loose matches on Subject: below --
2000-08-01 21:26 Russ Cox
2000-08-01 22:48 ` D. Brownlee
2000-07-30 15:20 [9fans] drawterm etc Russ Cox
2000-07-31  9:09 ` [9fans] problems D. Brownlee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39873639.951BBF88@earthlink.net \
    --to=ancipites@earthlink.net \
    --cc=9fans@cse.psu.edu \
    --cc=rsc@plan9.bell-labs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).