Mail Archives: djgpp/1997/12/26/14:52:50
At 02:34 12/26/1997 PST, Noam Rotem wrote:
>Hi,
>
>1. Where can I find a list of escape sequences for unix
>(like: "^[J2" - clear the screen)?
They are system specific. Some may support the ANSI terminal sequences,
which I think were derived from the VT100 terminal. I don't know offhand of
where you might find the list; 4DOS has one built into its online help and I
use that.
However, you can use the Unix `termcap' facilities. This is a scheme for
finding terminal escape sequences at runtime for whatever terminal may be in
use. The GNU libc (not djgpp libc!) docs have a tutorial on using them, and
I know the Linux Programmers Guide
(ftp://tsx-11.mit.edu/pub/linux/docs/guides/) has an embryonic documentation
including most of the capability strings. Also see man pages.
>2. Is there any portable function or asm code for reading one
>single character from the console? (with DOS, I can use BIOS
>interrupt 16h, but with unix I can't, as far as I understand
>it).
Again, use the termcap facilities under Unix. They can do this. DJGPP has
some termcap emulation but I don't know how well it works. You could use
#ifdefs to get the right code on the right system.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -