Re: xterm_title patch 898
- From: Tomas Styblo <tripie cpan org>
- To: mc-devel gnome org
- Subject: Re: xterm_title patch 898
- Date: Tue, 7 Jan 2003 09:02:53 +0100
* Thomas Zajic <zlatko gmx at> [Tue, 07 Jan 2003]:
> Now that's strange, because AFAICT it _does_ report the proper title, or
> at least mc is _somehow_ able to restore it upon exit. Do you have some
> fallback(s) in place to get the title, ie. something other than what you
> are trying to do within the 5 seconds?
Well maybe there is a bug in the code and I just can't see it, but
it works for me.
seen_esc = 0;
while (i < sizeof(title) && read(tty, &ch, 1) > 0) {
/* read and discard characters until we get the ESC character
which starts the title response of the terminal */
if (seen_esc == 0) {
if (ch == '\033')
seen_esc = 1;
else
continue;
}
/* This character terminates the title response
according to the xterm control sequence specification.
Stop reading - this should prevent the delay */
if (ch == '\x9c') /* ST */
break;
/* append a character of the title response to the buffer */
title[i++] = ch;
}
--
Tomas Styblo <tripie cpan org>
PGP: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC97EA4B6
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]