chiark
/
gitweb
/
~ianmdlvl
/
sympathy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[sympathy.git]
/
src
/
crt.c
diff --git
a/src/crt.c
b/src/crt.c
index 36011a986ba710cd936159e404f3987b9dc101d8..b8391506796b569da77acbb52a3959b2ca9354e2 100644
(file)
--- a/
src/crt.c
+++ b/
src/crt.c
@@
-10,6
+10,12
@@
static char rcsid[] = "$Id$";
/*
* $Log$
/*
* $Log$
+ * Revision 1.5 2008/02/06 11:30:37 james
+ * *** empty log message ***
+ *
+ * Revision 1.4 2008/02/05 01:11:46 james
+ * *** empty log message ***
+ *
* Revision 1.3 2008/02/04 20:23:55 james
* *** empty log message ***
*
* Revision 1.3 2008/02/04 20:23:55 james
* *** empty log message ***
*
@@
-24,7
+30,7
@@
static char rcsid[] = "$Id$";
#include "project.h"
void
#include "project.h"
void
-crt_erase (CRT * c, CRT_Pos s, CRT_Pos e,int ea)
+crt_erase (CRT * c, CRT_Pos s, CRT_Pos e,
int ea)
{
CRT_CA *ps = &c->screen[CRT_ADDR_POS (&s)];
CRT_CA *pe = &c->screen[CRT_ADDR_POS (&e)];
{
CRT_CA *ps = &c->screen[CRT_ADDR_POS (&s)];
CRT_CA *pe = &c->screen[CRT_ADDR_POS (&e)];
@@
-33,7
+39,7
@@
crt_erase (CRT * c, CRT_Pos s, CRT_Pos e,int ea)
{
ps->chr = ' ';
if (ea)
{
ps->chr = ' ';
if (ea)
- ps->attr = CRT_ATTR_NORMAL;
+
ps->attr = CRT_ATTR_NORMAL;
ps++;
}
ps++;
}
@@
-46,7
+52,7
@@
crt_cls (CRT * c)
CRT_Pos e = { CRT_COLS - 1, CRT_ROWS - 1 };
int i;
CRT_Pos e = { CRT_COLS - 1, CRT_ROWS - 1 };
int i;
- crt_erase (c, s, e,1);
+ crt_erase (c, s, e,
1);
#if 0
for (i = 0; i < CRT_ROWS; ++i)
#if 0
for (i = 0; i < CRT_ROWS; ++i)
@@
-59,13
+65,13
@@
crt_cls (CRT * c)
}
void
}
void
-crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e,int ea)
+crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e,
int ea)
{
int l, n;
int p;
{
int l, n;
int p;
- s.x
=
0;
- e.x
=CRT_COLS-
1;
+ s.x
=
0;
+ e.x
= CRT_COLS -
1;
l = e.x - s.x;
l++;
l = e.x - s.x;
l++;
@@
-82,35
+88,36
@@
crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e,int ea)
}
s.y = e.y;
}
s.y = e.y;
- crt_erase (c, s, e,ea);
+ crt_erase (c, s, e,
ea);
}
void
}
void
-crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e,int ea)
+crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e,
int ea)
{
int l, n;
int p;
{
int l, n;
int p;
- s.x
=
0;
- e.x
=CRT_COLS-
1;
+ s.x
=
0;
+ e.x
= CRT_COLS -
1;
l = e.x - s.x;
l++;
l *= sizeof (CRT_CA);
n = e.y - s.y;
l = e.x - s.x;
l++;
l *= sizeof (CRT_CA);
n = e.y - s.y;
+ n++;
p = CRT_ADDR_POS (&e);
while (n--)
{
p = CRT_ADDR_POS (&e);
while (n--)
{
- memcpy (&c->screen[p], &c->screen[p
+
CRT_COLS], l);
+ memcpy (&c->screen[p], &c->screen[p
-
CRT_COLS], l);
p -= CRT_COLS;
}
e.y = s.y;
p -= CRT_COLS;
}
e.y = s.y;
- crt_erase (c, s, e,ea);
+ crt_erase (c, s, e,
ea);
}
}