diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2023-04-04 21:51:54 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-04-22 08:00:00 +0000 |
commit | b488c4bb8bf5acebbe754b0f5e43c550a7371c5e (patch) | |
tree | 95ddfbdc55ad9c0fa3d64defa99febefde7e7fce /src | |
parent | 8de5b1e633d524d641ba9c93007939f01751ee8c (diff) | |
download | strace-b488c4bb8bf5acebbe754b0f5e43c550a7371c5e.tar.gz |
strauss: rely on strace--tips test instead of forcibly trimming lines
The regression introduced in commit v5.19~99 "strauss: tips whitespace
and phrasing cleanups" (and subsequently fixed in v6.2-6-g5b4f05f42
"strauss: add missing line separators") highlights the issue
with the current approach with respect to tips formatting: it masks
the issues related to overlong lines in favor to the pretty formatting;
however, the presence of a (working) strace--tips test, that checks the
correctness of the tips rendering, makes this trimming superfluous.
Drop it and rely on the testing with respect to the guaranteeing
the proper wrapping of (overly) long tip lines.
* src/strauss.c (print_totd): Do not provide precision to the format
specification that prints tip line.
References: v6.2-6-g5b4f05f42 "strauss: add missing line separators"
Diffstat (limited to 'src')
-rw-r--r-- | src/strauss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/strauss.c b/src/strauss.c index 1b6d8d419..ce30823d9 100644 --- a/src/strauss.c +++ b/src/strauss.c @@ -369,9 +369,9 @@ print_totd(void) for (i = 0; (i < MAX_TIP_LINES) && (tips_tricks_tweaks[id][i] || (i < (ARRAY_SIZE(tip_right) - 1))); i++) { - fprintf(stderr, "%s%-*.*s%s%s\n", + fprintf(stderr, "%s%-*s%s%s\n", tip_left[MIN(i + 1, ARRAY_SIZE(tip_left) - 1)], - w, w, tips_tricks_tweaks[id][i] ?: "", + w, tips_tricks_tweaks[id][i] ?: "", tip_right[MIN(i + 1, ARRAY_SIZE(tip_right) - 1)], strauss[MIN(3 + i, strauss_lines - 1)]); } |