doug@cogent.UUCP (Doug Perlich) (12/15/89)
All this discussion of terminal stuff reminds me of a couple of questions I've been thinking about. Background: I'm running on an HP 9000 model 840, HP-UX A.B3.10 vers. C. I'm trying to write a set of screen control routines that may be used by any terminal, no fancy graphics, but I do want full screen control and it seems that the information I need is available in the terminfo data base, but not everything. I do not want to use curses or termcap functions. I want to do an initialization routine at user start up that will load all the needed information into the users shared memory segment since the information will be needed by several processes, (everything running under a menu system). Questions: #1 What about time delays? It is my understanding that certain escape sequences such as clear screen, clear to eof line, etc. need a time delay after them and this varies by terminal. Is this info. available in terminfo? Is this outdated and terminals don't need time delays anymore? #2 I don't want to call termcap's tgoto() routine for cursor addressing I want to get the escape sequence and put the address directly into it on my own. The problem here is, how do I know if it's row first or column first? My hp2392 terminal is row first, ansi-d is column first, how does tgoto() know? I don't see that information in the terminfo files. #3 I also want to know about switching from 80 to 132 column and back. I don't see that information anywhere. Any help is appreciated, I hope I'm not being TOO dumb here, the FM's are a bit overwhelming on this subject. -Doug g g
tim@comcon.UUCP (Tim Brown) (12/17/89)
Why does there seem to so much resistance by programmers to using curses? Am I wrong here or are the 'non-curses' programmers reinvneting alot of wheels. Is this not against unix 'phylosiphy'? I haven't worked on too many different platforms but have had no problems getting the job done in curses for things like full screen control and raw key code access. Just wondering what I am missing.. Tim Brown | Computer Connection | (attmail or uunet)!comcon!tim |
peter@ficc.uu.net (Peter da Silva) (12/19/89)
In article <630@cogent.UUCP> doug@cogent.UUCP (Doug Perlich) writes: > I do not want to use > curses or termcap functions. Why not? Termlib can support... > do an initialization routine > at user start up that will load all the needed information into the > users shared memory segment since the information will be needed > by several processes, (everything running under a menu system). Now terminfo is a different matter. Get a PD copy of termcap and hack on it. It's easy enough. > #1 What about time delays? If the first character of a string is a digit, it's preceded by a per-unit time delay. I.e., dc=4\E[P, means delay for 4 ms for each character deleted. > #2 I don't want to call termcap's tgoto() routine for cursor addressing Why not? > #3 I also want to know about switching from 80 to 132 column and back. > I don't see that information anywhere. It's not standard. For termcap, you could just add a new capability. For terminfo you're out of luck. Personally, I think terminfo sucks. -- `-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>. 'U` Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>. "It was just dumb luck that Unix managed to break through the Stupidity Barrier and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com
peter@ficc.uu.net (Peter da Silva) (12/19/89)
In article <178@comcon.UUCP> tim@comcon.UUCP (Tim Brown) writes: > Am I wrong here or are the 'non-curses' programmers reinvneting alot of > wheels. Is this not against unix 'phylosiphy'? I use curses where it's appropriate, and not where it's not. There are some things curses just can't do: Scrolling regions. Using an exotic terminal database (the referenced article <6300@cogent.uucp> talks about shared memory segments) Stuff termcap can't support without extensions, such as meta-keys, special character sets, status lines, and variable-width terminals. Stuff terminfo can't handle at all... Also, for some things curses is just too much overhead. Something like 'less', for example. -- `-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>. 'U` Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>. "It was just dumb luck that Unix managed to break through the Stupidity Barrier and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com