chiark / gitweb /
*** empty log message ***
[sympathy.git] / apps / mainloop.c
index 73b2236695bb8f8d86dee60b278b5b5768be3d33..9737bd29439f545c8a3ebc162708715bf74615a0 100644 (file)
@@ -11,6 +11,33 @@ static char rcsid[] =
 
 /*
  * $Log$
+ * Revision 1.20  2008/02/28 16:57:51  james
+ * *** empty log message ***
+ *
+ * Revision 1.19  2008/02/28 16:37:16  james
+ * *** empty log message ***
+ *
+ * Revision 1.18  2008/02/28 11:27:48  james
+ * *** empty log message ***
+ *
+ * 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 ***
  *
@@ -88,6 +115,8 @@ static char rcsid[] =
 
 #include "clients.h"
 
+Context *context;
+
 typedef struct
 {
   int nclients;
@@ -366,7 +395,6 @@ msg_from_server (ANSI * a, IPC_Msg * m, Context * c)
           a->one_shot (a, &c->v->crt);
           return 1;
         }
-      //FIXME HTML hook
       break;
     case IPC_MSG_TYPE_TERM:
       tty_parse (c, m->term.term, m->term.len);
@@ -383,16 +411,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 */
@@ -422,6 +452,9 @@ mainloop (TTY * tty, Socket * server_socket, Socket * client_socket,
     }
 
 
+  vt102_reset (&c);
+
+
   if (server_socket)
     {
       if (client_socket)