ptr<pub3::expr_t> msgpack_t::unpack_fix_raw () { u_int8_t b; bool ok = get_byte (&b); assert (ok); // Strip off the top bit u_int8_t n = b ^ (0xa0); return unpack_raw (n); }
ptr<pub3::expr_t> msgpack_t::unpack_raw16 () { consume_byte (); u_int16_t s; bool ok = unpack_int (&s); ptr<pub3::expr_t> ret; if (ok) { ret = unpack_raw (s); } return ret; }
static char *unpack_string(struct tmate_unpacker *uk) { const char *buf; char *alloc_buf; size_t len; unpack_raw(uk, &buf, &len); alloc_buf = xmalloc(len + 1); memcpy(alloc_buf, buf, len); alloc_buf[len] = '\0'; return alloc_buf; }