From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Centering printf text on a 80 column screen Date: Tue, 08 Apr 1997 10:57:15 -0700 Organization: Two pounds of chaos and a pinch of salt Lines: 31 Message-ID: <334A86FB.1A13@cs.com> References: <860542930 DOT 11snx AT agro DOT han DOT de> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp107.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Gerd Koslowski wrote: > > If you like printf and wish to center text on a 80 column screen > you can also use ansi escape-sequences for positioning your text. > > Then you would not need spaces and tabs for positioning your output. Gerd Koslowski wrote: > > if you do not want to use printf under any circumstances you could > also use the pdcurses packet that comes with djgpp in the contrib > directory which is a very convenient way to manage input and output > on 80 column text screens under dos. You will find a similar library if > you use linux (ncurses) or another unix system. The first solution you propose is impractical because it requires ANSI.SYS to be loaded on the computer that's running the program. This should IMHO never be required in a simple text output program. The second solution is contrary to what the poster asked for. He said he didn't want to use conio or any of the other fancy screen handling functions. There is a certain art to creating formatted text output using only printf() . ;) -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | mailto:fighteer AT cs DOT com | | God's final message to His Creation: | http://www.cs.com/fighteer | | "We apologize for the inconvenience."| Fight against proprietary | | - Douglas Adams | software - support the FSF!| ---------------------------------------------------------------------