From b580a0f00268d2e6f1771085d7a27c639cca41bf Mon Sep 17 00:00:00 2001 From: Pierre-Alexandre Meyer Date: Thu, 3 Sep 2009 15:23:22 -0700 Subject: [PATCH] cmenu: use putchar instead of putch when using default attribute There is no real need to do putch('x', 0x07), 0x07 being the default VGA attribute. Use putchar instead. Note that showhelp will trigger a drawbox first with 0x07 as attribute. Since we don't update the attribute, it is guaranteed to still be 0x07 when invoking putch. Signed-off-by: Pierre-Alexandre Meyer --- com32/cmenu/libmenu/help.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com32/cmenu/libmenu/help.c b/com32/cmenu/libmenu/help.c index 22f6f3d..5306aa9 100644 --- a/com32/cmenu/libmenu/help.c +++ b/com32/cmenu/libmenu/help.c @@ -126,14 +126,14 @@ void showhelp(const char *filename) printtext(text, curr_line); gotoxy(HELP_BODY_ROW - 1, nc - HELP_RIGHT_MARGIN); if (curr_line > 0) - putch(HELP_MORE_ABOVE, 0x07); + putchar(HELP_MORE_ABOVE); else - putch(' ', 0x07); + putchar(' '); gotoxy(nr - HELP_BOTTOM_MARGIN + 1, nc - HELP_RIGHT_MARGIN); if (curr_line < numlines - ph) - putch(HELP_MORE_BELOW, 0x07); + putchar(HELP_MORE_BELOW); else - putch(' ', 0x07); + putchar(' '); inputc(&scan); // wait for user keypress -- 2.7.4