#include "defs.h" /* * * S. R. Bourne * Bell Telephone Laboratories * */ CHAR bitbit[] = {1,2,4,8,16,32,64,128}; CHAR bitmsk[] = {~1,~2,~4,~8,~16,~32,~64,~128}; setbit(base, offset) CHAR base[]; INT offset; { base[offset>>3] |= bitbit[offset&7]; } clrbit(base, offset) CHAR base[]; INT offset; { base[offset>>3] &= bitmsk[offset&7]; } tstbit(base, offset) CHAR base[]; INT offset; { return(base[offset>>3]&bitbit[offset&7]); }