Lines Matching refs:old_length
291 static char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned perc… in ascii_ellipsize_mem() argument
299 if (old_length <= new_length) in ascii_ellipsize_mem()
300 return strndup(s, old_length); in ascii_ellipsize_mem()
341 memcpy(t + x + 3, s + old_length - suffix_len, suffix_len); in ascii_ellipsize_mem()
347 char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) { in ellipsize_mem() argument
369 return strndup(s, old_length); in ellipsize_mem()
375 if (ascii_is_valid_n(s, old_length)) in ellipsize_mem()
376 return ascii_ellipsize_mem(s, old_length, new_length, percent); in ellipsize_mem()
382 for (i = s; i < s + old_length; i = utf8_next_char(i)) { in ellipsize_mem()
397 for (j = s + old_length; j > i; ) { in ellipsize_mem()
418 return memdup_suffix0(s, old_length); in ellipsize_mem()
421 if (j < s + old_length) in ellipsize_mem()
427 len2 = s + old_length - j; in ellipsize_mem()