diff options
Diffstat (limited to 'src/isode/psap/strb2bitstr.c')
| -rw-r--r-- | src/isode/psap/strb2bitstr.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/isode/psap/strb2bitstr.c b/src/isode/psap/strb2bitstr.c deleted file mode 100644 index 4ad1061b48..0000000000 --- a/src/isode/psap/strb2bitstr.c +++ /dev/null @@ -1,57 +0,0 @@ -/* strb2bitstr.c - string of bits to bit string */ - -/* - * isode/psap/strb2bitstr.c - */ - -/* - * NOTICE - * - * 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 - * this agreement. - * - */ - - -/* LINTLIBRARY */ - -#include <stdio.h> -#include "psap.h" - -/* */ - -PE strb2bitstr (cp, len, class, id) -register char *cp; -register int len; -PElementClass class; -PElementID id; -{ - register int i, - j, - bit, - mask; - register PE p; - - if ((p = pe_alloc (class, PE_FORM_PRIM, id)) == NULLPE) - return NULLPE; - - p = prim2bit (p); - if (len > 0 && bit_off (p, len - 1) == NOTOK) { -no_mem: ; - pe_free (p); - return NULLPE; - } - - for (bit = (*cp & 0xff), i = 0, mask = 1 << (j = 7); i < len; i++) { - if ((bit & mask) && bit_on (p, i) == NOTOK) - goto no_mem; - if (j-- == 0) - bit = *++cp & 0xff, mask = 1 << (j = 7); - else - mask >>= 1; - } - - return p; -} |
