www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/13/03:35:21

From: "J. A. McNamara" <grulm AT netaxs DOT com>
Subject: stupid C question
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Sun, 12 Nov 1995 13:04:08 -0500 (EST)

Guided by naive and idealistic assumptions about human potential, I am 
learning C . . .  I've looked through K&R and the djgpp docs, and haven't 
seen anything that helps with this -- I'm willing to believe that I just 
missed it, though.  I also consulted somebody who knows C, and he was 
baffled -- he says he uses the Zortech compiler, and doesn't have this 
problem.  He suggested that there might be something like "flush" or 
"flushbuf," but I can't find it.

I find that when I do a printf, or putchar, nothing appears on the screen
until I send a "\n" to standard output -- i.e., I'm trying to write a DOS
more that works like unix more (e.g. you can page back, etc.) and I'd like
the "continue" prompt at the botom of the screen to appear, but leave the
cursor on that same line, so as not to waste space and generally be
half-assed.  

So, is there any way to force the buffer to flush to standard output 
without a newline?  (and also w/o just bumming Zortech off this guy and 
using that, which seems inelegant)

thanks in advance for any help . . .

   -----------------------------------------       ----------------
   b o b b y   t h e   g i a n t   s n a i l        J. A. McNamara
    "You no longer exist, Franz Bubendorf."        grulm AT netaxs DOT com
   -----------------------------------------       ----------------
       "Bless the wind that shakes the barley, curse the spade
              and curse the plough."  --  Shane MacGowan

- Raw text -


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