Mail Archives: djgpp/1999/05/02/15:01:10
> <sarcasm>Why, DJ, you're advocating non-ISO standard C++. How could you!
> </sarcasm>
>
> I've been reading too much of comp.lang.c++
There is no way of doing device-specific things in a portable way.
clrscr() is in both djgpp and borland and always works in djgpp. You
could print "\033[0;0H\033[2J" but that only works if ANSI.SYS is
installed, and won't work under Unix for non-ansi terminals. You
could use __dpmi_int() to do the BIOS interrupt to reinit the current
mode, but that's djgpp-specific.
The best you can hope for for portability is to uses curses or
termcap, assuming you can determine what parts of curses/termcap work
the same way on all platforms (and can *find* curses/termcap for all
platforms).
As for standards, use them when you can but don't be blind to
non-standard solutions when they make sense.
- Raw text -