delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/02/03:45:27

Date: Sat, 02 Dec 2000 10:40:06 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Graham Reeds" <grahamr AT dtn DOT ntl DOT com>
Message-Id: <9743-Sat02Dec2000104005+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp AT delorie DOT com
In-reply-to: <uWYV5.5346$0z.87309@news2-win.server.ntlworld.com>
(grahamr AT dtn DOT ntl DOT com)
Subject: Re: Buffering text...
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1001129114636 DOT 10519Q-100000 AT is> <xhMV5.3698$0z DOT 50352 AT news2-win DOT server DOT ntlworld DOT com> <2593-Fri01Dec2000170725+0200-eliz AT is DOT elta DOT co DOT il> <uWYV5.5346$0z DOT 87309 AT news2-win DOT server DOT ntlworld DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Graham Reeds" <grahamr AT dtn DOT ntl DOT com>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sat, 2 Dec 2000 02:13:02 -0000
> >
> > I don't see anything wrong in the code you posted.  So either the
> > problem is with the parts that you omitted, or the offending code is
> > not in this function.
> 
> Well the omitted parts are repetitive case statements very similar to the
> ones I left in.

I meant something that is outside this function.

> I put '\r\n' inside each of the cprintf(), and hey presto! - one long line
> of darkgrey periods punctuated every now and then by coloured letters. Seems
> like the cprintf() doesn't buffer (correct terminology?) the text until the
> '\r\n' arrives at the end of the loop.

You mean, `cprintf' _buffers_ text and doesn't output it until you
send "\r\n"?

That would be weird: `cprintf' doesn't do any buffering at all, it
should output everything immediately.  Hmm.  The only case where the
screen might not be updated immediately is on Far-Eastern DOS
versions.  But that's not your case, right?

What happens if you use `cputc' to output each character, instead of
`cprintf'?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019