X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=sympathy.git;a=blobdiff_plain;f=src%2Fvt102.h;h=57736f6f37b6f10a444093bc3af2c312c0d96b1f;hp=e8caf5ed291ca57f3296ad4f2dd12d9b67aa1e0d;hb=32762931a77913e0363cc909df40f7e91c1d8406;hpb=8b6118c4edcdd61ca2312ae5ced001a98607a693 diff --git a/src/vt102.h b/src/vt102.h index e8caf5e..57736f6 100644 --- a/src/vt102.h +++ b/src/vt102.h @@ -1,17 +1,62 @@ -/* +/* * vt102.h: * - * Copyright (c) 2008 James McKenzie , + * Copyright (c) 2008 James McKenzie , * All rights reserved. * */ -/* - * $Id$ +/* + * $Id: vt102.h,v 1.25 2008/03/10 11:49:33 james Exp $ */ -/* - * $Log$ +/* + * $Log: vt102.h,v $ + * Revision 1.25 2008/03/10 11:49:33 james + * *** empty log message *** + * + * Revision 1.24 2008/03/07 12:37:04 james + * *** empty log message *** + * + * Revision 1.23 2008/03/03 06:04:42 james + * *** empty log message *** + * + * Revision 1.22 2008/03/02 10:37:56 james + * *** empty log message *** + * + * Revision 1.21 2008/02/28 16:57:52 james + * *** empty log message *** + * + * Revision 1.20 2008/02/27 09:42:22 james + * *** empty log message *** + * + * Revision 1.19 2008/02/26 23:23:17 james + * *** empty log message *** + * + * Revision 1.18 2008/02/26 19:08:27 james + * *** empty log message *** + * + * Revision 1.17 2008/02/26 16:53:24 james + * *** empty log message *** + * + * Revision 1.16 2008/02/24 12:22:42 james + * *** empty log message *** + * + * Revision 1.15 2008/02/24 00:42:53 james + * *** empty log message *** + * + * Revision 1.14 2008/02/23 11:48:37 james + * *** empty log message *** + * + * Revision 1.13 2008/02/22 17:07:00 james + * *** empty log message *** + * + * Revision 1.12 2008/02/22 14:51:54 james + * *** empty log message *** + * + * Revision 1.11 2008/02/08 15:06:42 james + * *** empty log message *** + * * Revision 1.10 2008/02/07 12:16:04 james * *** empty log message *** * @@ -47,25 +92,29 @@ #ifndef __VT102_H__ #define __VT102_H__ -#define VT102_CSI_LEN 128 +#define VT102_CMD_LEN 128 -#define VT102_ROWS 24 -#define VT102_COLS 80 +#define VT102_MAX_ROWS ((CRT_ROWS) - 1) +#define VT102_ROWS_24 24 +#define VT102_COLS_132 132 +#define VT102_COLS_80 80 +#define VT102_MAX_COLS VT102_COLS_132 #define VT102_STATUS_ROW 24 #define VT102_NMODES 32 -typedef struct -{ + +typedef struct { int in_escape; - int in_csi; - int csi_ptr; - char csi_buf[VT102_CSI_LEN]; - int in_scs; + int in_cmd; + + int cmd_ptr; + int cmd_more_bytes; + int cmd_termination; + char cmd_buf[VT102_CMD_LEN]; } VT102_parser; -typedef struct -{ +typedef struct { CRT_Pos pos; int attr; int color; @@ -73,8 +122,7 @@ typedef struct } VT102_State; -typedef struct -{ +typedef struct { CRT_Pos top_margin, bottom_margin; CRT_Pos screen_start, screen_end; VT102_parser parser; @@ -90,11 +138,18 @@ typedef struct uint8_t modes[VT102_NMODES]; uint8_t private_modes[VT102_NMODES]; - uint8_t tabs[VT102_COLS]; + uint8_t tabs[VT102_COLS_132]; int application_keypad_mode; - TTY *tty; + int last_reg_char; + int xn_glitch; + + CRT_Pos current_size; + CRT_Pos original_size; + + int g[2]; + int cs; } VT102;