summaryrefslogtreecommitdiff
path: root/payloads/libpayload/curses/tinycurses.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-03-05 16:55:15 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-03-07 17:15:30 +0000
commiteab2a29c8bb0fafebd398cf60425dee37df27820 (patch)
tree419dab747e0148442c1a7ac7082fcfe37784ea27 /payloads/libpayload/curses/tinycurses.c
parentb431833c129e0d6402c6f7be8e6028e4b54e94fb (diff)
downloadcoreboot-eab2a29c8bb0fafebd398cf60425dee37df27820.tar.xz
payloads: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX)
This patch is a raw application of find payloads/ -type f | \ xargs sed -i -e 's/IS_ENABLED\s*(CONFIG_/CONFIG(/g' Change-Id: I883b03b189f59b5d998a09a2596b0391a2d5cf33 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31775 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/libpayload/curses/tinycurses.c')
-rw-r--r--payloads/libpayload/curses/tinycurses.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/payloads/libpayload/curses/tinycurses.c b/payloads/libpayload/curses/tinycurses.c
index 789accb475..c50f10bbcc 100644
--- a/payloads/libpayload/curses/tinycurses.c
+++ b/payloads/libpayload/curses/tinycurses.c
@@ -111,8 +111,8 @@ chtype fallback_acs_map[128] =
'|', '<', '>', '*', '!', 'f', 'o', ' ',
};
-#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
-#if IS_ENABLED(CONFIG_LP_SERIAL_ACS_FALLBACK)
+#if CONFIG(LP_SERIAL_CONSOLE)
+#if CONFIG(LP_SERIAL_ACS_FALLBACK)
chtype serial_acs_map[128];
#else
/* See acsc of vt100. */
@@ -138,7 +138,7 @@ chtype serial_acs_map[128] =
#endif
#endif
-#if IS_ENABLED(CONFIG_LP_VIDEO_CONSOLE)
+#if CONFIG(LP_VIDEO_CONSOLE)
/* See acsc of linux. */
chtype console_acs_map[128] =
{
@@ -191,7 +191,7 @@ NCURSES_CH_T _nc_render(WINDOW *win, NCURSES_CH_T ch)
int beep(void)
{
/* TODO: Flash the screen if beeping fails? */
-#if IS_ENABLED(CONFIG_LP_SPEAKER)
+#if CONFIG(LP_SPEAKER)
speaker_tone(1760, 500); /* 1760 == note A6 */
#endif
return OK;
@@ -202,12 +202,12 @@ int cbreak(void) { /* TODO */ return 0; }
// int color_content(short color, short *r, short *g, short *b) {}
int curs_set(int on)
{
-#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
+#if CONFIG(LP_SERIAL_CONSOLE)
if (curses_flags & F_ENABLE_SERIAL) {
serial_cursor_enable(on);
}
#endif
-#if IS_ENABLED(CONFIG_LP_VIDEO_CONSOLE)
+#if CONFIG(LP_VIDEO_CONSOLE)
if (curses_flags & F_ENABLE_CONSOLE) {
video_console_cursor_enable(on);
}
@@ -315,12 +315,12 @@ WINDOW *initscr(void)
for (i = 0; i < 128; i++)
acs_map[i] = (chtype) i | A_ALTCHARSET;
-#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
+#if CONFIG(LP_SERIAL_CONSOLE)
if (curses_flags & F_ENABLE_SERIAL) {
serial_clear();
}
#endif
-#if IS_ENABLED(CONFIG_LP_VIDEO_CONSOLE)
+#if CONFIG(LP_VIDEO_CONSOLE)
if (curses_flags & F_ENABLE_CONSOLE) {
/* Clear the screen and kill the cursor */
@@ -724,7 +724,7 @@ int whline(WINDOW *win, chtype ch, int n)
(((c) & 0x4400) >> 2) | ((c) & 0xAA00) | (((c) & 0x1100) << 2)
int wnoutrefresh(WINDOW *win)
{
-#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
+#if CONFIG(LP_SERIAL_CONSOLE)
// FIXME.
int serial_is_bold = 0;
int serial_is_reverse = 0;
@@ -737,7 +737,7 @@ int wnoutrefresh(WINDOW *win)
int x, y;
chtype ch;
-#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
+#if CONFIG(LP_SERIAL_CONSOLE)
serial_end_bold();
serial_end_altcharset();
#endif
@@ -749,7 +749,7 @@ int wnoutrefresh(WINDOW *win)
/* Position the serial cursor */
-#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
+#if CONFIG(LP_SERIAL_CONSOLE)
if (curses_flags & F_ENABLE_SERIAL)
serial_set_cursor(win->_begy + y, win->_begx +
win->_line[y].firstchar);
@@ -758,7 +758,7 @@ int wnoutrefresh(WINDOW *win)
for (x = win->_line[y].firstchar; x <= win->_line[y].lastchar; x++) {
attr_t attr = win->_line[y].text[x].attr;
-#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
+#if CONFIG(LP_SERIAL_CONSOLE)
if (curses_flags & F_ENABLE_SERIAL) {
ch = win->_line[y].text[x].chars[0];
@@ -824,7 +824,7 @@ int wnoutrefresh(WINDOW *win)
}
#endif
-#if IS_ENABLED(CONFIG_LP_VIDEO_CONSOLE)
+#if CONFIG(LP_VIDEO_CONSOLE)
unsigned int c =
((int)color_pairs[PAIR_NUMBER(attr)]) << 8;
@@ -865,12 +865,12 @@ int wnoutrefresh(WINDOW *win)
win->_line[y].lastchar = _NOCHANGE;
}
-#if IS_ENABLED(CONFIG_LP_SERIAL_CONSOLE)
+#if CONFIG(LP_SERIAL_CONSOLE)
if (curses_flags & F_ENABLE_SERIAL)
serial_set_cursor(win->_begy + win->_cury, win->_begx + win->_curx);
#endif
-#if IS_ENABLED(CONFIG_LP_VIDEO_CONSOLE)
+#if CONFIG(LP_VIDEO_CONSOLE)
if (curses_flags & F_ENABLE_CONSOLE)
video_console_set_cursor(win->_begx + win->_curx, win->_begy + win->_cury);
#endif