diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-20 01:11:28 +0000 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2008-03-20 01:11:28 +0000 |
commit | 3a406feb179dbe10bbbc1b07abd935a7d04e6524 (patch) | |
tree | 5a210ca3480ce18cc522db72020af22ed5de46af /payloads/coreinfo/coreinfo.c | |
parent | 7249f7979237d7f14941036dd931545b5c9e73fb (diff) |
Cosmetic changes and coding style fixes by running 'indent', with some
manual fixups afterwards (trivial).
No functionality changes, compile-tested.
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@3174 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/coreinfo/coreinfo.c')
-rw-r--r-- | payloads/coreinfo/coreinfo.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/payloads/coreinfo/coreinfo.c b/payloads/coreinfo/coreinfo.c index 6dc07397a1..4a86bc256f 100644 --- a/payloads/coreinfo/coreinfo.c +++ b/payloads/coreinfo/coreinfo.c @@ -46,22 +46,22 @@ void print_module_title(WINDOW *win, const char *title) wmove(win, 1, 1); - for(i = 0; i < 78; i++) + for (i = 0; i < 78; i++) waddch(win, '\304'); } -void print_menu(void) { - int i, len; +void print_menu(void) +{ + int i, j, len; char menu[80]; char *ptr = menu; - int j; wmove(stdscr, 23, 0); - for(j = 0; j < SCREEN_X; j++) + for (j = 0; j < SCREEN_X; j++) waddch(stdscr, ' '); - for(i = 0; i < MODULE_COUNT; i++) + for (i = 0; i < MODULE_COUNT; i++) ptr += sprintf(ptr, "F%d: %s ", i + 1, modules[i]->name); mvprintw(23, 0, menu); @@ -74,7 +74,7 @@ void center(int row, const char *str) wmove(stdscr, row, 0); - for(j = 0; j < SCREEN_X; j++) + for (j = 0; j < SCREEN_X; j++) waddch(stdscr, ' '); mvprintw(row, (SCREEN_X - len) / 2, str); @@ -87,13 +87,12 @@ void header(int row, const char *str) int i; int len = strlen(str) + 4; - for(i = 0; i < (SCREEN_X - len) / 2; i++) + for (i = 0; i < (SCREEN_X - len) / 2; i++) ptr += sprintf(ptr, "="); ptr += sprintf(ptr, "[ %s ]", str); - - for(i = ((SCREEN_X - len) / 2) + len; i < SCREEN_X ; i++) + for (i = ((SCREEN_X - len) / 2) + len; i < SCREEN_X; i++) ptr += sprintf(ptr, "="); mvprintw(row, 0, buf); @@ -116,11 +115,11 @@ int loop(void) modules[curwin]->redraw(modwin); refresh(); - while(1) { + while (1) { key = getch(); if (key == ERR) - continue; + continue; if (key >= KEY_F(1) && key <= KEY_F(9)) { unsigned char ch = key - KEY_F(1); @@ -156,17 +155,17 @@ int main(void) wattrset(stdscr, COLOR_PAIR(1) | A_BOLD); wattrset(modwin, COLOR_PAIR(2)); - for(i = 0; i < 23; i++) { + for (i = 0; i < 23; i++) { wmove(modwin, i - 1, 0); - for(j = 0; j < SCREEN_X; j++) + for (j = 0; j < SCREEN_X; j++) waddch(modwin, ' '); } refresh(); - for(i = 0; i < MODULE_COUNT; i++) + for (i = 0; i < MODULE_COUNT; i++) modules[i]->init(); - + loop(); } |