Home > Archive > Unix Programming > October 2007 > Re: Get current screen location
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Get current screen location
|
|
| Thomas Dickey 2007-10-25, 8:07 am |
| Stephane CHAZELAS <this.address@is.invalid> wrote:
> 2007-10-24, 07:17(+02), Markus Mayer:
> [...]
> On many terminals, you can send:
> printf '\033[6n'
many, but not all (this is a vt100 device status report, which iirc
is not in ISO-6429(*)). For instance, the console emulator for Sun's doesn't
have any comparable feature.
(*) noted for the benefit of the auto-responder who will insist that
hardcoding everything is Good Practice...
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
| |
| Stephane CHAZELAS 2007-10-25, 7:14 pm |
| Mail-Copies-To: nobody
Message-ID: <slrnfi1b25.bkj.stephane.chazelas@spam.is.invalid>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: slrn/0.9.8.1pl1 (Debian)
Lines: 29
Date: Thu, 25 Oct 2007 14:45:25 GMT
NNTP-Posting-Host: 82.26.160.59
X-Complaints-To: http://netreport.virginmedia.com
X-Trace: newsfe4-win.ntli.net 1193323525 82.26.160.59 (Thu, 25 Oct 2007 15:45:25 BST)
NNTP-Posting-Date: Thu, 25 Oct 2007 15:45:25 BST
Organization: Virgin Net Usenet Service
Bytes: 2310
Xref: number1.nntp.dca.giganews.com comp.unix.programmer:181611
2007-10-25, 11:47(-00), Thomas Dickey:
> Stephane CHAZELAS <this.address@is.invalid> wrote:
>
>
>
> many, but not all (this is a vt100 device status report, which iirc
> is not in ISO-6429(*)). For instance, the console emulator for Sun's doesn't
> have any comparable feature.
>
> (*) noted for the benefit of the auto-responder who will insist that
> hardcoding everything is Good Practice...
Thanks Thomas,
So, how much can you rely on tput u7, then?
I can see u7 is often set to \e[6n, but terminfo(5) manpage,
only describes u7 as "user string #7". Is there any sort of
standard that says that u7 should contain the "request cursor
position" escape sequence when available?
--
Stéphane
| |
| Thomas Dickey 2007-10-26, 8:07 am |
| Stephane CHAZELAS <this.address@is.invalid> wrote:
> 2007-10-25, 11:47(-00), Thomas Dickey:
[color=darkred]
> Thanks Thomas,
> So, how much can you rely on tput u7, then?
It's in ncurses - but not in other implementations.
> I can see u7 is often set to \e[6n, but terminfo(5) manpage,
> only describes u7 as "user string #7". Is there any sort of
> standard that says that u7 should contain the "request cursor
> position" escape sequence when available?
There is no _standard_, but the comments in ncurses' terminfo.src note
this use. The tack program (which I understand to be the origin of
this) assumes these strings are set up, and will use them. Since the
example is from vt100, then most of the currently-used terminals should
support this.
Some other applications may use them, but I do not have a list.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
|
|
|
|
|