diff options
author | james <> | 2008-02-27 01:32:41 +0000 |
---|---|---|
committer | james <> | 2008-02-27 01:32:41 +0000 |
commit | b9ff400d3331ccd3be0aad49cbdadf2cb23a68e2 (patch) | |
tree | 0f9f014112617202e1cfc13549eb7e01021aa5e5 | |
parent | 4add819b42c292ee2a6fc4aeda782a447b1bcf27 (diff) | |
download | sympathy-b9ff400d3331ccd3be0aad49cbdadf2cb23a68e2.tar.gz sympathy-b9ff400d3331ccd3be0aad49cbdadf2cb23a68e2.tar.bz2 sympathy-b9ff400d3331ccd3be0aad49cbdadf2cb23a68e2.zip |
*** empty log message ***
-rw-r--r-- | apps/mainloop.c | 5 | ||||
-rw-r--r-- | apps/sympathy.c | 22 | ||||
-rw-r--r-- | apps/usage.c | 6 | ||||
-rw-r--r-- | src/ptty.c | 7 | ||||
-rw-r--r-- | src/vt102.c | 20 | ||||
-rw-r--r-- | src/vt102_charset.h | 30 |
6 files changed, 68 insertions, 22 deletions
diff --git a/apps/mainloop.c b/apps/mainloop.c index 07290e1..d546ac5 100644 --- a/apps/mainloop.c +++ b/apps/mainloop.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.15 2008/02/27 01:31:38 james + * *** empty log message *** + * * Revision 1.14 2008/02/27 01:31:14 james * *** empty log message *** * @@ -394,7 +397,7 @@ msg_from_server (ANSI * a, IPC_Msg * m, Context * c) void mainloop (TTY * tty, Socket * server_socket, Socket * client_socket, - ANSI * ansi, Log * log, int nhistory,int width) + ANSI * ansi, Log * log, int nhistory, int width) { fd_set rfds, wfds; Context c = { 0 }; diff --git a/apps/sympathy.c b/apps/sympathy.c index 4a9f18a..a8dba28 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.16 2008/02/27 01:31:38 james + * *** empty log message *** + * * Revision 1.15 2008/02/27 01:31:14 james * *** empty log message *** * @@ -242,7 +245,7 @@ main (int argc, char *argv[]) int c; extern char *optarg; extern int optind, opterr, optopt; - int width=VT102_COLS_80; + int width = VT102_COLS_80; int oflags[128]; char *oargs[128]; @@ -259,7 +262,7 @@ main (int argc, char *argv[]) memset (oflags, 0, sizeof (oflags)); memset (oargs, 0, sizeof (oargs)); - while ((c = getopt (argc, argv, "w:utscr:lKHd:pb:fL:Fk:n:")) != EOF) + while ((c = getopt (argc, argv, "w:utscr:lKHd:pb:fL:Fk:n:")) != EOF) { switch (c) { @@ -392,7 +395,7 @@ main (int argc, char *argv[]) oflags['f'] = 0; oflags['L'] = 0; oflags['n'] = 0; - oflags['w'] = 0; + oflags['w'] = 0; if (server_socket) { socket_free_parent (server_socket); @@ -415,11 +418,12 @@ main (int argc, char *argv[]) oflags['p']++; } - if (oflags['w']) { - width=safe_atoi(oargs['w']); - if ((width>VT102_MAX_COLS) || (width<1)) - fatal_moan("-w requires a width between 1 and %d\n",VT102_MAX_COLS); - } + if (oflags['w']) + { + width = safe_atoi (oargs['w']); + if ((width > VT102_MAX_COLS) || (width < 1)) + fatal_moan ("-w requires a width between 1 and %d\n", VT102_MAX_COLS); + } if (oflags['s'] && !oflags['F']) { @@ -496,7 +500,7 @@ main (int argc, char *argv[]) } } - mainloop (tty, server_socket, client_socket, ansi, log, history,width); + mainloop (tty, server_socket, client_socket, ansi, log, history, width); if (ansi) { diff --git a/apps/usage.c b/apps/usage.c index 62061fd..cf79d6d 100644 --- a/apps/usage.c +++ b/apps/usage.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.11 2008/02/27 01:31:38 james + * *** empty log message *** + * * Revision 1.10 2008/02/27 01:31:14 james * *** empty log message *** * @@ -96,8 +99,7 @@ usage (void) " -n hlines the number of lines of history to store in the\n" " server, that are replayed on connexion\n" " -u don't emit utf-8 try to use ISO-2202 to the local terminal\n" - " -w width start session with a screen of width width<=132\n" - ); + " -w width start session with a screen of width width<=132\n"); exit (1); @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.13 2008/02/27 01:31:38 james + * *** empty log message *** + * * Revision 1.12 2008/02/27 01:31:14 james * *** empty log message *** * @@ -140,7 +143,7 @@ ptty_write (TTY * _t, void *buf, int len) } TTY * -ptty_open (char *path, char *argv[],int width) +ptty_open (char *path, char *argv[], int width) { PTTY *t; pid_t child; @@ -153,7 +156,7 @@ ptty_open (char *path, char *argv[],int width) client_termios (&ctermios); winsize.ws_row = VT102_ROWS; - winsize.ws_col = width ? width:VT102_COLS_80; + winsize.ws_col = width ? width : VT102_COLS_80; child = forkpty (&fd, name, &ctermios, &winsize); diff --git a/src/vt102.c b/src/vt102.c index a879999..52f7fb9 100644 --- a/src/vt102.c +++ b/src/vt102.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.46 2008/02/27 01:31:38 james + * *** empty log message *** + * * Revision 1.45 2008/02/27 01:31:14 james * *** empty log message *** * @@ -2032,14 +2035,15 @@ vt102_new (int width) vt102_reset (v); - if (width) { - v->current_width =width; - v->crt.width = v->current_width; - v->screen_end.x = v->current_width - 1; - v->top_margin = v->screen_start; - v->bottom_margin = v->screen_end; - vt102_cursor_home (v); - } + if (width) + { + v->current_width = width; + v->crt.width = v->current_width; + v->screen_end.x = v->current_width - 1; + v->top_margin = v->screen_start; + v->bottom_margin = v->screen_end; + vt102_cursor_home (v); + } return v; } diff --git a/src/vt102_charset.h b/src/vt102_charset.h new file mode 100644 index 0000000..a1130fa --- /dev/null +++ b/src/vt102_charset.h @@ -0,0 +1,30 @@ +/* + * vt102_charset.h: + * + * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>, + * All rights reserved. + * + */ + +/* + * $Id$ + */ + +/* + * $Log$ + * Revision 1.1 2008/02/27 01:32:41 james + * *** empty log message *** + * + */ + +#ifndef __VT102_CHARSET_H__ +#define __VT102_CHARSET_H__ + +#define VT102_CHARSET_SIZE 128 + +#define VT102_CSID_US 0 +#define VT102_CSID_UK 1 +#define VT102_CSID_GL 2 +#define VT102_CSID_VT52 3 + +#endif /* __VT102_CHARSET_H__ */ |