aboutsummaryrefslogtreecommitdiffstats
path: root/Library/UefiShellUfmCommandLib/tbi/win.c
diff options
context:
space:
mode:
Diffstat (limited to 'Library/UefiShellUfmCommandLib/tbi/win.c')
-rw-r--r--Library/UefiShellUfmCommandLib/tbi/win.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/Library/UefiShellUfmCommandLib/tbi/win.c b/Library/UefiShellUfmCommandLib/tbi/win.c
index 5b3dd81..bada79e 100644
--- a/Library/UefiShellUfmCommandLib/tbi/win.c
+++ b/Library/UefiShellUfmCommandLib/tbi/win.c
@@ -176,36 +176,42 @@ BOOLEAN wborder(struct window *w, CHAR16 ls, CHAR16 rs, CHAR16 ts,
return TRUE;
}
-BOOLEAN mvwhline(struct window *w, INT32 x, INT32 y, CHAR16 ch, INT32 n)
+BOOLEAN wvline(struct window *w, INT32 x, INT32 y, CHAR16 ch, INT32 attr, UINTN n)
{
UINTN i, length;
ASSERT(w != NULL);
CHECK_POSITION(w, x, y);
- length = w->width - x;
- if(length > n)
+ length = w->height - y;
+ if(n != 0 && length > n)
length = n;
- length += x;
- for(i = x; i < length; i++) {
- SET_WINDOW_CHAR2(w, i, y, ch);
+ length += y;
+ for(i = y; i < length; i++) {
+ if(ch != 0)
+ w->text[i][x] = ch;
+ if(attr != -1)
+ w->attr[i][x] = attr;
}
return TRUE;
}
-BOOLEAN mvwvline(struct window *w, INT32 x, INT32 y, CHAR16 ch, INT32 n)
+BOOLEAN whline(struct window *w, INT32 x, INT32 y, CHAR16 ch, INT32 attr, UINTN n)
{
UINTN i, length;
ASSERT(w != NULL);
CHECK_POSITION(w, x, y);
- length = w->height - y;
- if(length > n)
+ length = w->width - x;
+ if(n != 0 && length > n)
length = n;
- length += y;
- for(i = y; i < length; i++) {
- SET_WINDOW_CHAR2(w, x, i, ch);
+ length += x;
+ for(i = x; i < length; i++) {
+ if(ch != 0)
+ w->text[y][i] = ch;
+ if(attr != -1)
+ w->attr[y][i] = attr;
}
return TRUE;
}