Date: Sun, 31 May 2009 18:25:31 -0400 From: Thomas Dickey <dickey@radix.net> To: Robert Huff <roberthuff@rcn.com> Cc: questions@freebsd.org Subject: Re: changing tab stops Message-ID: <20090531222531.GA21537@saltmine.radix.net> In-Reply-To: <18978.56856.705030.492797@jerusalem.litteratus.org> References: <18978.56856.705030.492797@jerusalem.litteratus.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 31, 2009 at 03:44:24PM -0400, Robert Huff wrote: >=20 > 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). --=20 Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net --fdj2RfSjLxBAspz7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (SunOS) Comment: For info see http://www.gnupg.org iD8DBQFKIwNztIqByHxlDocRAvJzAJ0Xf7U0IRf2CW984Gvw/k1k+A0v+ACeNk1L lY/cHaiTsTJ//PpjkjCDwO0= =qbwZ -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090531222531.GA21537>