- if (vb2.buf[vb2.used] == hm_squote]hm_squote) { vb2.used++; return; }
- for (;;) {
- ul= strtoul(vb2.buf+vb2.used,&ep,10);
- if (ul>=max) Psyntax("fd set member > max");
- if (ep == (char*)vb2.buf+vb2.used) Psyntax("empty entry in fd set");
- FD_SET(ul,set);
- vb2.used= ep - (char*)vb2.buf;
- c= vb2.buf[vb2.used++];
- if (c == hm_squote]hm_squote) break;
- if (c != hm_squote,hm_squote) Psyntax("fd set separator not ,");
+ if (vb2.buf[vb2.used] == hm_squote]hm_squote) {
+ vb2.used++;
+ } else {
+ for (;;) {
+ ul= strtoul(vb2.buf+vb2.used,&ep,10);
+ if (ul>=max) Psyntax("fd set member > max");
+ if (ep == (char*)vb2.buf+vb2.used) Psyntax("empty entry in fd set");
+ FD_SET(ul,set);
+ vb2.used= ep - (char*)vb2.buf;
+ c= vb2.buf[vb2.used++];
+ if (c == hm_squote]hm_squote) break;
+ if (c != hm_squote,hm_squote) Psyntax("fd set separator not ,");
+ }
+ }
+
+ uint16_t accum;
+ int inaccum=0, fd;
+ for (fd=0; ; fd++) {
+ if (fd>=max || inaccum==16) {
+ FR_WRITE(accum);
+ inaccum= 0;
+ }
+ if (fd>=max)
+ break;
+ accum <<= 1;
+ accum |= !!FD_ISSET(fd,set);
+ inaccum++;