delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/27/07:02:06

From: Radical NetSurfer <radsmail AT juno DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: printf, cprintf and CR/LF problem
Date: Sun, 27 Aug 2000 06:49:11 -0400
Message-ID: <dtrhqsch9hm4pq0jlefr538boonncgvt6i@4ax.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000827084655 DOT 3086C-100000 AT is> <Pine DOT SUN DOT 3 DOT 91 DOT 1000827092400 DOT 3086F-100000 AT is>
X-Newsreader: Forte Agent 1.8/32.548
X-No-Archive: yes
MIME-Version: 1.0
NNTP-Posting-Host: 216.202.134.183
X-Original-NNTP-Posting-Host: 216.202.134.183
X-Trace: 27 Aug 2000 06:52:08 -0400, 216.202.134.183
Lines: 49
X-Original-NNTP-Posting-Host: 64.31.79.51
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Specifically, my question addresses any time the LAST possible
character position is written out on EACH line ( (c)printf, etc ),
what you get is a NASTY blank line...which is not always welcomed;
the problem is only compounded when the very LAST row is
encountered and WHAMO! by-by the nicely formatted text that
just happened to fill an entire 80x25 screen :(

I have not experiemented with any of the ScreenUpdateXX()'s in DJGPP.

Question: Are these anything like  "dos_direct_screen_write" versions
of the printf, etc ?  if not, are there any such critters in
existance; could they be easily mimiced otherwise ?

When a direct-screen-write (d-s-w) type function writes a character
(not a CR/LF) to the LAST possible screen location
(lower-right-most-corner), I think it would be LEAST expected to cause
a scroll.  THAT scroll should not occur until the NEXT actual write
occurs.  Any opinions on this?
What about producing an output routine that performs in this fasion,
direct screen writes would be permissible PROVIDED they work in both
true MS-DOS16  mode and under a Win31/9x DOS-SHELL/DOS7
modes.

THANKS.

On Sun, 27 Aug 2000 09:31:35 +0300 (IDT), Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> wrote:


>On Sun, 27 Aug 2000, I wrote:
>
>> You could remove the \n from the format, and print it at the beginning of 
>> the next line instead.
>
>Sorry, it's possible that I didn't understand the problem correctly (a 
>code fragment would have helped).
>
>Are you saying that outputting a full 80-column line to the last screen
>linhe position scrolls the entire display even if there's no \n in the
>text you output?
>
>If so, then this is because both printf and cprintf (and also cputs and 
>cputc) always move the cursor past the last written character.  On the 
>last line, moving the cursor will scroll the display.
>
>You need to write the characters in a way that doesn't involve moving the 
>cursor, like with ScreenUpdateLine or dosmemput.


- Raw text -


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