summaryrefslogtreecommitdiff
path: root/src/libeinfo
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-23 20:04:18 +0000
committerRoy Marples <roy@marples.name>2008-03-23 20:04:18 +0000
commit2715981ff967386a070d52cf9c00ef71983a085b (patch)
tree50cb801b9181c2b8ba7db6abf20e9249db1e1aa1 /src/libeinfo
parentce644e17353b8c29fad129db98a6f4d971561560 (diff)
downloadopenrc-2715981ff967386a070d52cf9c00ef71983a085b.tar.gz
openrc-2715981ff967386a070d52cf9c00ef71983a085b.tar.bz2
openrc-2715981ff967386a070d52cf9c00ef71983a085b.tar.xz
Revert commit 48fc097e39ec9b3edd9a8929fe9faf8f302451ec and add a comment about making it a runtime config option if it needs to change.
Diffstat (limited to 'src/libeinfo')
-rw-r--r--src/libeinfo/libeinfo.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
index c46cacb..f8ddcb5 100644
--- a/src/libeinfo/libeinfo.c
+++ b/src/libeinfo/libeinfo.c
@@ -787,7 +787,7 @@ static void _eend(FILE * __EINFO_RESTRICT fp, int col, ECOLOR color,
if (! msg)
return;
- cols = get_term_columns(fp) - (strlen(msg) + 5);
+ cols = get_term_columns(fp) - (strlen(msg) + 3);
/* cons25 is special - we need to remove one char, otherwise things
* do not align properly at all. */
@@ -801,15 +801,18 @@ static void _eend(FILE * __EINFO_RESTRICT fp, int col, ECOLOR color,
if (term_is_cons25)
cols--;
+ /* If extra spacing is required around msg, then please change
+ * via a runtime knob and leave this default as is as it saves 2
+ * valuable columns when running on 80 column screens. */
if (cols > 0 && colour_terminal(fp)) {
- fprintf(fp, "%s%s %s[%s %s %s]%s\n", up, tgoto(goto_column, 0, cols),
+ fprintf(fp, "%s%s %s[%s%s%s]%s\n", up, tgoto(goto_column, 0, cols),
ecolor(ECOLOR_BRACKET), ecolor(color), msg,
ecolor(ECOLOR_BRACKET), ecolor(ECOLOR_NORMAL));
} else {
if (col > 0)
for (i = 0; i < cols - col; i++)
fprintf(fp, " ");
- fprintf(fp, " [ %s ]\n", msg);
+ fprintf(fp, " [%s]\n", msg);
}
}