Lines Matching defs:buff

33 static int AppendChar(char **buff, const char *buff_end, char c) {
34 if (*buff < buff_end) {
35 **buff = c;
36 (*buff)++;
44 static int AppendNumber(char **buff, const char *buff_end, u64 absolute_value,
56 result += AppendChar(buff, buff_end, '-');
74 result += AppendChar(buff, buff_end, c);
76 if (negative && !pad_with_zero) result += AppendChar(buff, buff_end, '-');
79 result += AppendChar(buff, buff_end, (digit < 10) ? '0' + digit
85 static int AppendUnsigned(char **buff, const char *buff_end, u64 num, u8 base,
87 return AppendNumber(buff, buff_end, num, base, minimal_num_length,
91 static int AppendSignedDecimal(char **buff, const char *buff_end, s64 num,
94 return AppendNumber(buff, buff_end, (u64)(negative ? -num : num), 10,
98 static int AppendString(char **buff, const char *buff_end, int precision,
106 result += AppendChar(buff, buff_end, *s);
111 static int AppendPointer(char **buff, const char *buff_end, u64 ptr_value) {
113 result += AppendString(buff, buff_end, -1, "0x");
114 result += AppendUnsigned(buff, buff_end, ptr_value, 16,
119 int VSNPrintf(char *buff, int buff_length,
125 const char *buff_end = &buff[buff_length - 1];
130 result += AppendChar(&buff, buff_end, *cur);
162 result += AppendSignedDecimal(&buff, buff_end, dval, width,
171 result += AppendUnsigned(&buff, buff_end, uval,
177 result += AppendPointer(&buff, buff_end, va_arg(args, uptr));
182 result += AppendString(&buff, buff_end, precision, va_arg(args, char*));
187 result += AppendChar(&buff, buff_end, va_arg(args, int));
192 result += AppendChar(&buff, buff_end, '%');
200 RAW_CHECK(buff <= buff_end);
201 AppendChar(&buff, buff_end + 1, '\0');