- changed select to uselect

- some fixes in tecs.c
This commit is contained in:
zolliker
2008-10-16 14:33:25 +00:00
parent 5cb057f645
commit d239d98edb
12 changed files with 50 additions and 17 deletions

View File

@@ -2,6 +2,7 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/time.h>
#include "uselect.h"
static int lastFd=-1;
static struct termios atts;
@@ -53,7 +54,7 @@ int sys_select_or_key(fd_set *mask, int msecTmo, int *key) {
sys_keys_on();
rmask=*mask;
iret=select(FD_SETSIZE, &rmask, NULL, NULL, &tmo0);
iret=uselect(FD_SETSIZE, &rmask, NULL, NULL, &tmo0);
if (iret<0) {
FD_ZERO(&rmask);
perror("error in select");
@@ -72,9 +73,9 @@ int sys_select_or_key(fd_set *mask, int msecTmo, int *key) {
}
tmo.tv_sec=msecTmo / 1000;
tmo.tv_usec=(msecTmo%1000)*1000;
iret=select(FD_SETSIZE, &rmask, NULL, NULL, &tmo);
iret=uselect(FD_SETSIZE, &rmask, NULL, NULL, &tmo);
} else {
iret=select(FD_SETSIZE, &rmask, NULL, NULL, NULL);
iret=uselect(FD_SETSIZE, &rmask, NULL, NULL, NULL);
}
if (iret<0) {
FD_ZERO(&rmask);