From: james Date: Wed, 27 Feb 2008 09:42:21 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=sympathy.git;a=commitdiff_plain;h=76292c6be7fcbabad9ab8687eb01f3af51568a9b;hp=797b75daa6c8bfd2031766989873b370266c0f42 *** empty log message *** --- diff --git a/apps/mainloop.c b/apps/mainloop.c index d546ac5..146ebdd 100644 --- a/apps/mainloop.c +++ b/apps/mainloop.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.16 2008/02/27 09:42:21 james + * *** empty log message *** + * * Revision 1.15 2008/02/27 01:31:38 james * *** empty log message *** * @@ -397,7 +400,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, CRT_Pos *size ) { fd_set rfds, wfds; Context c = { 0 }; @@ -408,7 +411,7 @@ mainloop (TTY * tty, Socket * server_socket, Socket * client_socket, c.tp = tty_parser_new (); c.u = utf8_new (); - c.v = vt102_new (width); + c.v = vt102_new (size); c.h = history_new (nhistory); c.l = log; /* are we being fed by a tty or a socket */ diff --git a/apps/mainloop.h b/apps/mainloop.h index cea139e..df32f25 100644 --- a/apps/mainloop.h +++ b/apps/mainloop.h @@ -12,6 +12,9 @@ /* * $Log$ + * Revision 1.5 2008/02/27 09:42:53 james + * *** empty log message *** + * * Revision 1.4 2008/02/27 09:42:21 james * *** empty log message *** * @@ -33,6 +36,6 @@ extern void mainloop (TTY * tty, Socket * server_socket, Socket * client_socket, ANSI * a, - Log * log, int nhistory, CRT_Pos *size); + Log * log, int nhistory, CRT_Pos * size); #endif /* __MAINLOOP_H__ */ diff --git a/apps/sympathy.c b/apps/sympathy.c index e93c930..29c3280 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.18 2008/02/27 09:42:53 james + * *** empty log message *** + * * Revision 1.17 2008/02/27 09:42:21 james * *** empty log message *** * @@ -248,7 +251,7 @@ main (int argc, char *argv[]) int c; extern char *optarg; extern int optind, opterr, optopt; - CRT_Pos size={VT102_COLS_80,VT102_ROWS}; + CRT_Pos size = { VT102_COLS_80, VT102_ROWS }; int oflags[128]; char *oargs[128]; @@ -316,13 +319,15 @@ main (int argc, char *argv[]) sum += oflags['v']; if (sum != 1) - fatal_moan ("specifiy exactly one of ( -c and or -s ), -t, -r, -l and -v"); + fatal_moan + ("specifiy exactly one of ( -c and or -s ), -t, -r, -l and -v"); } - if (oflags['v']) { - fprintf("Version: %s\n",libsympathy_version()); - return 0; - } + if (oflags['v']) + { + fprintf ("Version: %s\n", libsympathy_version ()); + return 0; + } if (oflags['l']) return list_sockets (); @@ -428,22 +433,24 @@ main (int argc, char *argv[]) if (oflags['w']) { - char buf[128],*ptr; - strcpy(buf,oargs['w']); - ptr=index(buf,'x'); - if (ptr) { - *ptr=0; - ptr++; - size.y=safe_atoi(ptr); - } - size.x=safe_atoi(buf); + char buf[128], *ptr; + strcpy (buf, oargs['w']); + ptr = index (buf, 'x'); + if (ptr) + { + *ptr = 0; + ptr++; + size.y = safe_atoi (ptr); + } + size.x = safe_atoi (buf); if ((size.x > VT102_MAX_COLS) || (size.x < 1)) fatal_moan ("-w requires a width between 1 and %d\n", VT102_MAX_COLS); if ((size.y > VT102_ROWS) || (size.y < 1)) - fatal_moan ("-w requires a height between 1 and %d\n", VT102_MAX_COLS); - + fatal_moan ("-w requires a height between 1 and %d\n", + VT102_MAX_COLS); + } if (oflags['s'] && !oflags['F']) diff --git a/apps/usage.c b/apps/usage.c index d86294e..598ccb7 100644 --- a/apps/usage.c +++ b/apps/usage.c @@ -10,9 +10,6 @@ static char rcsid[] = "$Id$"; /* * $Log$ - * Revision 1.13 2008/02/27 09:42:53 james - * *** empty log message *** - * * Revision 1.12 2008/02/27 09:42:21 james * *** empty log message *** * @@ -82,8 +79,8 @@ usage (void) " -r id client mode: connect to server mode process on socket\n" " ~/.sympathy/id\n" " -l or -ls list active sockets in ~/.sympathy\n" - " -v show version\n" - " -h show help\n" + " -v show version\n" + " -h show help\n" "\n" "Options:\n" " -K lock the serial device. By default sympathy checks that no\n" diff --git a/src/ansi.c b/src/ansi.c index 408efd4..42f6a4c 100644 --- a/src/ansi.c +++ b/src/ansi.c @@ -10,9 +10,6 @@ static char rcsid[] = "$Id$"; /* * $Log$ - * Revision 1.34 2008/02/27 09:42:53 james - * *** empty log message *** - * * Revision 1.33 2008/02/27 09:42:21 james * *** empty log message *** * @@ -528,10 +525,10 @@ ansi_draw_line (ANSI * a, CRT_CA * cap, int y) } static void -ansi_resize_check (ANSI * a, CRT_Pos * size) +ansi_resize_check (ANSI * a, CRT_Pos *size) { - if ((size && crt_pos_cmp (a->crt.size, *size)) + if ((size && crt_pos_cmp(a->crt.size,*size)) || crt_pos_cmp (a->terminal->size, a->size)) { @@ -545,7 +542,7 @@ ansi_resize_check (ANSI * a, CRT_Pos * size) crt_reset (&a->crt); if (size) - a->crt.size = *size; + a->crt.size =*size; // FIXME: -- echos back crap? // a->terminal->xmit (a->terminal, "\033[c", 3); @@ -577,7 +574,7 @@ ansi_history (ANSI * a, History * h) { char buf[32]; int i; - int guess_scroll; + int guess_scroll; /*Do we need to catch up on history?*/ if (a->history_ptr == h->wptr) @@ -587,7 +584,7 @@ ansi_history (ANSI * a, History * h) if ((a->size.x < a->crt.size.x) || (a->size.y < a->crt.size.y)) return; - guess_scroll = a->crt.size.y - 1; /*Bototm line should be a status line */ + guess_scroll=a->crt.size.y-1; /*Bototm line should be a status line*/ ansi_force_attr_normal (a); @@ -719,7 +716,7 @@ ansi_reset (ANSI * a, CRT * c) static void ansi_terminal_reset (ANSI * a) { - CRT_Pos p = { 0, a->crt.size.y }; + CRT_Pos p = { 0, a->crt.size.y}; ansi_force_attr_normal (a); ansi_move (a, p); diff --git a/src/ptty.c b/src/ptty.c index 3be35f2..fba3202 100644 --- a/src/ptty.c +++ b/src/ptty.c @@ -10,9 +10,6 @@ static char rcsid[] = "$Id$"; /* * $Log$ - * Revision 1.15 2008/02/27 09:42:53 james - * *** empty log message *** - * * Revision 1.14 2008/02/27 09:42:22 james * *** empty log message *** * @@ -149,7 +146,7 @@ ptty_write (TTY * _t, void *buf, int len) } TTY * -ptty_open (char *path, char *argv[], CRT_Pos * size) +ptty_open (char *path, char *argv[], CRT_Pos *size) { PTTY *t; pid_t child; @@ -161,7 +158,7 @@ ptty_open (char *path, char *argv[], CRT_Pos * size) client_termios (&ctermios); - winsize.ws_row = size ? size->y : VT102_ROWS; + winsize.ws_row = size ? size->y :VT102_ROWS; winsize.ws_col = size ? size->x : VT102_COLS_80; child = forkpty (&fd, name, &ctermios, &winsize); diff --git a/src/vt102.c b/src/vt102.c index 2132f83..1940dcf 100644 --- a/src/vt102.c +++ b/src/vt102.c @@ -10,9 +10,6 @@ static char rcsid[] = "$Id$"; /* * $Log$ - * Revision 1.48 2008/02/27 09:42:53 james - * *** empty log message *** - * * Revision 1.47 2008/02/27 09:42:22 james * *** empty log message *** * @@ -746,10 +743,10 @@ vt102_change_mode (VT102 * v, int private, char *ns, int set) VT102_COLS_80; v->crt.size = v->current_size; - v->crt.size.y++; - v->screen_end = v->current_size; - v->screen_end.x--; - v->screen_end.y--; + v->crt.size.y++; + v->screen_end=v->current_size; + v->screen_end.x--; + v->screen_end.y--; v->top_margin = v->screen_start; v->bottom_margin = v->screen_end; vt102_cursor_home (v); @@ -1598,9 +1595,9 @@ vt102_reset_state (VT102 * v) v->application_keypad_mode = 0; - v->current_size = v->original_size; + v->current_size=v->original_size; v->crt.size = v->current_size; - v->crt.size.y++; + v->crt.size.y++; v->screen_end = v->current_size; v->screen_end.x--; v->screen_end.y--; @@ -2017,10 +2014,10 @@ vt102_reset (VT102 * v) v->screen_start.x = 0; v->screen_start.y = 0; - v->current_size = v->original_size; - v->crt.size = v->current_size; - v->crt.size.y++; - v->screen_end = v->current_size; + v->current_size=v->original_size; + v->crt.size=v->current_size; + v->crt.size.y++; + v->screen_end=v->current_size; v->screen_end.x--; v->screen_end.y--; @@ -2039,7 +2036,7 @@ vt102_reset (VT102 * v) } VT102 * -vt102_new (CRT_Pos * size) +vt102_new (CRT_Pos *size) { VT102 *v; @@ -2047,26 +2044,19 @@ vt102_new (CRT_Pos * size) v->xn_glitch = 1; - - if (size) - { + + if (size) { v->original_size = *size; - if (v->original_size.x < 1) - v->original_size.x = 1; - if (v->original_size.y < 1) - v->original_size.y = 1; + if (v->original_size.x<1) v->original_size.x=1; + if (v->original_size.y<1) v->original_size.y=1; - if (v->original_size.x > VT102_MAX_COLS) - v->original_size.x = VT102_MAX_COLS; - if (v->original_size.y > VT102_ROWS) - v->original_size.y = VT102_ROWS; + if (v->original_size.x>VT102_MAX_COLS) v->original_size.x=VT102_MAX_COLS; + if (v->original_size.y>VT102_ROWS) v->original_size.y=VT102_ROWS; - } - else - { - v->original_size.x = VT102_COLS_80; - v->original_size.y = VT102_ROWS; + } else { + v->original_size.x=VT102_COLS_80; + v->original_size.y=VT102_ROWS; } vt102_reset (v); diff --git a/version-md5sums b/version-md5sums index 9055410..8625f8b 100644 --- a/version-md5sums +++ b/version-md5sums @@ -1,5 +1,3 @@ 6488eda7d5c4d46ce3f587f5dc745dfa 1.0.1 ca1ac5a7fc122af620b0cf7296c324c3 1.0.2 -ac9d93b50970b366e4531b4ea5a1c983 1.0.3 -ac9d93b50970b366e4531b4ea5a1c986 1.1.0 -0ea0fc96142920321bfa5354dc6b9daa 1.1.1 +ac9d93b50970b366e4531b4ea5a1c986 1.0.3 diff --git a/version-micro b/version-micro index 00750ed..3a2e3f4 100644 --- a/version-micro +++ b/version-micro @@ -1 +1 @@ -3 +-1