On Thu, Mar 30, 2000 at 11:18:31AM +0100, [EMAIL PROTECTED] wrote: > How can I hide/show the cursor on a generic text terminal (xterms > included), without using the famous 'ncurses' libraries ?
use ncurses, then you don't have to make any hard-coded assumptions about the terminal's capabilities. that's why it exists. programming a unix text mode program which assumes that it's running on a linux console or vt100 or xterm is evil...even more evil than dos weenie programmers assuming that their text mode program is going to run on a "standard" 80x25 IBM PC console, with or without ansi.sys "dos weenie" programmers at least have the excuse that they are writing for MS-DOS and that they are weenies. unix programmers shouldn't make the same mistakes. there's no such thing as a "standard" or "generic" text terminal, and a unix programmer should always keep that in mind. even different implementations of the same de-facto standards (like vt100) are not the same, what works on one "vt100-clone" terminal is not guaranteed to work on another "vt100-clone"...that's why the ncurses terminfo database has hundreds of entries for various slightly different vt100 clones. > And about colors and text scrolling ? ditto. > I found an interesting document on internet (unix programmer FAQ > v1.31) concerning how to program terminals, tasks, mailing, etc., but > it doesn't explain the above questions. > > It is very strange that there are so many documents about the linux's > configuration, but a so very little number about the programming, or > not ? there's lots of programmers' documentation - most libraries are documented (with quality ranging from poor to truly excellent). most programming tools (e.g. make and gcc) have excellent documentation. the problem isn't so much being able to find docs, as knowing where to start. craig (not a real programmer, but i pretend to be one from time to time) -- craig sanders