Lines Matching refs:s

98         char * const s = buffer_string_prepare_copy(b, size);  in __attribute_nonnull__()  local
99 *s = '\0'; /*(for case (1 == b->used))*/ in __attribute_nonnull__()
100 return s; in __attribute_nonnull__()
133 char * const s = buffer_string_prepare_append(b, x); in buffer_extend()
137 char * const s = (b->size - len >= x + 1) in buffer_extend() local
142 s[x] = '\0'; in buffer_extend()
143 return s; in buffer_extend()
162 void buffer_copy_string(buffer * restrict b, const char * restrict s) { in buffer_copy_string() argument
163 if (__builtin_expect( (NULL == s), 0)) s = ""; in buffer_copy_string()
164 buffer_copy_string_len(b, s, strlen(s)); in buffer_copy_string()
167 void buffer_copy_string_len(buffer * const restrict b, const char * const restrict s, const size_t … in buffer_copy_string_len() argument
173 memcpy(d, s, len); in buffer_copy_string_len()
177 void buffer_append_string(buffer * restrict b, const char * restrict s) { in buffer_append_string() argument
178 if (__builtin_expect( (NULL == s), 0)) s = ""; in buffer_append_string()
179 buffer_append_string_len(b, s, strlen(s)); in buffer_append_string()
193 void buffer_append_string_len(buffer * const restrict b, const char * const restrict s, const size_… in buffer_append_string_len() argument
194 memcpy(buffer_extend(b, len), s, len); in buffer_append_string_len()
198 char * const restrict s = buffer_extend(b, len1+len2); in buffer_append_str2() local
200 mempcpy(mempcpy(s, s1, len1), s2, len2); in buffer_append_str2()
202 memcpy(s, s1, len1); in buffer_append_str2()
203 memcpy(s+len1, s2, len2); in buffer_append_str2()
208 char * restrict s = buffer_extend(b, len1+len2+len3); in buffer_append_str3() local
210 mempcpy(mempcpy(mempcpy(s, s1, len1), s2, len2), s3, len3); in buffer_append_str3()
212 memcpy(s, s1, len1); in buffer_append_str3()
213 memcpy((s+=len1), s2, len2); in buffer_append_str3()
214 memcpy((s+=len2), s3, len3); in buffer_append_str3()
222 char *s = buffer_extend(b, len); in buffer_append_iovec() local
226 s = mempcpy(s, iov[i].iov_base, iov[i].iov_len); in buffer_append_iovec()
228 memcpy(s, iov[i].iov_base, iov[i].iov_len); in buffer_append_iovec()
229 s += iov[i].iov_len; in buffer_append_iovec()
235 char * restrict s = buffer_string_prepare_append(b, alen+1); in buffer_append_path_len() local
237 if (b->used > 1 && s[-1] == '/') { in buffer_append_path_len()
246 *s++ = '/'; in buffer_append_path_len()
251 s[alen] = '\0'; in buffer_append_path_len()
252 memcpy(s, a, alen); in buffer_append_path_len()
266 buffer_copy_string_len_lc (buffer * const restrict b, const char * const restrict s, const size_t l… in buffer_copy_string_len_lc() argument
272 d[i] = (!light_isupper(s[i])) ? s[i] : s[i] | 0x20; in buffer_copy_string_len_lc()
415 int buffer_eq_icase_slen(const buffer * const b, const char * const s, const size_t slen) { in buffer_eq_icase_slen() argument
418 return (b->used == slen + 1) ? buffer_eq_icase_ssn(b->ptr, s, slen) : 0; in buffer_eq_icase_slen()
421 int buffer_eq_slen(const buffer * const b, const char * const s, const size_t slen) { in buffer_eq_slen() argument
424 return (b->used == slen + 1 && 0 == memcmp(b->ptr, s, slen)); in buffer_eq_slen()
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()
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()
481 void buffer_append_string_encoded_hex_lc(buffer * const restrict b, const char * const restrict s, … in buffer_append_string_encoded_hex_lc() argument
484 p[(i<<1)] = hex_chars_lc[(s[i] >> 4) & 0x0F]; in buffer_append_string_encoded_hex_lc()
485 p[(i<<1)+1] = hex_chars_lc[(s[i]) & 0x0F]; in buffer_append_string_encoded_hex_lc()
489 void buffer_append_string_encoded_hex_uc(buffer * const restrict b, const char * const restrict s, … in buffer_append_string_encoded_hex_uc() argument
492 p[(i<<1)] = hex_chars_uc[(s[i] >> 4) & 0x0F]; in buffer_append_string_encoded_hex_uc()
493 p[(i<<1)+1] = hex_chars_uc[(s[i]) & 0x0F]; in buffer_append_string_encoded_hex_uc()
590 void buffer_append_string_encoded(buffer * const restrict b, const char * const restrict s, size_t … in buffer_append_string_encoded() argument
611 for (ds = (unsigned char *)s, d_len = 0, ndx = 0; ndx < s_len; ds++, ndx++) { in buffer_append_string_encoded()
631 memcpy(d, s, s_len); in buffer_append_string_encoded()
635 for (ds = (unsigned char *)s, d_len = 0, ndx = 0; ndx < s_len; ds++, ndx++) { in buffer_append_string_encoded()
660 void buffer_append_string_c_escaped(buffer * const restrict b, const char * const restrict s, size_… in buffer_append_string_c_escaped() argument
665 for (ds = (unsigned char *)s, d_len = 0, ndx = 0; ndx < s_len; ds++, ndx++) { in buffer_append_string_c_escaped()
685 memcpy(d, s, s_len); in buffer_append_string_c_escaped()
689 for (ds = (unsigned char *)s, d_len = 0, ndx = 0; ndx < s_len; ds++, ndx++) { in buffer_append_string_c_escaped()
717 const char * restrict s, const size_t len) in buffer_append_bs_escaped() argument
728 for (const char * const end = s+len; s < end; ++s) { in buffer_append_bs_escaped()
730 const char * const ptr = s; in buffer_append_bs_escaped()
732 c = *(const unsigned char *)s; in buffer_append_bs_escaped()
733 } while (c >= ' ' && c <= '~' && c != '"' && c != '\\' && ++s < end); in buffer_append_bs_escaped()
734 if (s - ptr) buffer_append_string_len(b, ptr, s - ptr); in buffer_append_bs_escaped()
736 if (s == end) in buffer_append_bs_escaped()
769 const char * restrict s, const size_t len) in buffer_append_bs_escaped_json() argument
776 for (const char * const end = s+len; s < end; ++s) { in buffer_append_bs_escaped_json()
778 const char * const ptr = s; in buffer_append_bs_escaped_json()
780 c = *(const unsigned char *)s; in buffer_append_bs_escaped_json()
781 } while (c >= ' ' && c != '"' && c != '\\' && ++s < end); in buffer_append_bs_escaped_json()
782 if (s - ptr) buffer_append_string_len(b, ptr, s - ptr); in buffer_append_bs_escaped_json()
784 if (s == end) in buffer_append_bs_escaped_json()
987 unsigned char * const restrict s = (unsigned char *)b->ptr; in buffer_to_lower() local
990 if (light_isupper(s[i])) s[i] |= 0x20; in buffer_to_lower()
996 unsigned char * const restrict s = (unsigned char *)b->ptr; in buffer_to_upper() local
999 if (light_islower(s[i])) s[i] &= 0xdf; in buffer_to_upper()