[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tgoto(3) says col,row but it seems to be x,col?

From: Steffen Nurpmeso
Subject: Re: tgoto(3) says col,row but it seems to be x,col?
Date: Mon, 21 Mar 2016 11:49:39 +0100
User-agent: s-nail v14.8.6-171-gc05ee4b

Thomas Dickey <address@hidden> wrote:
 |On Sat, Mar 19, 2016 at 04:40:17PM +0100, Steffen Nurpmeso wrote:
 |> and termcap(5) says "ch Move cursor horizontally only to column
 |> %1" and terminfo(5) says "column_address hpa ch horizontal
 |> %position #1, absolute (P)", but when i'm doing
 |> n_termcap_cmd(n_TERMCAP_CMD_ch, w, -1) which translates to
 |> tgoto(cp, a1, a2) then nothing happens, i have to write
 |> tgoto(cp,0,a1) instead.
 |yes, that's right, but puzzling
 |The problem is that tgoto documention refers to "col,row" but
 |two-parameter cursor movement strings conventionally put the row
 |first.  So tgoto has "always" reversed those parameters.
 |Also, tgoto does not pay any attention to the number of parameters
 |a capability uses: it simply reverses all of the col/row to row/col

I didn't know that; thank you very much, also for the actual
patch, which is very informative!  (I'm not yet there, the final
version will use the terminfo interface directly when available.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]