changing tab stops

Thomas Dickey dickey at
Sun May 31 22:48:44 UTC 2009

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).


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

Thomas E. Dickey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list