Path: utzoo!utgpu!water!watmath!clyde!att!alberta!ubc-cs!uw-beaver!mit-eddie!bbn!uwmcsd1!marque!uunet!munnari!otc!metro!basser!wolfen!uowcsa!david From: david@uowcsa.cs.uow.oz (David E A Wilson) Newsgroups: comp.unix.wizards Subject: Re: terminfo Summary: If terminfo is so flexible, how can I do this? Message-ID: <458@uowcsa.cs.uow.oz> Date: 27 Aug 88 05:05:46 GMT References: <508@altos86.UUCP> <13202@mimsy.UUCP> Organization: Uni of Wollongong, NSW, Australia Lines: 33 In article <13202@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: > I hear someone asking: `what is wrong with termcap, anyway?' All > right, quick, tell me how you convert a cursor position to a base 8 > one's complement row number offset by ' ' followed by a base 8 one's > complement column number offset by ' ' and occupying two characters > if and only if the value produced is by the first character is >= 95 > (in which case the first character is stopped at 95 and the second > is summed into the first, after bit-flipping and converting back from > octal)? How about this then? We have a set of VT220 compatible terminals which have added funtions such as labels at the bottom of the screen. The way to program both these labels & the function keys is to send the following (for an output/display of HELLO) (first key & label): Key: ESC P 1 ; 1 | 1 7 / 4 8 4 5 4 C 4 C 4 F ESC \ Label: ESC P 0 ; 1 r 0 / 4 8 4 5 4 C 4 C 4 F ESC \ How can I encode this so that the application does not need to encode the string in hex? Here are the terminfo definitions I use that do require this. pfx=%p1%Pa%?%p1%{5}%>%t%?%p1%{10}%>%t%?%p1%{14}%>%t%?%p1%{16} %>%t%ga%{14}%+%e%ga%{13}%+%;%e%ga%{12}%+%;%e%ga%{11} %+%;\EP1;1|%d/%p2%s\E\\%;, pln=\EP0;1r%p1%{1}%-%d/%p2%s\E\\, The gastly pfx string is because DEC in its wisdom saw fit to allocate numbers to the holes in between the function key groups. Clues anyone? David E.A. Wilson ACSnet: david@uowcsa.oz Dept. of Computing Science UUCP: ...!munnari!uowcsa.oz!david Uni. of Wollongong ARPA: david%uowcsa.oz@uunet.UU.NET