www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/07/04:52:57

From: naisbodo <naisbodo AT enteract DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: conio.h in C++
Date: 7 Dec 2000 09:36:46 GMT
Organization: http://www.naisbodo.com/
Lines: 23
Distribution: world
Message-ID: <90nlne$6l5$1@bob.news.rcn.net>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1001206093751 DOT 10098B-100000 AT is> <3A2E1DCF DOT F3E0F7EC AT acc DOT umu DOT se> <3a2e602b DOT 24409552 AT news DOT freeserve DOT net> <3A2E97FF DOT A360A347 AT acc DOT umu DOT se> <r48u2tkis1nu0irnvk0dh3ed67h4l9np44 AT 4ax DOT com>
X-Trace: aCzH95WZKsZZnZkF0m/b2s7xjA+XzUHItpalbeWGSWc=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 7 Dec 2000 09:36:46 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comremovebullcr_p> wrote:
> If you want to use -ansi as a default switch, you might want to ANSIfy
> (is that a word?) the rest of the system, including installing support
> for ANSI escape characters (ansi.sys) so you can clear the screen with
>   fputs("\033[2J", stderr);
 
It's probably a good idea to point out that ANSI in both cases refers to
the same standards body, but that ANSI escape characters and ANSI C are
two very different and unrelated standards.

ANSI C does not define the behavior of \033[2J.  Also, ANSI escape codes
work on non-C systems.  The -ansi option in DJGPP refers to only the C
standard, not the escape codes.

If you want to write ANSI C, you don't want to clear the screen anyway,
because ANSI C doesn't have the concept of a screen.  If you can assume
you have a screen and you want to do things like clear it, jump around
in it, and use colors, you *should* be using extensions like <conio.h>,
so -ansi doesn't make sense in that case.

-- 
naisbodo AT enteract DOT com
http://www.naisbodo.com/

- Raw text -


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