aboutsummaryrefslogtreecommitdiffstats
path: root/Library/UefiShellUfmCommandLib
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-11-15 19:33:04 +0300
committerJoursoir <chat@joursoir.net>2021-11-15 19:33:04 +0300
commit3e17a10f5f691159cb9fc778f0a3a463ea0b3bee (patch)
tree2f17d8166d31648d6509b852544f08662731906b /Library/UefiShellUfmCommandLib
parent23e1ba577f9116bd857b58c91682f86bdd5d50a5 (diff)
downloadufm-3e17a10f5f691159cb9fc778f0a3a463ea0b3bee.tar.gz
ufm-3e17a10f5f691159cb9fc778f0a3a463ea0b3bee.tar.bz2
ufm-3e17a10f5f691159cb9fc778f0a3a463ea0b3bee.zip
tbi/win: use SET_WINDOW_CHAR2() macro
Diffstat (limited to 'Library/UefiShellUfmCommandLib')
-rw-r--r--Library/UefiShellUfmCommandLib/tbi/win.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/Library/UefiShellUfmCommandLib/tbi/win.c b/Library/UefiShellUfmCommandLib/tbi/win.c
index 3d82e58..1496808 100644
--- a/Library/UefiShellUfmCommandLib/tbi/win.c
+++ b/Library/UefiShellUfmCommandLib/tbi/win.c
@@ -68,11 +68,9 @@ struct window *newwin(struct screen *s,
}
for(x = 0; x < ncols; x++) {
- win->text[y][x] = L' ';
- win->attr[y][x] = win->cur_attr;
+ SET_WINDOW_CHAR2(win, x, y, L' ');
}
- win->text[y][x] = CHAR_NULL;
- win->attr[y][x] = win->cur_attr;
+ SET_WINDOW_CHAR2(win, x, y, CHAR_NULL);
}
return win;
@@ -164,8 +162,7 @@ BOOLEAN mvwhline(struct window *w, INT32 x, INT32 y, CHAR16 ch, INT32 n)
length += x;
for(i = x; i < length; i++) {
- w->text[y][i] = ch;
- w->attr[y][i] = w->cur_attr;
+ SET_WINDOW_CHAR2(w, i, y, ch);
}
return TRUE;
}
@@ -182,8 +179,7 @@ BOOLEAN mvwvline(struct window *w, INT32 x, INT32 y, CHAR16 ch, INT32 n)
length += y;
for(i = y; i < length; i++) {
- w->text[i][x] = ch;
- w->attr[i][x] = w->cur_attr;
+ SET_WINDOW_CHAR2(w, x, i, ch);
}
return TRUE;
}
@@ -245,9 +241,9 @@ UINTN EFIAPI wvprintf(struct window *w, CONST CHAR16 *fmt, VA_LIST args)
else
w->curx += length;
- CopyMem(w->text[y] + x, fmt_walker, length * 2); // multiply by 2 because CHAR16
- for(i = 0; i < length; i++)
- w->attr[y][x + i] = w->cur_attr;
+ for(i = 0; i < length; i++) {
+ SET_WINDOW_CHAR2(w, (x + i), y, *(fmt_walker + i));
+ }
FreePool(fmt_walker);
return length;
}