Fixed mbsetup '%' output

This commit is contained in:
Michiel Broek
2002-01-15 21:32:07 +00:00
parent 0c57e334fd
commit 4a4154acc0
5 changed files with 51 additions and 38 deletions

View File

@@ -94,9 +94,19 @@ void errmsg(const char *format, ...)
/*
* Safe field display, does not format % characters but displays it.
*/
void show_field(int y, int x, char *str, int length, int fill)
{
mvprintw(y, x, padleft(str, length, fill));
int i;
locate(y, x);
for (i = 0; i < strlen(str); i++)
putchar(str[i]);
if (strlen(str) < length)
for (i = strlen(str); i < length; i++)
putchar(fill);
}