Cosmetic fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3476 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
8b17bd3136
commit
695cff30e1
|
@ -77,9 +77,7 @@ struct coreinfo_cat {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static WINDOW *modwin;
|
static WINDOW *modwin, *menuwin;
|
||||||
static WINDOW *menuwin;
|
|
||||||
|
|
||||||
static int curwin;
|
static int curwin;
|
||||||
|
|
||||||
void print_module_title(WINDOW *win, const char *title)
|
void print_module_title(WINDOW *win, const char *title)
|
||||||
|
@ -90,7 +88,6 @@ void print_module_title(WINDOW *win, const char *title)
|
||||||
mvwprintw(win, 0, 1, title);
|
mvwprintw(win, 0, 1, title);
|
||||||
|
|
||||||
wmove(win, 1, 1);
|
wmove(win, 1, 1);
|
||||||
|
|
||||||
for (i = 0; i < 78; i++)
|
for (i = 0; i < 78; i++)
|
||||||
waddch(win, '\304');
|
waddch(win, '\304');
|
||||||
}
|
}
|
||||||
|
@ -110,7 +107,8 @@ static void print_submenu(struct coreinfo_cat *cat)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < cat->count; i++)
|
for (i = 0; i < cat->count; i++)
|
||||||
ptr += sprintf(ptr, "[%c: %s] ", 'A' + i, cat->modules[i]->name);
|
ptr += sprintf(ptr, "[%c: %s] ", 'A' + i,
|
||||||
|
cat->modules[i]->name);
|
||||||
|
|
||||||
mvwprintw(menuwin, 0, 0, menu);
|
mvwprintw(menuwin, 0, 0, menu);
|
||||||
}
|
}
|
||||||
|
@ -126,7 +124,7 @@ static void print_time_and_date(void)
|
||||||
rtc_read_clock(&tm);
|
rtc_read_clock(&tm);
|
||||||
|
|
||||||
mvwprintw(menuwin, 0, 57, "%02d/%02d/%04d - %02d:%02d:%02d",
|
mvwprintw(menuwin, 0, 57, "%02d/%02d/%04d - %02d:%02d:%02d",
|
||||||
tm.tm_mon, tm.tm_mday, 1900+tm.tm_year, tm.tm_hour,
|
tm.tm_mon, tm.tm_mday, 1900 + tm.tm_year, tm.tm_hour,
|
||||||
tm.tm_min, tm.tm_sec);
|
tm.tm_min, tm.tm_sec);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -138,7 +136,6 @@ static void print_menu(void)
|
||||||
char *ptr = menu;
|
char *ptr = menu;
|
||||||
|
|
||||||
wmove(menuwin, 1, 0);
|
wmove(menuwin, 1, 0);
|
||||||
|
|
||||||
for (j = 0; j < SCREEN_X; j++)
|
for (j = 0; j < SCREEN_X; j++)
|
||||||
waddch(menuwin, ' ');
|
waddch(menuwin, ' ');
|
||||||
|
|
||||||
|
@ -158,11 +155,9 @@ static void print_menu(void)
|
||||||
|
|
||||||
static void center(int row, const char *str)
|
static void center(int row, const char *str)
|
||||||
{
|
{
|
||||||
int len = strlen(str);
|
int j, len = strlen(str);
|
||||||
int j;
|
|
||||||
|
|
||||||
wmove(stdscr, row, 0);
|
wmove(stdscr, row, 0);
|
||||||
|
|
||||||
for (j = 0; j < SCREEN_X; j++)
|
for (j = 0; j < SCREEN_X; j++)
|
||||||
waddch(stdscr, ' ');
|
waddch(stdscr, ' ');
|
||||||
|
|
||||||
|
@ -283,7 +278,6 @@ int main(void)
|
||||||
|
|
||||||
for (i = 0; i < SCREEN_Y - 1; i++) {
|
for (i = 0; i < SCREEN_Y - 1; i++) {
|
||||||
wmove(modwin, i - 1, 0);
|
wmove(modwin, i - 1, 0);
|
||||||
|
|
||||||
for (j = 0; j < SCREEN_X; j++)
|
for (j = 0; j < SCREEN_X; j++)
|
||||||
waddch(modwin, ' ');
|
waddch(modwin, ' ');
|
||||||
}
|
}
|
||||||
|
@ -293,7 +287,6 @@ int main(void)
|
||||||
for (i = 0; i < ARRAY_SIZE(categories); i++) {
|
for (i = 0; i < ARRAY_SIZE(categories); i++) {
|
||||||
for (j = 0; j < categories[i].count; j++)
|
for (j = 0; j < categories[i].count; j++)
|
||||||
categories[i].modules[j]->init();
|
categories[i].modules[j]->init();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loop();
|
loop();
|
||||||
|
|
|
@ -60,7 +60,7 @@ static int lar_module_redraw(WINDOW *win)
|
||||||
print_module_title(win, "LAR Listing");
|
print_module_title(win, "LAR Listing");
|
||||||
|
|
||||||
if (lar == 0) {
|
if (lar == 0) {
|
||||||
mvwprintw(win, 11, 61 / 2, "Bad or missing LAR");
|
mvwprintw(win, 11, 61 / 2, "Bad or missing LAR");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue