Remove forces spaces from ebracket and ensure ok matches eend output.
This commit is contained in:
parent
5ee9dfff6d
commit
7de72229a5
@ -130,7 +130,7 @@ and
|
|||||||
.Fn ewendv
|
.Fn ewendv
|
||||||
are the counterparts to the above functions. If
|
are the counterparts to the above functions. If
|
||||||
.Fa retval
|
.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
|
line. Otherwise we print the formatted string using
|
||||||
.Fn error
|
.Fn error
|
||||||
(or
|
(or
|
||||||
@ -149,7 +149,7 @@ does the same as
|
|||||||
.Fn eend
|
.Fn eend
|
||||||
but prints
|
but prints
|
||||||
.Fa msg
|
.Fa msg
|
||||||
instead of OK or !! in the color
|
instead of ok or !! in the color
|
||||||
.Fa color
|
.Fa color
|
||||||
at the column
|
at the column
|
||||||
.Fa col .
|
.Fa col .
|
||||||
|
@ -778,7 +778,7 @@ static void _eend (FILE * restrict fp, int col, einfo_color_t color,
|
|||||||
if (! msg)
|
if (! msg)
|
||||||
return;
|
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
|
/* cons25 is special - we need to remove one char, otherwise things
|
||||||
* do not align properly at all. */
|
* do not align properly at all. */
|
||||||
@ -793,14 +793,14 @@ static void _eend (FILE * restrict fp, int col, einfo_color_t color,
|
|||||||
cols--;
|
cols--;
|
||||||
|
|
||||||
if (cols > 0 && colour_terminal (fp)) {
|
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 (color), msg,
|
||||||
ecolor (ECOLOR_BRACKET), ecolor (ECOLOR_NORMAL));
|
ecolor (ECOLOR_BRACKET), ecolor (ECOLOR_NORMAL));
|
||||||
} else {
|
} else {
|
||||||
if (col > 0)
|
if (col > 0)
|
||||||
for (i = 0; i < cols - col; i++)
|
for (i = 0; i < cols - col; i++)
|
||||||
fprintf (fp, " ");
|
fprintf (fp, " ");
|
||||||
fprintf (fp, " [ %s ]\n", msg);
|
fprintf (fp, " [%s]\n", msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user