Lines Matching refs:xbp

133 cbor_encode_uint (xo_buffer_t *xbp, uint64_t minor, unsigned limit)
135 char *bp = xbp->xb_curp;
163 xbp->xb_curp = bp;
167 cbor_append (xo_handle_t *xop, cbor_private_t *cbor, xo_buffer_t *xbp,
170 if (!xo_buf_has_room(xbp, minor + 2))
173 unsigned offset = xo_buf_offset(xbp);
175 *xbp->xb_curp = major;
176 cbor_encode_uint(xbp, minor, CBOR_ULIMIT);
178 xo_buf_append(xbp, data, minor);
181 cbor_memdump(stdout, "append", xo_buf_data(xbp, offset),
182 xbp->xb_curp - xbp->xb_bufp - offset, "",
204 cbor_content (xo_handle_t *xop, cbor_private_t *cbor, xo_buffer_t *xbp,
209 unsigned offset = xo_buf_offset(xbp);
226 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(value), value);
228 *xbp->xb_curp = negative ? CBOR_NEGATIVE : CBOR_UNSIGNED;
231 cbor_encode_uint(xbp, ival, negative ? CBOR_NLIMIT : CBOR_ULIMIT);
236 cbor_memdump(stdout, "content", xo_buf_data(xbp, offset),
237 xbp->xb_curp - xbp->xb_bufp - offset, "",
248 xo_buffer_t *xbp = cbor ? &cbor->c_data : NULL;
266 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
267 cbor_append(xop, cbor, xbp, CBOR_MAP | CBOR_INDEF, 0, NULL);
272 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
277 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
278 cbor_append(xop, cbor, xbp, CBOR_ARRAY | CBOR_INDEF, 0, NULL);
283 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
288 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
289 cbor_append(xop, cbor, xbp, CBOR_ARRAY | CBOR_INDEF, 0, NULL);
295 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
301 cbor_append(xop, cbor, xbp, CBOR_MAP | CBOR_INDEF, 0, NULL);
306 cbor_append(xop, cbor, xbp, CBOR_BREAK, 0, NULL);
312 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(name), name);
313 cbor_append(xop, cbor, xbp, CBOR_STRING, strlen(value), value);
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);
336 xbp->xb_bufp, xbp->xb_curp - xbp->xb_bufp,
339 rc = write(1, xbp->xb_bufp, xbp->xb_curp - xbp->xb_bufp);