summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-12-24 13:55:40 +0000
committerRoy Marples <roy@marples.name>2007-12-24 13:55:40 +0000
commit7de72229a55300a7a22bfe4a4da43207f3fe475f (patch)
tree5386477697ffea2edc0403b4dcdde88a47df41b7
parent5ee9dfff6d71304015ed95c2a998b925c849db48 (diff)
downloadopenrc-7de72229a55300a7a22bfe4a4da43207f3fe475f.tar.gz
openrc-7de72229a55300a7a22bfe4a4da43207f3fe475f.tar.bz2
openrc-7de72229a55300a7a22bfe4a4da43207f3fe475f.tar.xz
Remove forces spaces from ebracket and ensure ok matches eend output.
-rw-r--r--man/einfo.34
-rw-r--r--src/libeinfo.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/man/einfo.3 b/man/einfo.3
index 9ecee2a..1777763 100644
--- a/man/einfo.3
+++ b/man/einfo.3
@@ -130,7 +130,7 @@ and
.Fn ewendv
are the counterparts to the above functions. If
.Fa retval
-is zero then OK in green is printed in a bracket at the end of the prior
+is zero then ok in green is printed in a bracket at the end of the prior
line. Otherwise we print the formatted string using
.Fn error
(or
@@ -149,7 +149,7 @@ does the same as
.Fn eend
but prints
.Fa msg
-instead of OK or !! in the color
+instead of ok or !! in the color
.Fa color
at the column
.Fa col .
diff --git a/src/libeinfo.c b/src/libeinfo.c
index bc03fa3..80338ad 100644
--- a/src/libeinfo.c
+++ b/src/libeinfo.c
@@ -778,7 +778,7 @@ static void _eend (FILE * restrict fp, int col, einfo_color_t 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. */
@@ -793,14 +793,14 @@ static void _eend (FILE * restrict fp, int col, einfo_color_t color,
cols--;
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);
}
}