ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/iom.C
(Generate patch)

Comparing rxvt-unicode/src/iom.C (file contents):
Revision 1.1 by pcg, Mon Nov 24 17:28:08 2003 UTC vs.
Revision 1.2 by pcg, Tue Nov 25 15:25:17 2003 UTC

118 FD_ZERO (&wfd); 118 FD_ZERO (&wfd);
119 119
120 int fds = 0; 120 int fds = 0;
121 121
122 for (io_watcher **w = iow.begin (); w < iow.end (); ++w) 122 for (io_watcher **w = iow.begin (); w < iow.end (); ++w)
123 { 123 {
124 if ((*w)->events & EVENT_READ ) FD_SET ((*w)->fd, &rfd); 124 if ((*w)->events & EVENT_READ ) FD_SET ((*w)->fd, &rfd);
125 if ((*w)->events & EVENT_WRITE) FD_SET ((*w)->fd, &wfd); 125 if ((*w)->events & EVENT_WRITE) FD_SET ((*w)->fd, &wfd);
126 126
127 if ((*w)->fd > fds) fds = (*w)->fd; 127 if ((*w)->fd > fds) fds = (*w)->fd;
128 } 128 }
129 129
130 fds = select (fds + 1, &rfd, &wfd, 0, &to); 130 fds = select (fds + 1, &rfd, &wfd, 0, &to);
131 131
132 set_now (); 132 set_now ();
133 133
134 if (fds > 0) 134 if (fds > 0)
135 for (io_watcher **w = iow.begin (); w < iow.end (); w++) 135 for (io_watcher **w = iow.begin (); w < iow.end (); ++w)
136 { 136 {
137 short revents = (*w)->events; 137 short revents = (*w)->events;
138 138
139 if (!FD_ISSET ((*w)->fd, &rfd)) revents &= ~EVENT_READ; 139 if (!FD_ISSET ((*w)->fd, &rfd)) revents &= ~EVENT_READ;
140 if (!FD_ISSET ((*w)->fd, &wfd)) revents &= ~EVENT_WRITE; 140 if (!FD_ISSET ((*w)->fd, &wfd)) revents &= ~EVENT_WRITE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines