|
|
Author: spitzak
Date: 2006-01-27 01:46:36 -0500 (Fri, 27 Jan 2006)
New Revision: 4776
Modified:
trunk/src/x11/run.cxx
Log:
Fixed poll() implementation. We may want to use this by default.
Modified: trunk/src/x11/run.cxx
===================================================================
--- trunk/src/x11/run.cxx 2006-01-27 06:46:02 UTC (rev 4775)
+++ trunk/src/x11/run.cxx 2006-01-27 06:46:36 UTC (rev 4776)
@@ -363,7 +363,9 @@
*/
void fltk::remove_fd(int n, int events) {
int i,j;
+#if !USE_POLL
maxfd = 0;
+#endif
for (i=j=0; i<nfds; i++) {
#if USE_POLL
if (pollfds[i].fd == n) {
@@ -380,12 +382,15 @@
#endif
// move it down in the array if necessary:
if (j<i) {
- fd[j] = fd[i];
#if USE_POLL
pollfds[j] = pollfds[i];
+#else
+ fd[j] = fd[i];
#endif
}
+#if !USE_POLL
if (fd[j].fd > maxfd) maxfd = fd[j].fd;
+#endif
j++;
}
nfds = j;
[ Direct Link to Message ] | |
|
| |