aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <>2008-02-20 19:36:06 +0000
committerjames <>2008-02-20 19:36:06 +0000
commite57ab4267033b826cee338a1fb24dc3dd1480782 (patch)
tree1dda22c138055cee13677d238256ac64fc125375
parent63d6fb020597455d999352e90911425d3991bf47 (diff)
downloadsympathy-e57ab4267033b826cee338a1fb24dc3dd1480782.tar.gz
sympathy-e57ab4267033b826cee338a1fb24dc3dd1480782.tar.bz2
sympathy-e57ab4267033b826cee338a1fb24dc3dd1480782.zip
@@
-rw-r--r--src/ansi.c8
-rw-r--r--src/ansi.h7
-rw-r--r--src/prototypes.h22
3 files changed, 15 insertions, 22 deletions
diff --git a/src/ansi.c b/src/ansi.c
index 0fa9a96..0194228 100644
--- a/src/ansi.c
+++ b/src/ansi.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.24 2008/02/20 19:36:06 james
+ * @@
+ *
* Revision 1.23 2008/02/20 19:25:09 james
* *** empty log message ***
*
@@ -852,6 +855,11 @@ ansi_update (ANSI * a, Context * c)
static void ansi_free(ANSI *a)
{
+ a->terminal_reset(a);
+ if (a->terminal)
+ a->terminal->close(a->terminal);
+
+ free(a);
}
diff --git a/src/ansi.h b/src/ansi.h
index 44fd61a..2808987 100644
--- a/src/ansi.h
+++ b/src/ansi.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.9 2008/02/20 19:36:06 james
+ * @@
+ *
* Revision 1.8 2008/02/20 19:25:09 james
* *** empty log message ***
*
@@ -74,9 +77,11 @@ typedef struct ANSI_struct
int history_ptr;
void (*dispatch)(struct ANSI_struct *,struct Context_struct *);
- void (*update)(struct ANSI_struct *,struct CRT_struct *);
+ void (*update)(struct ANSI_struct *,struct Context_struct *);
+ void (*oneshot)(struct ANSI_struct *,struct CRT_struct *);
void (*reset)(struct ANSI_struct *,struct CRT_struct *);
void (*terminal_reset)(struct ANSI_struct *);
+ void (*close)(struct ANSI_struct *);
} ANSI;
diff --git a/src/prototypes.h b/src/prototypes.h
index cdb3111..6dc0ca6 100644
--- a/src/prototypes.h
+++ b/src/prototypes.h
@@ -1,26 +1,6 @@
/* ansi.c */
-extern void ansi_move(ANSI *a, CRT_Pos p);
-extern void ansi_showhide_cursor(ANSI *a, int hide);
-extern void ansi_force_attr_normal(ANSI *a);
-extern void ansi_set_color(ANSI *a, int color);
-extern void ansi_set_attr(ANSI *a, int attr);
-extern void ansi_render(ANSI *a, CRT_CA ca);
-extern void ansi_cls(ANSI *a);
-extern void ansi_draw_line(ANSI *a, CRT_CA *cap, int y);
-extern void ansi_resize_check(ANSI *a);
-extern void ansi_history(ANSI *a, History *h);
-extern void ansi_draw(ANSI *a, CRT *c);
-extern void ansi_reset(ANSI *a, CRT *c);
-extern void ansi_terminal_reset(ANSI *a);
-extern void ansi_flush_escape(ANSI *a, Context *c);
-extern void ansi_parse_deckey(ANSI *a, Context *c);
-extern void ansi_parse_ansikey(ANSI *a, Context *c);
-extern void ansi_parse_escape(ANSI *a, Context *c);
-extern void ansi_check_escape(ANSI *a, Context *c);
-extern void ansi_parse_char(ANSI *a, Context *c, int ch);
-extern void ansi_parse(ANSI *a, Context *c, char *buf, int len);
extern int ansi_dispatch(ANSI *a, Context *c);
-extern void ansi_update(ANSI *a, Context *c);
+extern ANSI *ansi_new_from_terminal(ANSI *a, TTY *t);
/* crt.c */
extern void crt_erase(CRT *c, CRT_Pos s, CRT_Pos e, int ea);
extern void crt_cls(CRT *c);