Unix Routines

Jean-Pierre Radley jpr at jpradley.jpr.com
Mon Jan 14 03:33:26 AEST 1991


In article <26284 at uflorida.cis.ufl.EDU> pm0 at springs.cis.ufl.edu (Patrick Martin) writes:
>Could someone tell me how to do the following on a Unix System:
>
>Up() {will move the Cursor up 1 position}
>Down() { ... down ...}
>Left() { ... left ...}
>Right() { ... right ...}
>

The required code is highly dependent on your hardware. 
Check out termcap, terminfo, tgetent, tput, and other such entries in your
manual.
In fact, just browing through /etc/termcap, or /usr/lib/terminfo/*src, will
show you that the code sequences you seek are quite variable.

Your system's C libraries give you tools to find the codes for any
given terminal; you then incorporate them into your code so as to be
device-independent.
-- 

 Jean-Pierre Radley	    NYC Public Unix	jpr at jpr.com	CIS: 72160,1341



More information about the Comp.lang.c mailing list