FLTK logo

[Library] r4776 - trunk/src/x11

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r4776 - trunk/src/x11 fltk-dev Jan 26, 2006  
 
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 ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.