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"


Re: Tab Stops

2004-03-03 Thread Craig Wilson
Matthew,

Thanks for the reply. Since posting this message I have discovered a 'set
ts=4' option in vi and a -x4 in more. I have also discovered that the tab
stops are hardwired at 8 columns in kern/tty.c therefore cat can only ever
use 8 column tabs unless tty.c is changed. vi was the main area where I
wanted the 4 tab spacing.

Again thanks for you assistance.


Regards Craig.


- Original Message - 
From: "Matthew Seaman" <[EMAIL PROTECTED]>
To: "Craig Wilson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 04, 2004 12:23 AM
Subject: Re: Tab Stops


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Tab Stops

2004-03-03 Thread Matthew Seaman
On Wed, Mar 03, 2004 at 05:44:15PM +1100, Craig Wilson wrote:
> I have a situation where I would like to reduce the tab stops from 8
> character columns to 4 character columns. Any help on how to achieve this
> would be most welcome.

In what application? They all have different ways to doing that sort
of thing.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Tab Stops

2004-03-03 Thread Craig Wilson
I have a situation where I would like to reduce the tab stops from 8
character columns to 4 character columns. Any help on how to achieve this
would be most welcome.


Thanks in advance.


Craig Wilson

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"