Commit graph

5 commits

Author SHA1 Message Date
Bill Currie
388b6e6e8f Add set_size ().
Return the number of members in the set.
2012-11-15 13:44:07 +09:00
Bill Currie
8567508963 Rewrite set_first() and add set_next().
set_first() now returns a pointer to a setstate_t struct that holds the
state necessary for scanning a set. set_next() will automatically delete
the state block when the end of the set is reached. set_delstate() is also
provided to allow early termination of the scan.
2012-11-15 13:44:07 +09:00
Bill Currie
8fb958603c Add set_first.
It returns the first element of a set. If the set is empty, -1 (unsigned)
is returned.
2012-11-15 13:44:07 +09:00
Bill Currie
964ea7f9fe Add set_as_string for debug output. 2012-11-15 13:44:07 +09:00
Bill Currie
cdc790d0c8 Add a set type and support code. 2012-11-15 13:44:06 +09:00