chiark / gitweb /
*** empty log message ***
[sympathy.git] / src / crt.h
index e73e891eb18e681f06557d832504a42cb5d11e51..5883c04e7522fb6143a14d00cdf1a479816eaadf 100644 (file)
--- a/src/crt.h
+++ b/src/crt.h
 
 /*
  * $Log$
+ * Revision 1.12  2008/02/26 23:23:17  james
+ * *** empty log message ***
+ *
+ * Revision 1.11  2008/02/26 19:08:27  james
+ * *** empty log message ***
+ *
+ * Revision 1.10  2008/02/24 00:42:53  james
+ * *** empty log message ***
+ *
+ * Revision 1.9  2008/02/20 19:25:09  james
+ * *** empty log message ***
+ *
+ * Revision 1.8  2008/02/13 09:12:21  james
+ * *** empty log message ***
+ *
+ * Revision 1.7  2008/02/13 01:08:18  james
+ * *** empty log message ***
+ *
+ * Revision 1.6  2008/02/07 13:22:51  james
+ * *** empty log message ***
+ *
  * Revision 1.5  2008/02/07 12:41:06  james
  * *** empty log message ***
  *
@@ -33,7 +54,7 @@
 #define __CRT_H__
 
 #define CRT_ROWS 25
-#define CRT_COLS 80
+#define CRT_COLS 132
 
 #define CRT_CELS (CRT_ROWS*CRT_COLS)
 #define CRT_ADDR(r,c) (((r)*CRT_COLS)+(c))
@@ -46,7 +67,7 @@
 #define CRT_ATTR_BOLD     0x8
 
 
-#define CRT_COLOR_BLACK                0x0     
+#define CRT_COLOR_BLACK                0x0
 #define CRT_COLOR_RED          0x1
 #define CRT_COLOR_GREEN                0x2
 #define CRT_COLOR_YELLOW       0x3
@@ -72,9 +93,9 @@
 
 #define CRT_COLOR_NORMAL       CRT_MAKE_COLOR(CRT_FGCOLOR_NORMAL,CRT_BGCOLOR_NORMAL)
 
-typedef struct
+typedef struct __attribute__ ((packed))
 {
-  uint8_t chr;
+  uint32_t chr;
   uint8_t attr;
   uint8_t color;
 } CRT_CA;
@@ -86,18 +107,19 @@ typedef struct
 } CRT_Pos;
 
 
-typedef struct {
+typedef struct
+{
   CRT_Pos s;
   CRT_Pos e;
   int dir;
 } CRT_ScrollHint;
 
-typedef struct
+typedef struct CRT_struct
 {
   CRT_CA screen[CRT_CELS];
   CRT_Pos pos;
-  CRT_ScrollHint sh;
   int hide_cursor;
+  int width;
 } CRT;
 
 
@@ -107,4 +129,10 @@ crt_ca_cmp (CRT_CA a, CRT_CA b)
   return memcmp (&a, &b, sizeof (a));
 }
 
+static inline
+crt_pos_cmp (CRT_Pos a, CRT_Pos b)
+{
+  return memcmp (&a, &b, sizeof (a));
+}
+
 #endif /* __CRT_H__ */