home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fed0217s.zip / include / common.h < prev    next >
C/C++ Source or Header  |  2001-11-07  |  7KB  |  251 lines

  1. /*
  2. ** Module   :COMMON.H
  3. ** Abstract :Common constants and definitions
  4. **
  5. ** Copyright (C) Sergey I. Yevtushenko
  6. **
  7. ** Log: Sun  06/04/1997       Created
  8. */
  9.  
  10. #include <vio.h>
  11.  
  12. #ifndef  __COMMON_H
  13. #define  __COMMON_H
  14.  
  15. #define TAB_WIDTH (iTabWidth)
  16. #define CHUNK_SIZE     4
  17. #define FED_MAXPATH 270
  18. #define BMK_NUM        10
  19.  
  20. #ifdef TRACELOG
  21. #define DD_TRACE(a,rc) printf("info:%s at %s (%d), rc = %d\n",(a),__FILE__,__LINE__,(rc));
  22. #else
  23. #define DD_TRACE(a,rc)
  24. #endif
  25.  
  26. //Colors, in order
  27.  
  28. #define CL_APPLICATION_START    (0                        )
  29. #define CL_DIALOG_START         (CL_APPLICATION_START + 2 )
  30. #define CL_STEXT_START          (CL_DIALOG_START      + 2 )
  31. #define CL_EDITBOX_START        (CL_STEXT_START       + 2 )
  32. #define CL_EDITLINE_ACTIVE      (CL_EDITBOX_START     + 12)
  33. #define CL_EDITLINE_INACTIVE    (CL_EDITLINE_ACTIVE   + 12)
  34. #define CL_LISTBOX_ACTIVE       (CL_EDITLINE_INACTIVE + 12)
  35. #define CL_LISTBOX_INACTIVE     (CL_LISTBOX_ACTIVE    + 4 )
  36. #define CL_MENU                 (CL_LISTBOX_INACTIVE  + 4 )
  37.  
  38. #define CL_STATUSLINE   ( 1)
  39. #define CL_HILITE       ( 1)
  40. #define CL_BORDER       ( 1)
  41. #define CL_CURRENT      ( 2)
  42. #define CL_CURRSEL      ( 3)
  43.  
  44. #define CL_DEFAULT      ( 0)
  45. #define CL_SELECTION    ( 1)
  46. #define CL_EOF          ( 2)
  47. #define CL_COMMENT      ( 3)
  48. #define CL_IDENT        ( 4)
  49. #define CL_CONST        ( 5)
  50. #define CL_PREPROC      ( 6)
  51. #define CL_NUMBER       ( 7)
  52. #define CL_STDWORD      ( 8)
  53. #define CL_SEMICOL      ( 9)
  54. #define CL_FUNCTION     (10)
  55. #define CL_XNUMBER      (11)
  56.  
  57. //Hiliting modes
  58.  
  59. #define HI_CPP      1
  60. #define HI_REXX     2
  61. #define HI_MAKE     3
  62. #define HI_ASM      4
  63. #define HI_HTML     5
  64. #define HI_MAIL     6
  65. #define HI_PAS      7
  66. #define HI_PL       8
  67. #define HI_LAST     HI_PL
  68. #define MASK_CPP    (1 << HI_CPP)
  69. #define MASK_JAVA   (1 << HI_CPP)
  70. #define MASK_REXX   (1 << HI_REXX)
  71. #define MASK_MAKE   (1 << HI_MAKE)
  72. #define MASK_ASM    (1 << HI_ASM)
  73. #define MASK_HTML   (1 << HI_HTML)
  74. #define MASK_MAIL   (1 << HI_MAIL)
  75. #define MASK_PAS    (1 << HI_PAS)
  76. #define MASK_PL     (1 << HI_PL)
  77.  
  78. #define FUNC_ESCAPE           0x01
  79. #define FUNC_ABORT            0x02
  80. #define FUNC_BKSP             0x03
  81. #define FUNC_CLOSE            0x04
  82. #define FUNC_COPY             0x05
  83. #define FUNC_COPYRIGHT2       0x06
  84. #define FUNC_CUT              0x07
  85. #define FUNC_DEL              0x08
  86. #define FUNC_DELLINE          0x09
  87. #define FUNC_DELTOEOL         0x0A
  88. #define FUNC_DELWORDLEFT      0x0B
  89. #define FUNC_DELWORDRIGHT     0x0C
  90. #define FUNC_DOWN             0x0D
  91. #define FUNC_DOWNMARK         0x0E
  92. #define FUNC_END              0x0F
  93. #define FUNC_ENDMARK          0x10
  94. #define FUNC_EXIT             0x11
  95. #define FUNC_FILEBEGIN        0x12
  96. #define FUNC_FILEBEGINMARK    0x13
  97. #define FUNC_FILEEND          0x14
  98. #define FUNC_FILEENDMARK      0x15
  99. #define FUNC_FILELIST         0x16
  100. #define FUNC_FLIPAUTOINDENT   0x17
  101. #define FUNC_FLIPBLOCKMODE    0x18
  102. #define FUNC_FLIPHILITING     0x19
  103. #define FUNC_HELPSCREEN       0x1A
  104. #define FUNC_HOME             0x1B
  105. #define FUNC_HOMEMARK         0x1C
  106. #define FUNC_INDENT           0x1D
  107. #define FUNC_INS              0x1E
  108. #define FUNC_INSDATE          0x1F
  109. #define FUNC_INSFILENAME      0x20
  110. #define FUNC_INSFILENAMESHORT 0x21
  111. #define FUNC_JUMPCOL          0x22
  112. #define FUNC_JUMPLINE         0x23
  113. #define FUNC_LEFT             0x24
  114. #define FUNC_LEFTMARK         0x25
  115. #define FUNC_LOAD             0x26
  116. #define FUNC_LOWER            0x27
  117. #define FUNC_MACRORECEND      0x28
  118. #define FUNC_MACRORECSTART    0x29
  119. #define FUNC_MATCHBRACKET     0x2A
  120. #define FUNC_MATCHBRACKETMARK 0x2B
  121. #define FUNC_NEW              0x2C
  122. #define FUNC_NEXTFILE         0x2D
  123. #define FUNC_PASTE            0x2E
  124. #define FUNC_PGDN             0x2F
  125. #define FUNC_PGDNMARK         0x30
  126. #define FUNC_PGUP             0x31
  127. #define FUNC_PGUPMARK         0x32
  128. #define FUNC_PREVFILE         0x33
  129. #define FUNC_RIGHT            0x34
  130. #define FUNC_RIGHTMARK        0x35
  131. #define FUNC_SAVE             0x36
  132. #define FUNC_SAVEALL          0x37
  133. #define FUNC_SAVEAS           0x38
  134. #define FUNC_SEARCH           0x39
  135. #define FUNC_SEARCHAGAIN      0x3A
  136. #define FUNC_SORT             0x3B
  137. #define FUNC_UNDO             0x3C
  138. #define FUNC_UNINDENT         0x3D
  139. #define FUNC_UP               0x3E
  140. #define FUNC_UPMARK           0x3F
  141. #define FUNC_UPPER            0x40
  142. #define FUNC_WORDLEFT         0x41
  143. #define FUNC_WORDLEFTMARK     0x42
  144. #define FUNC_WORDRIGHT        0x43
  145. #define FUNC_WORDRIGHTMARK    0x44
  146. #define FUNC_REXX             0x45
  147. #define FUNC_FLIPTYPE         0x46
  148. #define FUNC_HILITE_ACHOICE   0x47
  149. #define FUNC_DUPLICATE_LINE   0x48
  150. #define FUNC_SET_XLAT         0x49
  151.  
  152. #define FUNC_BMK_PUT_0        0x50
  153. #define FUNC_BMK_PUT_1        0x51
  154. #define FUNC_BMK_PUT_2        0x52
  155. #define FUNC_BMK_PUT_3        0x53
  156. #define FUNC_BMK_PUT_4        0x54
  157. #define FUNC_BMK_PUT_5        0x55
  158. #define FUNC_BMK_PUT_6        0x56
  159. #define FUNC_BMK_PUT_7        0x57
  160. #define FUNC_BMK_PUT_8        0x58
  161. #define FUNC_BMK_PUT_9        0x59
  162.  
  163. #define FUNC_BMK_GET_0        0x60
  164. #define FUNC_BMK_GET_1        0x61
  165. #define FUNC_BMK_GET_2        0x62
  166. #define FUNC_BMK_GET_3        0x63
  167. #define FUNC_BMK_GET_4        0x64
  168. #define FUNC_BMK_GET_5        0x65
  169. #define FUNC_BMK_GET_6        0x66
  170. #define FUNC_BMK_GET_7        0x67
  171. #define FUNC_BMK_GET_8        0x68
  172. #define FUNC_BMK_GET_9        0x69
  173.  
  174. #define FUNC_JMP_LST_0        0x70
  175. #define FUNC_JMP_LST_1        0x71
  176. #define FUNC_JMP_LST_2        0x72
  177. #define FUNC_JMP_LST_3        0x73
  178. #define FUNC_JMP_LST_4        0x74
  179. #define FUNC_JMP_LST_5        0x75
  180. #define FUNC_JMP_LST_6        0x76
  181. #define FUNC_JMP_LST_7        0x77
  182. #define FUNC_JMP_LST_8        0x78
  183. #define FUNC_JMP_LST_9        0x79
  184.  
  185. #define FUNC_LOAD_KEYS        0x80
  186. #define FUNC_FLIPWORDWRAP     0x81
  187. #define FUNC_FLIPWWMERGE      0x82
  188. #define FUNC_FLIPWWLONG       0x83
  189.  
  190. extern int iTabWidth;
  191. extern int iWWDef;
  192. extern int iDefWidth;
  193. extern int iUpperStatus;
  194. extern int iNoEA;
  195. extern int Rows;
  196. extern int Cols;
  197. extern int BufLen;
  198. extern int __r_ctype[];
  199. extern int iDateFmt;
  200. extern int cDateSep;
  201. extern int iShape[2];
  202. extern int iForce;
  203. extern int iDefType;
  204. extern int iVSearch;
  205. extern int iCtrlBrk;
  206. extern int iFileName;
  207. extern int iSaveSyntax;
  208. extern int iMouseMask;
  209. extern int iSenseShift;
  210.  
  211. extern char cPipe[];
  212. extern char app_pal[];
  213. extern char StartupDir[];
  214. extern char Search[];
  215. extern char Replace[];
  216. extern char Flags[];
  217. extern char sbuff[];
  218. extern char cName[];
  219. extern char toupper_cvt_table[];
  220. extern char tolower_cvt_table[];
  221. extern char collate_cvt_table[];
  222. extern char ProgressBar[];
  223. extern char _cFedPATH[];
  224.  
  225. extern char *untitled;
  226. extern char *Screen;
  227. extern char *AlignedBuffer;
  228. extern char *FileDialogNames[];
  229. extern char *Yes_No[];
  230. extern char *help_text;
  231. extern char *hi_map;
  232. extern char *statusline;
  233.  
  234. extern KeyInfo kiLastKey;
  235.  
  236. //-----------------------------------------
  237. // Pair object for Dictionary class
  238. //-----------------------------------------
  239.  
  240. struct kwdPair
  241. {
  242.     char *key;
  243.     int mask;
  244. };
  245.  
  246. typedef kwdPair* Pkwd;
  247.  
  248. extern kwdPair keywords[];
  249.  
  250. #endif
  251.