Lines Matching defs:cbor

167 cbor_append (xo_handle_t *xop, cbor_private_t *cbor, xo_buffer_t *xbp,
183 cbor->c_indent * 2);
189 cbor_private_t *cbor = xo_realloc(NULL, sizeof(*cbor));
190 if (cbor == NULL)
193 bzero(cbor, sizeof(*cbor));
194 xo_buf_init(&cbor->c_data);
196 xo_set_private(xop, cbor);
198 cbor_append(xop, cbor, &cbor->c_data, CBOR_MAP | CBOR_INDEF, 0, NULL);
204 cbor_content (xo_handle_t *xop, cbor_private_t *cbor, xo_buffer_t *xbp,
212 cbor_append(xop, cbor, &cbor->c_data, CBOR_TRUE, 0, NULL);
214 cbor_append(xop, cbor, &cbor->c_data, CBOR_FALSE, 0, NULL);
226 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(value), value);
238 cbor->c_indent * 2);
247 cbor_private_t *cbor = private;
248 xo_buffer_t *xbp = cbor ? &cbor->c_data : NULL;
251 printf("%*sop %s: [%s] [%s]\n", cbor ? cbor->c_indent * 2 + 4 : 0, "",
257 if (cbor == NULL && op != XO_OP_CREATE)
266 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
267 cbor_append(xop, cbor, xbp, CBOR_MAP | CBOR_INDEF, 0, NULL);
268 cbor->c_indent += 1;
272 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
273 cbor->c_indent -= 1;
277 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
278 cbor_append(xop, cbor, xbp, CBOR_ARRAY | CBOR_INDEF, 0, NULL);
279 cbor->c_indent += 1;
283 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
284 cbor->c_indent -= 1;
288 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
289 cbor_append(xop, cbor, xbp, CBOR_ARRAY | CBOR_INDEF, 0, NULL);
290 cbor->c_indent += 1;
291 cbor->c_open_leaf_list = 1;
295 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
296 cbor->c_indent -= 1;
297 cbor->c_open_leaf_list = 0;
301 cbor_append(xop, cbor, xbp, CBOR_MAP | CBOR_INDEF, 0, NULL);
302 cbor->c_indent += 1;
306 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
307 cbor->c_indent -= 1;
311 if (!cbor->c_open_leaf_list)
312 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
313 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(value), value);
317 if (!cbor->c_open_leaf_list)
318 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
325 cbor_content(xop, cbor, xbp, value);
329 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
330 cbor->c_indent -= 1;
335 cbor_memdump(stdout, "cbor",