Lines Matching refs:buf
276 char *buf; in buffer_append_uint_hex_lc() local
287 buf = buffer_extend(b, shift >> 2); /*nibbles (4 bits)*/ in buffer_append_uint_hex_lc()
291 *(buf++) = hex_chars_lc[(value >> shift) & 0x0F]; in buffer_append_uint_hex_lc()
297 static char* utostr(char buf[LI_ITOSTRING_LENGTH], uintmax_t val) { in __attribute_nonnull__()
298 char *cur = buf+LI_ITOSTRING_LENGTH; in __attribute_nonnull__()
308 static char* itostr(char buf[LI_ITOSTRING_LENGTH], intmax_t val) { in __attribute_nonnull__()
314 char *cur = utostr(buf, uval); in __attribute_nonnull__()
321 char buf[LI_ITOSTRING_LENGTH]; in buffer_append_int() local
322 const char * const str = itostr(buf, val); in buffer_append_int()
323 buffer_append_string_len(b, str, buf+sizeof(buf) - str); in buffer_append_int()
348 size_t li_itostrn(char *buf, size_t buf_len, intmax_t val) { in li_itostrn() argument
353 memcpy(buf, str, len); in li_itostrn()
357 size_t li_utostrn(char *buf, size_t buf_len, uintmax_t val) { in li_utostrn() argument
362 memcpy(buf, str, len); in li_utostrn()
438 void li_tohex_lc(char * const restrict buf, size_t buf_len, const char * const restrict s, size_t s… in li_tohex_lc() argument
443 buf[2*i] = hex_chars_lc[(s[i] >> 4) & 0x0F]; in li_tohex_lc()
444 buf[2*i+1] = hex_chars_lc[s[i] & 0x0F]; in li_tohex_lc()
446 buf[2*s_len] = '\0'; in li_tohex_lc()
449 void li_tohex_uc(char * const restrict buf, size_t buf_len, const char * const restrict s, size_t s… in li_tohex_uc() argument
454 buf[2*i] = hex_chars_uc[(s[i] >> 4) & 0x0F]; in li_tohex_uc()
455 buf[2*i+1] = hex_chars_uc[s[i] & 0x0F]; in li_tohex_uc()
457 buf[2*s_len] = '\0'; in li_tohex_uc()