Searched refs:new_length (Results 1 – 3 of 3) sorted by relevance
/systemd-251/src/test/ |
D | test-ellipsize.c | 14 static void test_ellipsize_mem_one(const char *s, size_t old_length, size_t new_length) { in test_ellipsize_mem_one() argument 32 new_length); in test_ellipsize_mem_one() 36 max_width = MIN(utf8_console_width(n), new_length); in test_ellipsize_mem_one() 38 t1 = ellipsize_mem(n, old_length, new_length, 30); in test_ellipsize_mem_one() 45 t2 = ellipsize_mem(n, old_length, new_length, 90); in test_ellipsize_mem_one() 52 t3 = ellipsize_mem(n, old_length, new_length, 100); in test_ellipsize_mem_one() 59 if (new_length >= old_length) { in test_ellipsize_mem_one()
|
/systemd-251/src/basic/ |
D | string-util.c | 291 static char *ascii_ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned perc… in ascii_ellipsize_mem() argument 297 assert(new_length != SIZE_MAX); in ascii_ellipsize_mem() 299 if (old_length <= new_length) in ascii_ellipsize_mem() 303 switch (new_length) { in ascii_ellipsize_mem() 329 t = new(char, new_length+3); in ascii_ellipsize_mem() 333 assert(new_length >= need_space); in ascii_ellipsize_mem() 335 x = ((new_length - need_space) * percent + 50) / 100; in ascii_ellipsize_mem() 336 assert(x <= new_length - need_space); in ascii_ellipsize_mem() 340 suffix_len = new_length - x - need_space; 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 [all …]
|
/systemd-251/src/shared/ |
D | format-table.c | 1887 static char *align_string_mem(const char *str, const char *url, size_t new_length, unsigned percent… in align_string_mem() argument 1925 if (w >= new_length) in align_string_mem() 1929 space = new_length - w; in align_string_mem()
|