chiark
/
gitweb
/
~ianmdlvl
/
sympathy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b953222
)
*** empty log message ***
author
james
<james>
Thu, 7 Feb 2008 12:41:06 +0000
(12:41 +0000)
committer
james
<james>
Thu, 7 Feb 2008 12:41:06 +0000
(12:41 +0000)
src/crt.c
patch
|
blob
|
history
src/crt.h
patch
|
blob
|
history
src/prototypes.h
patch
|
blob
|
history
diff --git
a/src/crt.c
b/src/crt.c
index e2f49c3e887c89d4a6af2aa2c276c46cd89fad4d..b3d13f5a885a43fef598d289a662fd2187ece7c4 100644
(file)
--- a/
src/crt.c
+++ b/
src/crt.c
@@
-10,6
+10,9
@@
static char rcsid[] = "$Id$";
/*
* $Log$
/*
* $Log$
+ * Revision 1.7 2008/02/07 12:41:06 james
+ * *** empty log message ***
+ *
* Revision 1.6 2008/02/07 12:16:04 james
* *** empty log message ***
*
* Revision 1.6 2008/02/07 12:16:04 james
* *** empty log message ***
*
@@
-58,7
+61,7
@@
crt_cls (CRT * c)
int i;
crt_erase (c, s, e, 1);
int i;
crt_erase (c, s, e, 1);
-
+ c->sh.dir=0;
}
void
}
void
@@
-67,6
+70,10
@@
crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e, int ea)
int l, n;
int p;
int l, n;
int p;
+ c->sh.s=s;
+ c->sh.e=e;
+ c->sh.dir=-1;
+
s.x = 0;
e.x = CRT_COLS - 1;
s.x = 0;
e.x = CRT_COLS - 1;
@@
-76,6
+83,7
@@
crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e, int ea)
n = e.y - s.y;
n = e.y - s.y;
+
p = CRT_ADDR_POS (&s);
while (n--)
p = CRT_ADDR_POS (&s);
while (n--)
@@
-95,6
+103,11
@@
crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e, int ea)
int l, n;
int p;
int l, n;
int p;
+ c->sh.s=s;
+ c->sh.e=e;
+ c->sh.dir=1;
+
+
s.x = 0;
e.x = CRT_COLS - 1;
s.x = 0;
e.x = CRT_COLS - 1;
@@
-126,6
+139,7
@@
crt_reset (CRT * c)
c->pos.x = 0;
c->pos.y = 0;
c->hide_cursor = 1;
c->pos.x = 0;
c->pos.y = 0;
c->hide_cursor = 1;
+ c->sh.dir=0;
}
void
}
void
@@
-142,6
+156,5
@@
crt_insert (CRT * c, CRT_CA ca)
c->screen[CRT_ADDR (c->pos.y, c->pos.x)] = ca;
c->screen[CRT_ADDR (c->pos.y, c->pos.x)] = ca;
-
-
+ c->sh.dir=0;
}
}
diff --git
a/src/crt.h
b/src/crt.h
index f92c99ad6d249020ad5c377f9824d3c6361a90fa..e73e891eb18e681f06557d832504a42cb5d11e51 100644
(file)
--- a/
src/crt.h
+++ b/
src/crt.h
@@
-12,6
+12,9
@@
/*
* $Log$
/*
* $Log$
+ * Revision 1.5 2008/02/07 12:41:06 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/02/07 12:16:04 james
* *** empty log message ***
*
* Revision 1.4 2008/02/07 12:16:04 james
* *** empty log message ***
*
@@
-83,10
+86,17
@@
typedef struct
} CRT_Pos;
} CRT_Pos;
+typedef struct {
+ CRT_Pos s;
+ CRT_Pos e;
+ int dir;
+} CRT_ScrollHint;
+
typedef struct
{
CRT_CA screen[CRT_CELS];
CRT_Pos pos;
typedef struct
{
CRT_CA screen[CRT_CELS];
CRT_Pos pos;
+ CRT_ScrollHint sh;
int hide_cursor;
} CRT;
int hide_cursor;
} CRT;
diff --git
a/src/prototypes.h
b/src/prototypes.h
index f69feb8d356496aa83aa19e808a14823ed8ade26..085006b4d65d29653c434d82652a7edf6af9a819 100644
(file)
--- a/
src/prototypes.h
+++ b/
src/prototypes.h
@@
-5,6
+5,7
@@
void ansi_getsize(ANSI *a);
void ansi_move(ANSI *a, CRT_Pos p);
void ansi_showhide_cursor(ANSI *a, int hide);
void ansi_force_attr_normal(ANSI *a);
void ansi_move(ANSI *a, CRT_Pos p);
void ansi_showhide_cursor(ANSI *a, int hide);
void ansi_force_attr_normal(ANSI *a);
+void ansi_set_color(ANSI *a, int color);
void ansi_set_attr(ANSI *a, int attr);
void ansi_render(ANSI *a, CRT_CA ca);
void ansi_cls(ANSI *a);
void ansi_set_attr(ANSI *a, int attr);
void ansi_render(ANSI *a, CRT_CA ca);
void ansi_cls(ANSI *a);