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