Article View: comp.terminals
Article #1002Re: Adding 2 to a %d in TERMCAP
From: Who, Me??
Date: Fri, 04 Jan 1991 22:20
Date: Fri, 04 Jan 1991 22:20
54 lines
2534 bytes
2534 bytes
pdk@pyrnj.UUCP (Paul Kramer) writes:
>In article rrauenza@polyslo.CalPoly.EDU (Who, Me??) writes:
>> I am modifying a VT100 termcap entry to more or less shift the
>>screen down one row. (To allow a status line at the top of the
>> The problem is that the cm is currently set to cm=5\E[%i%d;%dH and
>>cs set to cs=\E[%i%d;%dr. Since the row parameter is already increased
>>by one by the %i, I can't increase it again with %i (I tried and it
>>increased the second parameter (%i%i%d;%dr))
>> So, how can I add one more to a parameter that is already %i'd?
>
>If you use the "%+" operator to increment the parameters, there are
>at least three ways that you could define each termcap parameter.
>
[...]
>cheers,
>paul davis kramer
My first thought was to try to use the %+ operator.. the problem is
that the vt100 needs the col/row code in printf %d format, not %c...
(excerpt from our man page..)
The % encodings have the following meanings:
%% output `%'
%d output value as in printf %d
%2 output value as in printf %2d
%3 output value as in printf %3d
%. output value as in printf %c
%+x add x to value, then do %.
%>xy if value > x then add y, no output
%r reverse order of two parameters, no output
%i increment by one, no output
%n exclusive-or all parameters with 0140 (Datamedia 2500)
%B BCD (16*(value/10)) + (value%10), no output
%D Reverse coding (value - 2*(value%16)), no output (Delta Data)
----------
The %+x would output a character, rather than a string representing the
row or col. Thanks anyway...
Rich Rauenzahn
--
+-------------------------- ----+- - - ----- --------- - - - -- - +
| rrauenza@PolySlo.CalPoly.EDU | Hi! I'm a 1 ( rest of sig under )
| rrauenza@Ares.CalPoly.EDU | ----- Major ( construction until )
+------------ - -- - - --- - - + - - sin ( further notice... )
Technical Details
Message-ID:
<2784ffc9.bd9@petunia.CalPoly.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!pacbell.com!decwrl!petunia!newsReferences:
<27827b34.4ede@petunia.CalPoly.EDU> <14575@pyrnj.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!pacbell.com!decwrl!petunia!news From: rrauenza@polyslo.CalPoly.EDU (Who, Me??) Newsgroups: comp.terminals Subject: Re: Adding 2 to a %d in TERMCAP Message-ID: <2784ffc9.bd9@petunia.CalPoly.EDU> Date: 4 Jan 91 22:20:57 GMT References: <27827b34.4ede@petunia.CalPoly.EDU> <14575@pyrnj.uucp> Distribution: usa Organization: Cal Poly State University -- San Luis Obispo, CA 93407 Lines: 54