Lines Matching refs:cb
23 void cn_cbor_free(cn_cbor* cb CBOR_CONTEXT) { in cn_cbor_free()
24 cn_cbor* p = cb; in cn_cbor_free()
105 cn_cbor* cb = NULL; in decode_item() local
137 cb = CN_CALLOC_CONTEXT(); in decode_item()
138 if (!cb) in decode_item()
141 cb->type = mt_trans[mt]; in decode_item()
143 cb->parent = parent; in decode_item()
145 parent->last_child->next = cb; in decode_item()
147 parent->first_child = cb; in decode_item()
149 parent->last_child = cb; in decode_item()
160 cb->flags |= CN_CBOR_FL_INDEF; in decode_item()
169 cb->v.uint = val; /* to do: Overflow check */ in decode_item()
172 cb->v.sint = ~val; /* to do: Overflow check */ in decode_item()
175 cb->v.str = (char *) pos; in decode_item()
176 cb->length = val; in decode_item()
183 if ((cb->v.count = val)) { in decode_item()
184 cb->flags |= CN_CBOR_FL_COUNT; in decode_item()
189 cb->v.uint = val; in decode_item()
193 case VAL_FALSE: cb->type = CN_CBOR_FALSE; break; in decode_item()
194 case VAL_TRUE: cb->type = CN_CBOR_TRUE; break; in decode_item()
195 case VAL_NIL: cb->type = CN_CBOR_NULL; break; in decode_item()
196 case VAL_UNDEF: cb->type = CN_CBOR_UNDEF; break; in decode_item()
199 cb->type = CN_CBOR_DOUBLE; in decode_item()
200 cb->v.dbl = decode_half(val); in decode_item()
207 cb->type = CN_CBOR_DOUBLE; in decode_item()
209 cb->v.dbl = u32.f; in decode_item()
216 cb->type = CN_CBOR_DOUBLE; in decode_item()
218 cb->v.dbl = u64.d; in decode_item()
223 default: cb->v.uint = val; in decode_item()
229 if (cb->type != parent->type) in decode_item()
243 return cb; in decode_item()
245 cb = parent; in decode_item()
249 parent = cb; in decode_item()