From 3aaa25a4e02ff362ef6b057c597630bdbef5227b Mon Sep 17 00:00:00 2001 From: james <> Date: Thu, 6 Mar 2008 21:34:09 +0000 Subject: *** empty log message *** --- src/ansi.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'src/ansi.c') diff --git a/src/ansi.c b/src/ansi.c index a0a69cd..af85844 100644 --- a/src/ansi.c +++ b/src/ansi.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.47 2008/03/06 21:34:09 james + * *** empty log message *** + * * Revision 1.46 2008/03/06 21:33:02 james * *** empty log message *** * @@ -291,19 +294,23 @@ ansi_force_attr_normal (ANSI * a) return 0; } -static int ansi_set_title(ANSI *a,char *t) +static int +ansi_set_title (ANSI * a, char *t) { -char buf[1024]; -int i; -char *term=getenv("TERM"); + char buf[1024]; + int i; + char *term = getenv ("TERM"); -if (!term) return 0; -if (strncmp(term,"xterm",5) && strncmp(term,"rxvt",4)) return 0; + if (!term) + return 0; + if (strncmp (term, "xterm", 5) && strncmp (term, "rxvt", 4)) + return 0; -i=sprintf(buf,"\033]0;%s\007",t); + i = sprintf (buf, "\033]0;%s\007", t); -if (a->terminal->xmit(a->terminal,buf,i)!=i) return 1; -return 0; + if (a->terminal->xmit (a->terminal, buf, i) != i) + return 1; + return 0; } static int @@ -1035,7 +1042,7 @@ ansi_new_from_terminal (TTY * t, int utf8) ret->update = ansi_update; ret->reset = ansi_reset; ret->terminal_reset = ansi_terminal_reset; - ret->set_title=ansi_set_title; + ret->set_title = ansi_set_title; ret->close = ansi_free; ret->dispatch = ansi_dispatch; -- cgit v1.2.3