1 /*-------------------------------------------------------*/ 2 /* global.h ( NTHU CS MapleBBS Ver 2.36 ) */ 3 /*-------------------------------------------------------*/ 4 /* target : global definitions & variables */ 5 /* create : 1995/03/29 */ 6 /* update : 2009/12/18 Dopin: ���ݭn������� */ 7 /*-------------------------------------------------------*/ 8 9 #ifndef _GLOBAL_H_ 10 #define _GLOBAL_H_ 11 12 /* ----------------------------------------------------- */ 13 /* GLOBAL DEFINITION */ 14 /* ----------------------------------------------------- */ 15 16 /* ��L�]�w */ 17 18 #ifndef EXTEND_KEY 19 #define EXTEND_KEY 20 #define KEY_TAB 9 21 #define KEY_ESC 27 22 #define KEY_UP 0x0101 23 #define KEY_DOWN 0x0102 24 #define KEY_RIGHT 0x0103 25 #define KEY_LEFT 0x0104 26 #define KEY_HOME 0x0201 27 #define KEY_INS 0x0202 28 #define KEY_DEL 0x0203 29 #define KEY_END 0x0204 30 #define KEY_PGUP 0x0205 31 #define KEY_PGDN 0x0206 32 #endif 33 34 #define Ctrl(c) ( c & 037 ) 35 36 #ifdef SYSV 37 #undef CTRL /* SVR4 CTRL macro is hokey */ 38 #define CTRL(c) ('c'&037) /* This gives ESIX a warning...ignore it! */ 39 #endif 40 41 #define chartoupper(c) ((c >= 'a' && c <= 'z') ? c+'A'-'a' : c) 42 #define char_lower(c) ((c >= 'A' && c <= 'Z') ? c|32 : c) 43 44 /* ----------------------------------------------------- */ 45 /* �T���r��G�W�ߥX�ӡA�H�Q�䴩�U�ػy�� */ 46 /* ----------------------------------------------------- */ 47 48 #define STR_CURSOR "��" 49 50 #define STR_UNCUR " " 51 52 /* ----------------------------------------------------- */ 53 /* GLOBAL VARIABLE */ 54 /* ----------------------------------------------------- */ 55 56 extern char genbuf[1024]; 57 58 extern int showansi; 59 60 /* global string variable */ 61 62 extern jmp_buf byebye; // for exception condition like I/O error 63 64 extern int dumb_term; 65 extern int t_lines, t_columns; // Screen size / width 66 extern int b_lines; // Screen bottom line number: t_lines-1 67 extern int p_lines; // a Page of Screen line numbers: tlines-4 68 69 #endif /* _GLOBAL_H_ */ 70