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