/[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.4 by sysadm, Wed Mar 2 16:33:49 2005 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);
75    }    }
76    
77    while (pos < len)    while (pos < len)
# Line 181  igetch () Line 184  igetch ()
184      }      }
185    
186    //for debug    //for debug
187    log_std ("-->[%u]\n", out);    //log_std ("-->[%u]\n", out);
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