/****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#endif
#undef CUR
-MODULE_ID("$Id: lib_twait.c,v 1.63 2012/01/21 19:21:29 KO.Myung-Hun Exp $")
+MODULE_ID("$Id: lib_twait.c,v 1.67 2013/02/18 09:22:27 tom Exp $")
static long
_nc_gettime(TimeType * t0, int first)
starttime = _nc_gettime(&t0, TRUE);
count = 0;
+ (void) count;
#ifdef NCURSES_WGETCH_EVENTS
if ((mode & TW_EVENT) && evl)
memset(fd_list, 0, sizeof(fd_list));
#ifdef NCURSES_WGETCH_EVENTS
- if ((mode & TW_EVENT) && evl)
+ if ((mode & TW_EVENT) && evl) {
fds = typeMalloc(struct pollfd, MIN_FDS + evl->count);
+ if (fds == 0)
+ return TW_NONE;
+ }
#endif
if (mode & TW_INPUT) {
}
}
}
-
- if (fds != fd_list)
- free((char *) fds);
-
#endif
#elif defined(__BEOS__)
result |= TW_EVENT;
#endif
+#if USE_FUNC_POLL
+#ifdef NCURSES_WGETCH_EVENTS
+ if (fds != fd_list)
+ free((char *) fds);
+#endif
+#endif
+
return (result);
}