X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=sympathy.git;a=blobdiff_plain;f=src%2Fterminal.c;h=a3be09bc62f1b835a7457d1ade6aeade8933dbab;hp=ab048fdd75d5d87f4b8936fb97375e1d6c513f6d;hb=3e72a1f6fc28777c26e4fb109867bd2a3c7b89b0;hpb=d822b5ed5d59a25a5ee7fd1478b248b6f5d7fbd7 diff --git a/src/terminal.c b/src/terminal.c index ab048fd..a3be09b 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -6,10 +6,23 @@ * */ -static char rcsid[] = "$Id$"; +static char rcsid[] = + "$Id$"; /* * $Log$ + * Revision 1.12 2008/02/28 16:57:52 james + * *** empty log message *** + * + * Revision 1.11 2008/02/26 23:56:12 james + * *** empty log message *** + * + * Revision 1.10 2008/02/26 23:23:17 james + * *** empty log message *** + * + * Revision 1.9 2008/02/15 03:32:07 james + * *** empty log message *** + * * Revision 1.8 2008/02/14 10:39:14 james * *** empty log message *** * @@ -94,11 +107,15 @@ terminal_close (TTY * _t) set_nonblocking (t->wfd); - t->xmit (_t, "\033[r", 3); - t->xmit (_t, "\033[0m", 4); - i = sprintf (buf, "\033[%d;%dH", CRT_ROWS + 1, 1); + t->xmit (_t, "\033%@", 3); //Leave UTF-8 + t->xmit (_t, "\033(B", 3); //US-ASCII in G0 + t->xmit (_t, "\033)B", 3); //US-ASCII in G1 + t->xmit (_t, "\017", 1); //Select G0 + t->xmit (_t, "\033[r", 3); //No margins + t->xmit (_t, "\033[0m", 4); //Default attributes + i = sprintf (buf, "\033[%d;%dH", t->displayed_length ?(t->displayed_length+1): (CRT_ROWS +1), 1); //Cursor to bottom t->xmit (_t, buf, i); - t->xmit (_t, "\033[J", 3); + t->xmit (_t, "\033[J", 3); //erase rest of screen set_blocking (t->rfd); set_blocking (t->wfd); @@ -251,7 +268,7 @@ terminal_open (int rfd, int wfd) t = (TERMINAL *) malloc (sizeof (TERMINAL)); - strcpy(t->name,"terminal"); + strcpy (t->name, "terminal"); t->rfd = rfd; t->wfd = wfd;