/* 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);
extern void tty_set_baud(TTY *t, int rate);
extern void tty_send_break(TTY *t);
extern void tty_set_flow(TTY *t, int flow);
+extern void tty_hangup(TTY *t);
/* keydis.c */
extern KeyDis *keydis_vt102_new(void);
extern KeyDis *keydis_ipc_new(Socket *s);
extern int ipc_msg_send_setbaud(Socket *s, int baud);
extern int ipc_msg_send_sendbreak(Socket *s);
extern int ipc_msg_send_setflow(Socket *s, int flow);
+extern int ipc_msg_send_hangup(Socket *s);
/* slide.c */
extern void slide_free(Slide *s);
extern void slide_consume(Slide *s, int n);
extern Slide *slide_new(int n);
extern void slide_expand(Slide *s, int n);
/* symsocket.c */
+extern int wrap_recv(int fd, void *buf, int len);
+extern int wrap_send(int fd, void *buf, int len);
extern void socket_free(Socket *s);
+extern void socket_free_parent(Socket *s);
extern Socket *socket_listen(char *path);
extern Socket *socket_accept(Socket *l);
extern Socket *socket_connect(char *path);
extern int serial_lock_check(Serial_lock *l);
extern void serial_lock_free(Serial_lock *l);
extern Serial_lock *serial_lock_new(char *dev, int mode);
-extern int main(int argc, char *argv[]);