From: Roger Leigh <roger.leigh@epictechnology.co.uk>
To: linux-msdos@vger.kernel.org
Subject: Re: LPT timeout and forcing a flush
Date: Wed, 21 Sep 2005 13:25:01 +0100 [thread overview]
Message-ID: <20050921122501.GB22140@epictechnology.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.62.0509210929110.5022@enm-bo-lt.localnet>
On Wed, Sep 21, 2005 at 09:33:24AM +1200, Bart Oldeman wrote:
> On Tue, 20 Sep 2005, Roger Leigh wrote:
>
> >I'm abusing INT 17h. Is there a cleaner (or at least, approved)
> >way of doing this?
>
> have a look at 1.3.2 or CVS: the flushing on dosemu's side was removed.
> Instead the byte from int17 is written directly to the file/pipe, and C
> stdio is set to use line buffering (_IOLBF), so the C library flushes
> every \n.
>
> Then the tick/timeout causes an fclose() of the printer file (or pipe).
That sounds a lot better. Unfortunately, not all the data I'm sending
is line buffered. Some are sequences of control codes I want the
device to respond to immediately: it's these I need to flush by hand.
Regards,
Roger
prev parent reply other threads:[~2005-09-21 12:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-20 14:39 LPT timeout and forcing a flush Roger Leigh
2005-09-20 21:33 ` Bart Oldeman
2005-09-21 12:25 ` Roger Leigh [this message]
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=20050921122501.GB22140@epictechnology.co.uk \
--to=roger.leigh@epictechnology.co.uk \
--cc=linux-msdos@vger.kernel.org \
/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