[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev displaying current page title in xterm window title
From: |
Duncan Simpson |
Subject: |
Re: lynx-dev displaying current page title in xterm window title |
Date: |
Wed, 24 May 2000 23:04:55 +0000 |
> On Wed, 24 May 2000, Vlad Harchev wrote:
>
> > On Tue, 23 May 2000, Duncan Simpson wrote:
<stuff snipped>
> > > >From the termcap man page
> > >
> > > hs Has a status line
> > > ds Disable status line
> > > ts Move cursor to column %1 of status line
and I failed to mention
es Escape sequences work in status line
ws Widthj f status line if diferent from scren width
So I could revice the code to read
void set_title(const char *t, int sw)
{
char *ts, *tt;
const char *tp;
int wd;
if (tgetent("hs") && (ts=tgetstr("ts", NULL))!=NULL)
{
wd=egnum("ws");
if (wd==-1) wd=sw;
if (strlen(t)>wd)
{
tt=alloca(wd+1);
memcpy(tt, t, wd);
*(tt+wd)='\0';
tp=tt;
}
else tp=t;
tputs(ts, 1, &putchar); /* Yours truly failed to read a man page */
fputs(tp, stdout);
fputc('\007', stdout);
}
}
which is not quite a beatutifull as th she origirnal version but you get the
picture. There is plently more information avialable form termcap others man
RTFMP. Anyone suggesting testing the WINDOWID environment variable presukmably
can say "man termcap" and know how to test for a hard copy terminal if need be
(has anyone here even seen pone?). I am yound enough not ot have noticed any,
Extra long status lines have undocumented behaviour. I suspetc they do not wrap
but think that avarious different terminals do different things. (Does anyone
want to try <BEL> and nul free shell code on various versions of xterm?)
--
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
- lynx-dev displaying current page title in xterm window title, Vlad Harchev, 2000/05/22
- Re: lynx-dev displaying current page title in xterm window title, Thomas E. Dickey, 2000/05/22
- Re: lynx-dev displaying current page title in xterm window title, Vlad Harchev, 2000/05/23
- Re: lynx-dev displaying current page title in xterm window title, Thomas Dickey, 2000/05/23
- Re: lynx-dev displaying current page title in xterm window title, Vlad Harchev, 2000/05/23
- Re: lynx-dev displaying current page title in xterm window title, Duncan Simpson, 2000/05/23
- Re: lynx-dev displaying current page title in xterm window title, Vlad Harchev, 2000/05/24
- Re: lynx-dev displaying current page title in xterm window title, Vlad Harchev, 2000/05/24
- Re: lynx-dev displaying current page title in xterm window title, Thomas Dickey, 2000/05/24
- Re: lynx-dev displaying current page title in xterm window title, Klaus Weide, 2000/05/24
- Re: lynx-dev displaying current page title in xterm window title,
Duncan Simpson <=
- Re: lynx-dev displaying current page title in xterm window title, Thomas Dickey, 2000/05/24
- Re: lynx-dev displaying current page title in xterm window title, Duncan Simpson, 2000/05/25
- Re: lynx-dev displaying current page title in xterm window title, Thomas E. Dickey, 2000/05/25
- Re: lynx-dev displaying current page title in xterm window title, Klaus Weide, 2000/05/24
- Re: lynx-dev displaying current page title in xterm window title, Klaus Weide, 2000/05/24
- Re: lynx-dev displaying current page title in xterm window title, Vlad Harchev, 2000/05/25
Re: lynx-dev displaying current page title in xterm window title, David Woolley, 2000/05/24