1 /*-------------------------------------------------------*/
2 /* struct.h     ( NTHU CS MapleBBS Ver 2.36 )            */
3 /*-------------------------------------------------------*/
4 /* target : all definitions about data structure         */
5 /* create : 1995/03/29                                   */
6 /* update : 2009/12/18                Dopin:���Ϊ������ */
7 /*-------------------------------------------------------*/
8 
9 #ifndef _STRUCT_H_
10 #define _STRUCT_H_
11 
12 #define STRLEN   80             /* Length of most string data */
13 #define BTLEN    48             /* Length of board title */
14 #define TTLEN    72             /* Length of title */
15 #define NAMELEN  40             /* Length of username/realname */
16 #define FNLEN    33             /* Length of filename  */
17 #define IDLEN    12             /* Length of bid/uid */
18 #define PASSLEN  14             /* Length of encrypted passwd field */
19 
20 typedef unsigned char uschar;   /* length = 1 */
21 typedef unsigned int usint;     /* length = 4 */
22 
23 /* these are flags in userec.uflag */
24 #define SIG_FLAG        0x3     /* signature number, 2 bits */
25 #define PAGER_FLAG      0x4     /* true if pager was OFF last session */
26 #define CLOAK_FLAG      0x8     /* true if cloak was ON last session */
27 #define DUMMY_FLAG      0x10    /* not used */
28 #define BRDSORT_FLAG    0x20    /* true if the boards sorted alphabetical */
29 #define MOVIE_FLAG      0x40    /* true if show movie */
30 #define COLOR_FLAG      0x80    /* true if the color mode open */
31 
32 struct userec {
33   char userid[IDLEN + 1];
34   char realname[20];
35   char username[24];
36   char passwd[PASSLEN];
37   uschar uflag;
38   usint userlevel;
39   ushort numlogins;
40   ushort numposts;
41   time_t firstlogin;
42   time_t lastlogin;
43   char lasthost[16];
44   char termtype[8];
45   char email[50];
46   char address[50];
47   char justify[44];
48   };
49 typedef struct userec userec;
50 
51 /* ----------------------------------------------------- */
52 /* screen.c ���B�Ϊ���Ƶ��c                             */
53 /* ----------------------------------------------------- */
54 
55 #define ANSILINELEN (255)       /* Maximum Screen width in chars */
56 
57 /* Line buffer modes */
58 #define MODIFIED (1)            /* if line has been modifed, screen output */
59 #define STANDOUT (2)            /* if this line has a standout region */
60 
61 struct screenline {
62   uschar oldlen;                /* previous line length */
63   uschar len;                   /* current length of line */
64   uschar mode;                  /* status of line, as far as update */
65   uschar smod;                  /* start of modified data */
66   uschar emod;                  /* end of modified data */
67   uschar sso;                   /* start stand out */
68   uschar eso;                   /* end stand out */
69   unsigned char data[ANSILINELEN + 1];
70 };
71 typedef struct screenline screenline;
72 
73 /* ----------------------------------------------------- */
74 /* edit.c ���B�Ϊ���Ƶ��c                               */
75 /* ----------------------------------------------------- */
76 
77 #define WRAPMARGIN (159)
78 
79 struct textline {
80   struct textline *prev;
81   struct textline *next;
82   int len;
83   char data[WRAPMARGIN + 1];
84 };
85 typedef struct textline textline;
86 
87 #endif                          /* _STRUCT_H_ */
88