aboutsummaryrefslogtreecommitdiffstats
path: root/src/crt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crt.c')
-rw-r--r--src/crt.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/src/crt.c b/src/crt.c
index 2a5feaf..24e92e7 100644
--- a/src/crt.c
+++ b/src/crt.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.19 2012/06/22 10:22:24 james
+ * *** empty log message ***
+ *
* Revision 1.18 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -74,14 +77,16 @@ crt_erase (CRT * c, CRT_Pos s, CRT_Pos e, int ea, int color)
CRT_CA *ps = &c->screen[CRT_ADDR_POS (&s)];
CRT_CA *pe = &c->screen[CRT_ADDR_POS (&e)];
- while (ps <= pe) {
- ps->chr = ' ';
- if (ea) {
- ps->attr = CRT_ATTR_NORMAL;
- ps->color = color;
+ while (ps <= pe)
+ {
+ ps->chr = ' ';
+ if (ea)
+ {
+ ps->attr = CRT_ATTR_NORMAL;
+ ps->color = color;
+ }
+ ps++;
}
- ps++;
- }
}
@@ -90,7 +95,6 @@ crt_cls (CRT * c)
{
CRT_Pos s = { 0, 0 };
CRT_Pos e = { CRT_COLS - 1, CRT_ROWS - 1 };
- int i;
crt_erase (c, s, e, 1, CRT_COLOR_NORMAL);
#if 0
@@ -123,10 +127,11 @@ crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e, int ea, int color)
p = CRT_ADDR_POS (&s);
- while (n--) {
- memcpy (&c->screen[p], &c->screen[p + CRT_COLS], l);
- p += CRT_COLS;
- }
+ while (n--)
+ {
+ memcpy (&c->screen[p], &c->screen[p + CRT_COLS], l);
+ p += CRT_COLS;
+ }
s.y = e.y;
crt_erase (c, s, e, ea, color);
@@ -157,10 +162,11 @@ crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e, int ea, int color)
p = CRT_ADDR_POS (&e);
- while (n--) {
- p -= CRT_COLS;
- memcpy (&c->screen[p], &c->screen[p - CRT_COLS], l);
- }
+ while (n--)
+ {
+ p -= CRT_COLS;
+ memcpy (&c->screen[p], &c->screen[p - CRT_COLS], l);
+ }
e.y = s.y;
crt_erase (c, s, e, ea, color);