chiark / gitweb /
*** empty log message ***
[sympathy.git] / apps / mainloop.c
index ad2812e6cd7db5cf38e30f8e49726dbee977fa83..e9c299cd4d8d620fd3d2ed20af2d2be1cf92e88a 100644 (file)
@@ -6,10 +6,35 @@
  *
  */
 
-static char rcsid[] = "$Id$";
+static char rcsid[] =
+  "$Id$";
 
 /*
  * $Log$
+ * Revision 1.17  2008/02/27 09:42:53  james
+ * *** empty log message ***
+ *
+ * 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 ***
+ *
+ * Revision 1.14  2008/02/27 01:31:14  james
+ * *** empty log message ***
+ *
+ * Revision 1.13  2008/02/26 23:56:12  james
+ * *** empty log message ***
+ *
+ * Revision 1.12  2008/02/26 23:23:16  james
+ * *** empty log message ***
+ *
+ * Revision 1.11  2008/02/24 00:43:55  james
+ * *** empty log message ***
+ *
+ * Revision 1.10  2008/02/23 13:05:57  staffcvs
+ * *** empty log message ***
+ *
  * Revision 1.9  2008/02/23 11:48:51  james
  * *** empty log message ***
  *
@@ -81,6 +106,8 @@ static char rcsid[] = "$Id$";
 
 #include "clients.h"
 
+Context *context;
+
 typedef struct
 {
   int nclients;
@@ -316,7 +343,7 @@ check_status (Context * c, Clients * cs)
         }
       else if (c->tp->guessed_baud > 0)
         {
-          ptr += sprintf (ptr, " try %d", status.baud / c->tp->guessed_baud);
+          ptr += sprintf (ptr, " try %db", c->tp->guessed_baud);
         }
     }
 
@@ -376,16 +403,18 @@ 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)
+          ANSI * ansi, Log * log, int nhistory, CRT_Pos * size)
 {
   fd_set rfds, wfds;
   Context c = { 0 };
   Clients *clients;
 
+  context = &c;
+
   c.tp = tty_parser_new ();
   c.u = utf8_new ();
 
-  c.v = vt102_new ();
+  c.v = vt102_new (size);
   c.h = history_new (nhistory);
   c.l = log;
   /* are we being fed by a tty or a socket */