/[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.41 by sysadm, Mon Jun 9 15:39:05 2025 UTC Revision 1.44 by sysadm, Tue Jun 17 02:06:48 2025 UTC
# Line 91  int outc(char c) Line 91  int outc(char c)
91          return ret;          return ret;
92  }  }
93    
94  int iflush()  int iflush(void)
95  {  {
96          int flags;          int flags;
97          struct epoll_event ev, events[MAX_EVENTS];          struct epoll_event ev, events[MAX_EVENTS];
# Line 534  int igetch(int timeout) Line 534  int igetch(int timeout)
534                                  case 49:                                  case 49:
535                                          out = KEY_HOME;                                          out = KEY_HOME;
536                                          break;                                          break;
537                                    case 50:
538                                            out = KEY_INS;
539                                            break;
540                                  case 51:                                  case 51:
541                                          out = KEY_DEL;                                          out = KEY_DEL;
542                                          break;                                          break;
# Line 819  int igetch(int timeout) Line 822  int igetch(int timeout)
822  int igetch_t(int sec)  int igetch_t(int sec)
823  {  {
824          int ch;          int ch;
825          time_t t_begin = time(0);          time_t t_begin = time(NULL);
826    
827          do          do
828          {          {
829                  ch = igetch(100);                  ch = igetch(100);
830          } while (!SYS_server_exit && ch == KEY_TIMEOUT && (time(0) - t_begin < sec));          } while (!SYS_server_exit && ch == KEY_TIMEOUT && (time(NULL) - t_begin < sec));
831    
832          return ch;          return ch;
833  }  }


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

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