Mail Archives: djgpp/2000/01/06/10:12:18
On Thu, 6 Jan 2000, Colin Forster wrote:
> 1) alias cls='echo -n ^[[2J' # the ^[ is an esc (in vi I use ^V followed
> by
> # ^[ where ^ is holding down the cntrl key)
>
> 2) compile this into clear.exe or cls.exe:
>
> #include <stdio.h>
> int main () { printf("033[2J"); }
>
> 3) alias cls='cat ~/.cls'
> where .cls contains just these 4 chars with no \n or spaces (ESC [ 2 J)
I don't think any of this will work: it assumes an ANSI screen driver
(these strings are ANSI escape sequences to clear the screen). Such a
driver is a standard part of a Unix terminal driver, but most DJGPP
environments don't have ANSI.SYS loaded.
- Raw text -