-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbbs.h
70 lines (56 loc) · 1.9 KB
/
bbs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*-------------------------------------------------------*/
/* bbs.h ( NTHU CS MapleBBS Ver 2.36 ) */
/*-------------------------------------------------------*/
/* target : all header files */
/* create : 1995/03/29 */
/* update : 2009/12/18 */
/*-------------------------------------------------------*/
#ifndef _BBS_H_
#define _BBS_H_
#define BIT8
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <setjmp.h>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <dirent.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <termios.h>
#ifdef SYSV
#ifndef LOCK_EX
#define LOCK_EX F_LOCK
#define LOCK_UN F_ULOCK
#endif
#define getdtablesize() (64)
#define usleep(usec) { \
struct timeval t; \
t.tv_sec = usec / 1000000; \
t.tv_usec = usec % 1000000; \
select( 0, NULL, NULL, NULL, &t); \
}
#else /* SYSV */
#ifndef MIN
#define MIN(a,b) ((a<b)?a:b)
#endif
#ifndef MAX
#define MAX(a,b) ((a>b)?a:b)
#endif
#endif /* SYSV */
#define YEA (1) /* Booleans (Yep, for true and false) */
#define NA (0)
#define NOECHO (0)
#define DOECHO (1) /* Flags to getdata input function */
#define LCECHO (2)
#define I_TIMEOUT (-2) /* Used for the getchar routine select call */
#define I_OTHERDATA (-333) /* interface, (-3) will conflict with chinese */
#include "global.h" /* global variable & definition */
#include "struct.h" /* data structure */
#endif /* _BBS_H_ */