diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2011-10-31 12:54:00 -0700 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2011-11-01 19:08:23 +0100 |
commit | e11835e2995d130890ca9f45cb3e304f2ea3a6a9 (patch) | |
tree | cfc5345e9d98b231de0699714771a5d7f54c6ce1 /payloads/libpayload/curses/PDCurses-3.4/demos | |
parent | dd6906328904309e4d93e4bcb04a6cfa3646f29d (diff) |
libpayload: remove trailing whitespace and run dos2unix
Change-Id: Iffed3602456f5306711c65f06c873c58d4086e11
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/363
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'payloads/libpayload/curses/PDCurses-3.4/demos')
7 files changed, 41 insertions, 41 deletions
diff --git a/payloads/libpayload/curses/PDCurses-3.4/demos/firework.c b/payloads/libpayload/curses/PDCurses-3.4/demos/firework.c index 8d7921f3df..61fd65d549 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/demos/firework.c +++ b/payloads/libpayload/curses/PDCurses-3.4/demos/firework.c @@ -41,7 +41,7 @@ int main(int argc, char **argv) seed = time((time_t *)0); srand(seed); flag = 0; - + while (getch() == ERR) /* loop until a key is hit */ { do { diff --git a/payloads/libpayload/curses/PDCurses-3.4/demos/newdemo.c b/payloads/libpayload/curses/PDCurses-3.4/demos/newdemo.c index 3eae98d439..eefc0c16f1 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/demos/newdemo.c +++ b/payloads/libpayload/curses/PDCurses-3.4/demos/newdemo.c @@ -1,5 +1,5 @@ /* - * newdemo.c - A demo program using PDCurses. The program + * newdemo.c - A demo program using PDCurses. The program * illustrates the use of colors for text output. * * Hacks by jbuhler@cs.washington.edu on 12/29/96 @@ -238,7 +238,7 @@ int main(int argc, char **argv) #endif noecho(); - /* refresh stdscr so that reading from it will not cause it to + /* refresh stdscr so that reading from it will not cause it to overwrite the other windows that are being created */ refresh(); @@ -267,7 +267,7 @@ int main(int argc, char **argv) wattrset(win, COLOR_PAIR(2)); box(win, ' ', ' '); wrefresh(win); - + wattrset(win, 0); /* Do random output of a character */ diff --git a/payloads/libpayload/curses/PDCurses-3.4/demos/ptest.c b/payloads/libpayload/curses/PDCurses-3.4/demos/ptest.c index 1134f6ffca..6071f79d0e 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/demos/ptest.c +++ b/payloads/libpayload/curses/PDCurses-3.4/demos/ptest.c @@ -9,7 +9,7 @@ WINDOW *w4, *w5; long nap_msec = 1; -char *mod[] = +char *mod[] = { "test ", "TEST ", "(**) ", "*()* ", "<--> ", "LAST " }; @@ -84,7 +84,7 @@ void fill_panel(PANEL *pan) char num = *((char *)pan->user + 1); int y, x, maxy, maxx; - box(win, 0, 0); + box(win, 0, 0); mvwprintw(win, 1, 1, "-pan%c-", num); getmaxyx(win, maxy, maxx); diff --git a/payloads/libpayload/curses/PDCurses-3.4/demos/testcurs.c b/payloads/libpayload/curses/PDCurses-3.4/demos/testcurs.c index 5b330f558b..54d44f42d9 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/demos/testcurs.c +++ b/payloads/libpayload/curses/PDCurses-3.4/demos/testcurs.c @@ -343,7 +343,7 @@ void inputTest(WINDOW *win) sw = w / 3; sh = h / 3; - if ((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) + if ((subWin = subwin(win, sh, sw, by + h - sh - 2, bx + w - sw - 2)) == NULL) return; @@ -424,11 +424,11 @@ void inputTest(WINDOW *win) else if (BUTTON_CHANGED(3)) button = 3; - if (button && (BUTTON_STATUS(button) & + if (button && (BUTTON_STATUS(button) & BUTTON_MODIFIER_MASK)) { waddstr(win, " Modifier(s):"); - + if (BUTTON_STATUS(button) & BUTTON_SHIFT) waddstr(win, " SHIFT"); @@ -611,7 +611,7 @@ void outputTest(WINDOW *win) wmove(win1, 8, 26); wrefresh(win1); wgetch(win1); - + wclear(win1); wattron(win1, A_BLINK); @@ -892,7 +892,7 @@ void acsTest(WINDOW *win) "ACS_LARROW", "ACS_RARROW", "ACS_UARROW", "ACS_DARROW", "ACS_BOARD", "ACS_LANTERN", "ACS_BLOCK" #ifdef ACS_S3 - , "ACS_S3", "ACS_S7", "ACS_LEQUAL", "ACS_GEQUAL", + , "ACS_S3", "ACS_S7", "ACS_LEQUAL", "ACS_GEQUAL", "ACS_PI", "ACS_NEQUAL", "ACS_STERLING" #endif }; @@ -902,17 +902,17 @@ void acsTest(WINDOW *win) #if HAVE_WIDE cchar_t *wacs_values[] = { - WACS_ULCORNER, WACS_URCORNER, WACS_LLCORNER, WACS_LRCORNER, - WACS_LTEE, WACS_RTEE, WACS_TTEE, WACS_BTEE, WACS_HLINE, + WACS_ULCORNER, WACS_URCORNER, WACS_LLCORNER, WACS_LRCORNER, + WACS_LTEE, WACS_RTEE, WACS_TTEE, WACS_BTEE, WACS_HLINE, WACS_VLINE, WACS_PLUS, - WACS_S1, WACS_S9, WACS_DIAMOND, WACS_CKBOARD, WACS_DEGREE, + WACS_S1, WACS_S9, WACS_DIAMOND, WACS_CKBOARD, WACS_DEGREE, WACS_PLMINUS, WACS_BULLET, - WACS_LARROW, WACS_RARROW, WACS_UARROW, WACS_DARROW, WACS_BOARD, + WACS_LARROW, WACS_RARROW, WACS_UARROW, WACS_DARROW, WACS_BOARD, WACS_LANTERN, WACS_BLOCK # ifdef WACS_S3 - , WACS_S3, WACS_S7, WACS_LEQUAL, WACS_GEQUAL, WACS_PI, + , WACS_S3, WACS_S7, WACS_LEQUAL, WACS_GEQUAL, WACS_PI, WACS_NEQUAL, WACS_STERLING # endif }; @@ -923,7 +923,7 @@ void acsTest(WINDOW *win) static const wchar_t greek[] = {0x0395, 0x03bb, 0x03bb, 0x03b7, 0x03bd, 0x03b9, 0x03ba, 0x03ac, 0}; - static const wchar_t georgian[] = {0x10e5, 0x10d0, 0x10e0, 0x10d7, + static const wchar_t georgian[] = {0x10e5, 0x10d0, 0x10e0, 0x10d7, 0x10e3, 0x10da, 0x10d8, L' ', 0x10d4, 0x10dc, 0x10d0, 0}; #endif @@ -993,13 +993,13 @@ void colorTest(WINDOW *win) { static const short colors[] = { - COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, + COLOR_BLACK, COLOR_RED, COLOR_GREEN, COLOR_BLUE, COLOR_CYAN, COLOR_MAGENTA, COLOR_YELLOW, COLOR_WHITE }; static const char *colornames[] = { - "COLOR_BLACK", "COLOR_RED", "COLOR_GREEN", "COLOR_BLUE", + "COLOR_BLACK", "COLOR_RED", "COLOR_GREEN", "COLOR_BLUE", "COLOR_CYAN", "COLOR_MAGENTA", "COLOR_YELLOW", "COLOR_WHITE" }; diff --git a/payloads/libpayload/curses/PDCurses-3.4/demos/tui.c b/payloads/libpayload/curses/PDCurses-3.4/demos/tui.c index e57a1b0968..62e0d53767 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/demos/tui.c +++ b/payloads/libpayload/curses/PDCurses-3.4/demos/tui.c @@ -65,7 +65,7 @@ static bool incurses = FALSE; #ifndef PDCURSES static char wordchar(void) { - return 0x17; /* ^W */ + return 0x17; /* ^W */ } #endif @@ -110,13 +110,13 @@ static void initcolor(void) /* foreground, background */ - init_pair(TITLECOLOR & ~A_ATTR, COLOR_BLACK, COLOR_CYAN); - init_pair(MAINMENUCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN); + init_pair(TITLECOLOR & ~A_ATTR, COLOR_BLACK, COLOR_CYAN); + init_pair(MAINMENUCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN); init_pair(MAINMENUREVCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLACK); - init_pair(SUBMENUCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN); - init_pair(SUBMENUREVCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLACK); - init_pair(BODYCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLUE); - init_pair(STATUSCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN); + init_pair(SUBMENUCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN); + init_pair(SUBMENUREVCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLACK); + init_pair(BODYCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLUE); + init_pair(STATUSCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_CYAN); init_pair(INPUTBOXCOLOR & ~A_ATTR, COLOR_BLACK, COLOR_CYAN); init_pair(EDITBOXCOLOR & ~A_ATTR, COLOR_WHITE, COLOR_BLACK); #endif @@ -152,7 +152,7 @@ static void colorbox(WINDOW *win, chtype color, int hasbox) #endif wbkgd(win, attr); - werase(win); + werase(win); #ifdef PDCURSES maxy = getmaxy(win); @@ -181,7 +181,7 @@ static void idle(void) tp->tm_hour, tp->tm_min, tp->tm_sec); mvwaddstr(wtitl, 0, bw - strlen(buf) - 2, buf); - wrefresh(wtitl); + wrefresh(wtitl); } static void menudim(menu *mp, int *lines, int *columns) @@ -264,7 +264,7 @@ static void mainmenu(menu *mp) { if (old != -1) { - mvwaddstr(wmain, 0, old * barlen, + mvwaddstr(wmain, 0, old * barlen, prepad(padstr(mp[old].name, barlen - 1), 1)); statusmsg(mp[cur].desc); @@ -274,7 +274,7 @@ static void mainmenu(menu *mp) setcolor(wmain, MAINMENUREVCOLOR); - mvwaddstr(wmain, 0, cur * barlen, + mvwaddstr(wmain, 0, cur * barlen, prepad(padstr(mp[cur].name, barlen - 1), 1)); setcolor(wmain, MAINMENUCOLOR); @@ -472,7 +472,7 @@ void domenu(menu *mp) if (cur != old) { if (old != -1) - mvwaddstr(wmenu, old + 1, 1, + mvwaddstr(wmenu, old + 1, 1, prepad(padstr(mp[old].name, barlen - 1), 1)); setcolor(wmenu, SUBMENUREVCOLOR); @@ -596,7 +596,7 @@ static void repainteditbox(WINDOW *win, int x, char *buf) werase(win); mvwprintw(win, 0, 0, "%s", padstr(buf, maxx)); wmove(win, 0, x); - wrefresh(win); + wrefresh(win); } /* @@ -605,15 +605,15 @@ static void repainteditbox(WINDOW *win, int x, char *buf) Description: The initial value of 'str' with a maximum length of 'field' - 1, - which is supplied by the calling routine, is editted. The user's - erase (^H), kill (^U) and delete word (^W) chars are interpreted. + which is supplied by the calling routine, is editted. The user's + erase (^H), kill (^U) and delete word (^W) chars are interpreted. The PC insert or Tab keys toggle between insert and edit mode. Escape aborts the edit session, leaving 'str' unchanged. Enter, Up or Down Arrow are used to accept the changes to 'str'. NOTE: editstr(), mveditstr(), and mvweditstr() are macros. Return Value: - Returns the input terminating character on success (Escape, + Returns the input terminating character on success (Escape, Enter, Up or Down Arrow) and ERR on error. Errors: @@ -707,9 +707,9 @@ int weditstr(WINDOW *win, char *buf, int field) { tp = bp; - while ((bp > buf) && (*(bp - 1) == ' ')) + while ((bp > buf) && (*(bp - 1) == ' ')) bp--; - while ((bp > buf) && (*(bp - 1) != ' ')) + while ((bp > buf) && (*(bp - 1) != ' ')) bp--; memmove((void *)bp, (const void *)tp, strlen(tp) + 1); @@ -739,7 +739,7 @@ int weditstr(WINDOW *win, char *buf, int field) if (!*bp) bp[1] = '\0'; - + *bp++ = c; } } @@ -784,7 +784,7 @@ int getstrings(char *desc[], char *buf[], int field) getyx(wbody, oldy, oldx); getmaxyx(wbody, maxy, maxx); - winput = mvwinputbox(wbody, (maxy - nlines) / 2, (maxx - ncols) / 2, + winput = mvwinputbox(wbody, (maxy - nlines) / 2, (maxx - ncols) / 2, nlines, ncols); for (i = 0; i < n; i++) diff --git a/payloads/libpayload/curses/PDCurses-3.4/demos/tui.h b/payloads/libpayload/curses/PDCurses-3.4/demos/tui.h index b99ca6b222..7be91237cb 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/demos/tui.h +++ b/payloads/libpayload/curses/PDCurses-3.4/demos/tui.h @@ -23,7 +23,7 @@ typedef void (*FUNC)(void); -typedef struct +typedef struct { char *name; /* item label */ FUNC func; /* (pointer to) function */ diff --git a/payloads/libpayload/curses/PDCurses-3.4/demos/tuidemo.c b/payloads/libpayload/curses/PDCurses-3.4/demos/tuidemo.c index a22d2a4181..6f4d9f21df 100644 --- a/payloads/libpayload/curses/PDCurses-3.4/demos/tuidemo.c +++ b/payloads/libpayload/curses/PDCurses-3.4/demos/tuidemo.c @@ -31,7 +31,7 @@ void address(void) { - char *fieldname[6] = + char *fieldname[6] = { "Name", "Street", "City", "State", "Country", (char *)0 }; |