Lines Matching defs:old_length
415 static char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) {
423 if (old_length <= 3 || old_length <= new_length)
424 return strndup(s, old_length);
440 s + old_length - (new_length - x - 3),
446 char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent) {
459 return ascii_ellipsize_mem(s, old_length, new_length, percent);
461 if (old_length <= 3 || old_length <= new_length)
462 return strndup(s, old_length);
470 for (i = s; k < x && i < s + old_length; i = utf8_next_char(i)) {
482 for (j = s + old_length; k < new_length && j > i; ) {
495 return memdup(s, old_length + 1);
501 len2 = s + old_length - j;
507 printf("old_length=%zu new_length=%zu x=%zu len=%u len2=%u k=%u\n",
508 old_length, new_length, x, len, len2, k);