/[LeafOK_CVS]/lbbs/src/io.c
ViewVC logotype

Diff of /lbbs/src/io.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 by sysadm, Tue Nov 30 07:10:32 2004 UTC Revision 1.5 by sysadm, Thu Mar 17 10:48:46 2005 UTC
# Line 19  Line 19 
19  #include "common.h"  #include "common.h"
20  #include <stdio.h>  #include <stdio.h>
21  #include <stdarg.h>  #include <stdarg.h>
22    #include <sys/ioctl.h>
23    
24  int  int
25  outc(char c)  outc(char c)
# Line 63  igetch () Line 64  igetch ()
64    
65    if (pos >= len)    if (pos >= len)
66    {    {
     len = s_receive (socket_client, buf, 255, "");  
67      pos = 0;      pos = 0;
68    
69        //len = s_receive (socket_client, buf, 255, "");
70        len = read (0, buf, 255);
71    
72      //For debug      //For debug
73      //for (j = 0; j < len; j++)      //for (j = 0; j < len; j++)
74      //  log_std ("<--[%u]\n", (buf[j] + 256) % 256);      //  log_std ("<--[%u]\n", (buf[j] + 256) % 256);
# Line 158  igetch () Line 161  igetch ()
161                  case 49:                  case 49:
162                    out = KEY_HOME;                    out = KEY_HOME;
163                    break;                    break;
164                    case 51:
165                      out = KEY_DEL;
166                      break;
167                  case 52:                  case 52:
168                    out = KEY_END;                    out = KEY_END;
169                    break;                    break;
# Line 182  igetch () Line 188  igetch ()
188    
189    return out;    return out;
190  }  }
191    
192    int
193    ikbhit()
194    {
195      int len;
196      
197      ioctl (0, FIONREAD, &len);
198      
199      return len;
200    }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1