• Home
  • Raw
  • Download

Lines Matching refs:val

27   static void write_u32v(uint8_t** dest, uint32_t val) {  in write_u32v()  argument
28 while (val >= 0x80) { in write_u32v()
29 *((*dest)++) = static_cast<uint8_t>(0x80 | (val & 0x7F)); in write_u32v()
30 val >>= 7; in write_u32v()
32 *((*dest)++) = static_cast<uint8_t>(val & 0x7F); in write_u32v()
37 static void write_i32v(uint8_t** dest, int32_t val) { in write_i32v() argument
38 if (val >= 0) { in write_i32v()
39 while (val >= 0x40) { // prevent sign extension. in write_i32v()
40 *((*dest)++) = static_cast<uint8_t>(0x80 | (val & 0x7F)); in write_i32v()
41 val >>= 7; in write_i32v()
43 *((*dest)++) = static_cast<uint8_t>(val & 0xFF); in write_i32v()
45 while ((val >> 6) != -1) { in write_i32v()
46 *((*dest)++) = static_cast<uint8_t>(0x80 | (val & 0x7F)); in write_i32v()
47 val >>= 7; in write_i32v()
49 *((*dest)++) = static_cast<uint8_t>(val & 0x7F); in write_i32v()
55 static void write_u64v(uint8_t** dest, uint64_t val) { in write_u64v() argument
56 while (val >= 0x80) { in write_u64v()
57 *((*dest)++) = static_cast<uint8_t>(0x80 | (val & 0x7F)); in write_u64v()
58 val >>= 7; in write_u64v()
60 *((*dest)++) = static_cast<uint8_t>(val & 0x7F); in write_u64v()
65 static void write_i64v(uint8_t** dest, int64_t val) { in write_i64v() argument
66 if (val >= 0) { in write_i64v()
67 while (val >= 0x40) { // prevent sign extension. in write_i64v()
68 *((*dest)++) = static_cast<uint8_t>(0x80 | (val & 0x7F)); in write_i64v()
69 val >>= 7; in write_i64v()
71 *((*dest)++) = static_cast<uint8_t>(val & 0xFF); in write_i64v()
73 while ((val >> 6) != -1) { in write_i64v()
74 *((*dest)++) = static_cast<uint8_t>(0x80 | (val & 0x7F)); in write_i64v()
75 val >>= 7; in write_i64v()
77 *((*dest)++) = static_cast<uint8_t>(val & 0x7F); in write_i64v()
84 static size_t sizeof_u32v(size_t val) { in sizeof_u32v() argument
88 val = val >> 7; in sizeof_u32v()
89 } while (val > 0); in sizeof_u32v()
94 static size_t sizeof_i32v(int32_t val) { in sizeof_i32v() argument
96 if (val >= 0) { in sizeof_i32v()
97 while (val >= 0x40) { // prevent sign extension. in sizeof_i32v()
99 val >>= 7; in sizeof_i32v()
102 while ((val >> 6) != -1) { in sizeof_i32v()
104 val >>= 7; in sizeof_i32v()
111 static size_t sizeof_u64v(uint64_t val) { in sizeof_u64v() argument
115 val = val >> 7; in sizeof_u64v()
116 } while (val > 0); in sizeof_u64v()
121 static size_t sizeof_i64v(int64_t val) { in sizeof_i64v() argument
123 if (val >= 0) { in sizeof_i64v()
124 while (val >= 0x40) { // prevent sign extension. in sizeof_i64v()
126 val >>= 7; in sizeof_i64v()
129 while ((val >> 6) != -1) { in sizeof_i64v()
131 val >>= 7; in sizeof_i64v()