chiark / gitweb /
*** empty log message ***
[sympathy.git] / src / history.h
index 6c1bdbad0ea9b1316a3ebc7774de59cc3d0f7f9c..5c5dd52cd0bb8530581fceff5d0654236ca2dbef 100644 (file)
 
 /*
  * $Log$
+ * Revision 1.3  2008/02/13 16:57:29  james
+ * *** empty log message ***
+ *
+ * Revision 1.2  2008/02/12 22:36:46  james
+ * *** empty log message ***
+ *
  * Revision 1.1  2008/02/08 15:06:42  james
  * *** empty log message ***
  *
 #ifndef __HISTORY_H__
 #define __HISTORY_H__
 
-typedef struct {
-int valid;
-time_t t;
-CRT_CA line[CRT_COLS];
+typedef struct
+{
+  int valid;
+  time_t t;
+  CRT_CA line[CRT_COLS];
 } History_ent;
 
-typedef struct {
-History_ent *lines;
-int nlines;
-int wptr;
+typedef struct
+{
+  History_ent *lines;
+  int nlines;
+  int wptr;
 } History;
 
+#define HISTORY_INC(h,a) do { (a)++; if ((a)==((h)->nlines)) { (a)=0; }; } while (0)
+
 #endif /* __HISTORY_H__ */