Re: changing tab stops

2009-05-31 Thread Robert Huff

Thomas Dickey writes:

>  >I have a C program that writes to a terminal (currently xterm,
>  > but could be anything).  For reasons I won't go into, I would like
>  > to read and change the terminal's tab stops ... from within the
>  > program ... in a generic/portable way.
>  
>  You could make a program which does what "resize" does to find the
>  screensize: it moves the cursor and asks where it is.  (I'm not
>  aware of an existing program which asks based on tab stops).

Ugh.  If that's the alternative, I can probably live without.
Thanks for the suggestion.


Robert Huff




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: changing tab stops

2009-05-31 Thread Thomas Dickey
On Sun, May 31, 2009 at 03:44:24PM -0400, Robert Huff wrote:
> 
>   I have a C program that writes to a terminal (currently xterm,
> but could be anything).  For reasons I won't go into, I would like
> to read and change the terminal's tab stops ... from within the
> program ... in a generic/portable way.

You could make a program which does what "resize" does to find the
screensize: it moves the cursor and asks where it is.  (I'm not
aware of an existing program which asks based on tab stops).

>   Is this possible?
>   If so, what are the keywords associated with my first clue?

The control sequence that does the asking is the cursor position
report (CPR).

http://invisible-island.net/xterm/ctlseqs/ctlseqs.html

(also vt100.net).

Not all terminals implement this (for instance FreeBSD console probably
does not).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


pgp17rTVu32wR.pgp
Description: PGP signature


changing tab stops

2009-05-31 Thread Robert Huff

I have a C program that writes to a terminal (currently xterm,
but could be anything).  For reasons I won't go into, I would like
to read and change the terminal's tab stops ... from within the
program ... in a generic/portable way.
Is this possible?
If so, what are the keywords associated with my first clue?

Respectfully,


Robert Huff

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"