more that 32 flag array testing
Bruce Worden
bruce at seismo.gps.caltech.edu
Wed Oct 10 03:58:37 AEST 1990
In article <1990Oct8.165154.26747 at vitro.uucp> fsb at vitro.uucp (Steve Brailsford) writes:
> [ looking for a way to set and test boolean flags ]
I don't know what you consider to be too computationally intensive, but you
might want to look at the way the macros that support the "select()" function
provide the exact (almost) functionality you are looking for. Four macros
(with some supporting code) are provided: FD_SET, FD_CLR, FD_ISSET, and
FD_ZERO. It should be a simple matter to modify them to work for any sized
string of bits. They are defined in <sys/types.h>. Good luck.
(Note, the select() function itself is of no interest here, just the macros
that support it. If you don't have these macros, and you send my a working
e-mail address, I'll send you some non-copyright-infringing copies.)
--------------------------------------------------------------------------
C. Bruce Worden bruce at seismo.gps.caltech.edu
252-21 Seismological Laboratory, Caltech, Pasadena, CA 91125
More information about the Comp.lang.c
mailing list