Lines Matching +defs:bit +defs:offset
45 #define DPOC(data,offset) ((const void *)(((const unsigned char *)data) + offset))
46 #define DPO(data,offset) ((void *)(((unsigned char *)data) + offset))
97 return t->offset;
101 * Here is abstraction to not so well evil fact of bit fields in C,
106 * we'll grow up and use #defined constant, but bit fields are still
112 unsigned int bit, size_t size)
114 unsigned int localbit = bit % 8;
117 *(unsigned int *)data |= (1 << ((size * 8) - bit - 1));
119 *(unsigned int *)data |= (1 << bit);
125 bmember_isset_bit(const void *data, unsigned int bit, size_t size)
128 if ((*(unsigned int *)data) & (1 << ((size * 8) - bit - 1)))
132 if ((*(unsigned int *)data) & (1 << bit))
139 bmember_put_bit(unsigned char *p, const void *data, unsigned int bit,
142 unsigned int localbit = bit % 8;
144 if (bmember_isset_bit(data, bit, size)) {
172 void *el = DPO(data, t->offset);
251 data = DPO(data, t->offset);
296 void *el = DPO(data, t->offset);
319 struct template_of *el = DPO(data, t->offset);
350 size_t size = bmember->offset;
363 while (bmember->offset / 8 > pos / 8) {
370 bmember_get_bit(p, data, bmember->offset, size);
379 unsigned int *element = DPO(data, choice->offset);
386 DPO(data, choice[i].offset), &datalen);
457 const void *el = DPOC(data, t->offset);
483 data = DPOC(data, t->offset);
516 const void *el = DPOC(data, t->offset);
531 const struct template_of *el = DPOC(data, t->offset);
593 struct template_of *el = DPO(data, t->offset);
618 size_t size = bmember->offset;
630 pos = bmember->offset;
633 while (bmember->offset / 8 < pos / 8) {
642 bmember_put_bit(&c, data, bmember->offset, size, &bitset);
664 const unsigned int *element = DPOC(data, choice->offset);
678 el = DPOC(data, choice->offset);
711 const void *el = DPOC(data, t->offset);
732 data = DPO(data, t->offset);
750 const void *el = DPOC(data, t->offset);
761 const struct template_of *el = DPOC(data, t->offset);
775 size_t size = bmember->offset;
788 if (bmember_isset_bit(data, bmember->offset, size)) {
789 ret += (bmember->offset / 8) + 1;
799 const unsigned int *element = DPOC(data, choice->offset);
808 ret += _asn1_length(choice->ptr, DPOC(data, choice->offset));
836 void *el = DPO(data, t->offset);
858 void *el = DPO(data, t->offset);
868 void *el = DPO(data, t->offset);
886 struct template_of *el = DPO(data, t->offset);
905 const unsigned int *element = DPOC(data, choice->offset);
914 _asn1_free(choice->ptr, DPO(data, choice->offset));
946 const void *fel = DPOC(from, t->offset);
947 void *tel = DPO(to, t->offset);
987 const void *fel = DPOC(from, t->offset);
988 void *tel = DPO(to, t->offset);
1004 from = DPOC(from, t->offset);
1005 to = DPO(to, t->offset);
1038 const struct template_of *fel = DPOC(from, t->offset);
1039 struct template_of *tel = DPO(to, t->offset);
1060 size_t size = bmember->offset;
1066 const unsigned int *felement = DPOC(from, choice->offset);
1067 unsigned int *telement = DPO(to, choice->offset);
1079 DPOC(from, choice->offset),
1080 DPO(to, choice->offset));
1100 memset(data, 0, t->offset);
1104 memset(data, 0, t->offset);
1114 memset(to, 0, t->offset);
1118 memset(to, 0, t->offset);