delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/02/08:51:29.1

From: "Graham Reeds" <grahamr AT dtn DOT ntl DOT com>
Newsgroups: comp.os.msdos.djgpp
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> <9743-Sat02Dec2000104005+0200-eliz AT is DOT elta DOT co DOT il>
Subject: Re: Buffering text...
Lines: 57
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <t37W5.492$bn.14838@news2-win.server.ntlworld.com>
Date: Sat, 2 Dec 2000 13:42:15 -0000
NNTP-Posting-Host: 62.254.78.177
X-Complaints-To: abuse AT ntlworld DOT com
X-Trace: news2-win.server.ntlworld.com 975764825 62.254.78.177 (Sat, 02 Dec 2000 13:47:05 GMT)
NNTP-Posting-Date: Sat, 02 Dec 2000 13:47:05 GMT
Organization: ntlworld News Service
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> wrote in message
news:9743-Sat02Dec2000104005+0200-eliz AT is DOT elta DOT co DOT il...

>
> 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"?

I think there was some confusion here on my part. I meant 'one long
*vertical* line of darkgrey periods'.  My fault.

I meant if cprintf() buffered the text that I pass in, then surely when I
pass the '\r\n' to it, then everything that went before it would be sent to
the screen, yet in actual fact '\r\n' causes nothing to be echoed to the
screen at all - presumably because there is nothing before the '\r\n' and so
nothing get sent.

btw - what are those '\r \n' etc. things called the % are printf
specifiers - are they grouped under the same name?

>
> 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?

No, I'm running Win98SE in a DOSbox.

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

Well I can't find cputc() anywhere, nor can I find any reference to it in
libc.a 2.03 reference either - do you mean cputs()? Because I get the same
problem - no update whatsoever.  However I do get slightly better results
when I pass '\r' with the cputs() - I get colour output when I quit the
program.

I've tried rebooting and going to DOS from bootup, but that doesn't give any
different results.

--

Stay Lucky, Graham "Mournblade" Reeds.
ICQ No.:  30514803
http://homepage.dtn.ntl.com/grahamr


- Raw text -


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