/* strb2bitstr.c - string of bits to bit string */
static char *rcsid
= "$Header: /f/osi/psap/RCS/strb2bitstr.c,v 7.1 91/02/22 09:37:11 mrose Interim $";
* $Header: /f/osi/psap/RCS/strb2bitstr.c,v 7.1 91/02/22 09:37:11 mrose Interim $
* $Log: strb2bitstr.c,v $
* Revision 7.1 91/02/22 09:37:11 mrose
* Revision 7.0 89/11/23 22:13:50 mrose
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
PE
strb2bitstr (cp
, len
, class, id
)
if ((p
= pe_alloc (class, PE_FORM_PRIM
, id
)) == NULLPE
)
if (len
> 0 && bit_off (p
, len
- 1) == NOTOK
) {
for (bit
= (*cp
& 0xff), i
= 0, mask
= 1 << (j
= 7); i
< len
; i
++) {
if ((bit
& mask
) && bit_on (p
, i
) == NOTOK
)
bit
= *++cp
& 0xff, mask
= 1 << (j
= 7);