X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fansi.h;h=2b365be40bbd660abd4973c9e22c9d689d0a701f;hb=a17e36f776907ddb4f582912243f5359d6e43107;hp=e88f076c27c8967d3d6bfee82060fe5c9c94e161;hpb=8b6118c4edcdd61ca2312ae5ced001a98607a693;p=sympathy.git diff --git a/src/ansi.h b/src/ansi.h index e88f076..2b365be 100644 --- a/src/ansi.h +++ b/src/ansi.h @@ -1,17 +1,62 @@ -/* +/* * ansi.h: * - * Copyright (c) 2008 James McKenzie , + * Copyright (c) 2008 James McKenzie , * All rights reserved. * */ -/* - * $Id$ +/* + * $Id: ansi.h,v 1.20 2008/03/10 11:49:32 james Exp $ */ -/* - * $Log$ +/* + * $Log: ansi.h,v $ + * Revision 1.20 2008/03/10 11:49:32 james + * *** empty log message *** + * + * Revision 1.19 2008/03/07 12:37:04 james + * *** empty log message *** + * + * Revision 1.18 2008/03/06 21:34:09 james + * *** empty log message *** + * + * Revision 1.17 2008/03/06 21:33:02 james + * *** empty log message *** + * + * Revision 1.16 2008/03/06 16:49:05 james + * *** empty log message *** + * + * Revision 1.15 2008/03/03 06:04:42 james + * *** empty log message *** + * + * Revision 1.14 2008/03/02 10:37:56 james + * *** empty log message *** + * + * Revision 1.13 2008/02/24 00:42:53 james + * *** empty log message *** + * + * Revision 1.12 2008/02/23 11:48:37 james + * *** empty log message *** + * + * Revision 1.11 2008/02/20 20:16:07 james + * *** empty log message *** + * + * Revision 1.10 2008/02/20 19:44:37 james + * @@ + * + * Revision 1.9 2008/02/20 19:36:06 james + * @@ + * + * Revision 1.8 2008/02/20 19:25:09 james + * *** empty log message *** + * + * Revision 1.7 2008/02/13 16:57:29 james + * *** empty log message *** + * + * Revision 1.6 2008/02/13 01:08:18 james + * *** empty log message *** + * * Revision 1.5 2008/02/07 12:16:04 james * *** empty log message *** * @@ -35,19 +80,24 @@ #define ANSI_INVAL -1 #define ANSI_ESCAPE_BUF_LEN 10 -#define ANSI_ESCAPE_TIMEOUT 100000 /*in ms */ +#define ANSI_ESCAPE_TIMEOUT 100000 /* in ms */ -typedef struct -{ +typedef struct { int in_escape; struct timeval last_escape; char escape_buf[ANSI_ESCAPE_BUF_LEN]; int escape_ptr; } ANSI_Parser; -typedef struct -{ - int fd; +struct CRT_struct; +struct Context_struct; + +typedef struct ANSI_struct { + ANSI_Parser parser; + + TTY *terminal; + int eof; + CRT crt; CRT_Pos pos; @@ -56,7 +106,18 @@ typedef struct int attr; int color; - ANSI_Parser parser; + int utf8; + + int history_ptr; + FILE *file; + + int (*dispatch) (struct ANSI_struct *, struct Context_struct *); + int (*update) (struct ANSI_struct *, struct Context_struct *); + int (*one_shot) (struct ANSI_struct *, struct CRT_struct *); + int (*reset) (struct ANSI_struct *, struct CRT_struct *); + int (*set_title) (struct ANSI_struct *, char *); + void (*terminal_reset) (struct ANSI_struct *); + void (*close) (struct ANSI_struct *); } ANSI;