diff mcabber/main.c @ 1:da1fb510081e

[/trunk] Changeset 16 by mikael * Start using an "input line" at the bottom. Only "/quit" is understood at the moment... :)
author mikael
date Wed, 16 Mar 2005 22:18:54 +0000
parents b3b2332715fb
children 63acb2dcaeea
line wrap: on
line diff
--- a/mcabber/main.c	Thu Jun 30 21:39:31 2005 +0000
+++ b/mcabber/main.c	Wed Mar 16 22:18:54 2005 +0000
@@ -77,6 +77,7 @@
   int key;
   unsigned int port;
   unsigned int ping;
+  int ret = 0;
 
 
   credits();
@@ -187,8 +188,8 @@
 
   ut_WriteLog("Entering into main loop...\n\n");
   ut_WriteLog("Ready to send/receive messages...\n");
-  key = 0;
-  while (key != 'x') {
+
+  while (ret != 255) {
     int x;
     alarm(ping);
     x = check_io(sock, 0);
@@ -214,6 +215,8 @@
     if ((x & 2) == 2) {
       keypad(scr_GetRosterWindow(), TRUE);
       key = scr_Getch();
+      ret = process_key(key);
+      /*
       switch (key) {
       case KEY_IC:
 	bud_AddBuddy(sock);
@@ -275,6 +278,7 @@
 	scr_ShowBuddyWindow();
 	break;
       }
+      */
     }
   }