Lines Matching defs:mem

478 static apr_status_t deserialize_uint(const unsigned char **mem,
491 val = (val << 8) | **mem;
492 *mem += 1;
500 apr_status_t ctutil_deserialize_uint64(const unsigned char **mem,
504 return deserialize_uint(mem, avail, 64, pval);
507 apr_status_t ctutil_deserialize_uint16(const unsigned char **mem,
514 rv = deserialize_uint(mem, avail, 16, &val64);
519 static apr_status_t serialize_uint(unsigned char **mem, apr_size_t *avail,
534 **mem = (unsigned char)((val & mask) >> shift);
535 *mem += 1;
544 apr_status_t ctutil_serialize_uint64(unsigned char **mem, apr_size_t *avail,
547 return serialize_uint(mem, avail, 64, val);
550 apr_status_t ctutil_serialize_uint24(unsigned char **mem, apr_size_t *avail,
553 return serialize_uint(mem, avail, 24, val);
556 apr_status_t ctutil_serialize_uint16(unsigned char **mem, apr_size_t *avail,
559 return serialize_uint(mem, avail, 16, val);
562 apr_status_t ctutil_serialize_uint8(unsigned char **mem, apr_size_t *avail,
565 return serialize_uint(mem, avail, 8, val);
568 apr_status_t ctutil_write_var16_bytes(unsigned char **mem, apr_size_t *avail,
578 rv = ctutil_serialize_uint16(mem, avail, len);
583 memcpy(*mem, val, len);
584 *mem += len;
589 apr_status_t ctutil_write_var24_bytes(unsigned char **mem, apr_size_t *avail,
599 rv = ctutil_serialize_uint24(mem, avail, len);
604 memcpy(*mem, val, len);
605 *mem += len;
613 static apr_status_t read_length_prefix(const unsigned char **mem, apr_size_t *avail,
619 rv = ctutil_deserialize_uint16(mem, avail, &val);
627 static apr_status_t read_fixed_bytes(const unsigned char **mem, apr_size_t *avail,
635 *start = *mem;
637 *mem += len;
642 apr_status_t ctutil_read_var_bytes(const unsigned char **mem, apr_size_t *avail,
647 rv = read_length_prefix(mem, avail, len);
652 rv = read_fixed_bytes(mem, avail, *len, start);