INNER CODE UNIT · C

buf_attr_enum

Cateners/tiny_container · app/src/main/cpp/tiny_ipp_jni.c:310

static void buf_attr_enum(buf_t *b, const char *name, int32_t val) {
    buf_attr_i32(b, IPP_VTAG_ENUM, name, val);
}

static void buf_tag(buf_t *b, uint8_t tag) { buf_write(b, &tag, 1); }

static void buf_free(buf_t *b) { free(b->data); b->data = NULL; b->len = b->cap = 0; }

/* ---- collection encoding helpers (RFC 8010 §3.1.7) ---- */

static void col_start(buf_t *b, const char *name /* NULL = continuation */) {
    uint8_t tag = IPP_VTAG_BEGCOLLECTION;
    buf_write(b, &tag, 1);
    if (name) {
        buf_u16be(b, (uint16_t)strlen(name));
        buf_write(b, name, strlen(name));
    } else {
        buf_u16be(b, 0);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…