home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / utilities / dirutils / visualshell / src / defines.h < prev    next >
Text File  |  1992-10-28  |  21KB  |  557 lines

  1.         /*********************************
  2.          *                               *
  3.          *   Visual Shell v1.17  10/92   *
  4.          *                               *
  5.          *     by Torsten Jürgeleit      *
  6.          *                               *
  7.          *           defines             *
  8.          *                               *
  9.          *********************************/
  10.  
  11. #define DEFAULT_ERROR_DELAY        (USHORT)50
  12. #define DEFAULT_STATUS_DELAY        (USHORT)8
  13. #define DEFAULT_EDITOR_NAME        "c:ED"
  14. #define DEFAULT_EDITOR_OPTS        ""
  15. #define DEFAULT_LEFT_EDGE        (USHORT)0
  16. #define DEFAULT_TOP_EDGE        (USHORT)0
  17. #define DEFAULT_CLI_LINES        (USHORT)3
  18. #define DEFAULT_SCROLL_SPEED        SCROLL_SPEED_NORMAL
  19. #define DEFAULT_KEYBOARD_TYPE        KEYBOARD_TYPE1
  20. #define DEFAULT_DUMP_MODE        DUMP_MODE_ALL_CHARS
  21. #define DEFAULT_FILE_PATTERN        "*"
  22. #define DEFAULT_MARK_PATTERN        "*"
  23. #define DEFAULT_UNMARK_PATTERN        "*"
  24.  
  25. #define VSH_CONFIG_FILE        "s:VSh.Config"
  26. #define EXECUTE_NAME        "c:Execute "
  27. #define PROTECTION_BITS        "CHSPARWED"
  28.  
  29. #define WSHELL_SEARCH_ESCAPE    '['
  30.  
  31. #define    CTOB(cptr)        ((BPTR)((ULONG)cptr >> 2))   /* Convert C ptr to BCPL ptr */
  32. #define    BTOC(bptr)        ((VOID *)((ULONG)bptr << 2))   /* Convert BCPL ptr to C ptr */
  33.  
  34. #define FKEY_HEIGHT        (USHORT)(2 + 8 + 2)
  35. #define STATUS_HEIGHT        (USHORT)8
  36. #define DIR_NAME_HEIGHT        (USHORT)12
  37. #define SHOW_CLI_LINES        (USHORT)(vsh_cli_lines)
  38. #define SHOW_CLI_HEIGHT        (USHORT)(SHOW_CLI_LINES * 8)
  39. #define HIDDEN_CLI_LINES    (USHORT)(con_window->GZZHeight / 8)
  40. #define HIDDEN_CLI_HEIGHT    (USHORT)(con_window->GZZHeight)
  41. #define INFO_LINE_HEIGHT    (USHORT)(2 + 8 + 3)
  42. #define INFO_LINE_VPOS        (USHORT)(cli_vpos - INFO_LINE_HEIGHT + 2)
  43.  
  44. #define BORDER_LEFT        (USHORT)4
  45. #define BORDER_RIGHT        (USHORT)4
  46. #define BORDER_TOP        (USHORT)11
  47. #define BORDER_TOP_HIDDEN    (USHORT)(BORDER_TOP + STATUS_HEIGHT + 2)
  48. #define BORDER_TOP_SHOW        (USHORT)(vsh_height - SHOW_CLI_HEIGHT - FKEY_HEIGHT - 1)
  49. #define BORDER_BOTTOM        (USHORT)FKEY_HEIGHT
  50.  
  51. #define MIN_VSH_WIDTH        (USHORT)640   /* NTSC resolution */
  52. #define MIN_VSH_HEIGHT        (USHORT)200
  53.  
  54. #define PROCESS_NAME        "VSh v1.17 for CLI %ld"
  55.  
  56. #define MAX_PROCESS_NAME_LEN        (USHORT)25
  57. #define MAX_ACTION_KEYS            (USHORT)27
  58. #define MAX_OUTPUT_HEIGHT        (USHORT)((cli_vpos - 3) - BORDER_TOP)
  59. #define MAX_KEYWORDS            (USHORT)13
  60. #define MAX_FKEYS            (USHORT)10
  61. #define MAX_FKEY_MODES            (USHORT)14
  62. #define MAX_FKEY_NAME_LEN        (USHORT)6
  63. #define MAX_FKEY_LEN            (USHORT)(MAX_FKEY_NAME_LEN + 1)
  64. #define MAX_DIR_NAME_LEN        (USHORT)500
  65. #define MAX_FILE_NAME_LEN        (USHORT)30
  66. #define MAX_PATH_NAME_LEN        (USHORT)(MAX_DIR_NAME_LEN + MAX_FILE_NAME_LEN)
  67. #define MAX_FILE_SIZE_LEN        (USHORT)8
  68. #define MAX_LINE_LEN            (USHORT)150
  69. #define MAX_FREQ_LINE_LEN        (USHORT)(MAX_FILE_NAME_LEN + MAX_FILE_SIZE_LEN + 1)
  70. #define MAX_FREQ_LINE_WIDTH        (USHORT)(MAX_FREQ_LINE_LEN * 8)
  71. #define MAX_ABOUT_LINES            (USHORT)14
  72. #define MAX_INFO_LINES            (USHORT)14
  73. #define MAX_GADGET_BUFFER_LEN        (USHORT)MAX_PATH_NAME_LEN
  74. #define MAX_EDITOR_NAME_LEN        (USHORT)30
  75. #define MAX_EDITOR_OPTS_LEN        (USHORT)30
  76. #define MAX_USER_FUNCTIONS        (USHORT)10
  77. #define MAX_USER_FUNCTION_LEN        (USHORT)90
  78. #define MAX_SEARCH_STRING_LEN        (USHORT)90
  79. #define MAX_PATTERN_LEN            (USHORT)90
  80. #define MAX_QVIEW_BYTES_PER_LINE    (USHORT)12
  81. #define MAX_TREE_NODE_NAME_LEN        (USHORT)10
  82. #define MAX_FONT_CHARS            (USHORT)256
  83. #define MAX_SPECIAL_CHARS        (USHORT)5
  84. #define MAX_PROTECTION_BITS        (USHORT)9
  85. #define MAX_CONFIG_ENTRY_LEN        (USHORT)90
  86. #define MAX_CONFIG_ENTRIES        (USHORT)10
  87.  
  88. #define ENTRY_TYPE_FILE            (USHORT)0
  89. #define ENTRY_TYPE_DIR            (USHORT)1
  90. #define ENTRY_TYPE_ASSIGN        ENTRY_TYPE_FILE
  91. #define ENTRY_TYPE_DEVICE        ENTRY_TYPE_DIR
  92.  
  93. #define COLOR0                (USHORT)0
  94. #define COLOR1                (USHORT)1
  95. #define COLOR2                (USHORT)2
  96. #define COLOR3                (USHORT)3
  97.  
  98. #define SIGB_ACTION            ((ULONG)vsh_port->mp_SigBit)
  99. #define SIGF_ACTION            (1L << SIGB_ACTION)
  100. #define SIGB_INTUITION            ((ULONG)con_window->UserPort->mp_SigBit)
  101. #define SIGF_INTUITION            (1L << SIGB_INTUITION)
  102.  
  103. #define PART_DISPLAY            (USHORT)0
  104. #define FULL_DISPLAY            (USHORT)1
  105.  
  106. #define SHIFTED                (USHORT)50
  107. #define ALTERNATED            (USHORT)100
  108.  
  109. #define CONMAN_ACTION_FORCE        2001L   /* private packet types supported by ConMan */
  110. #define CONMAN_ACTION_READ_HISTORY    2007L
  111.  
  112. #define VSH_ACTION_NONE                (USHORT)0
  113. #define VSH_ACTION_F1                (USHORT)1   /* actions for keys */
  114. #define VSH_ACTION_F2                (USHORT)2
  115. #define VSH_ACTION_F3                (USHORT)3
  116. #define VSH_ACTION_F4                (USHORT)4
  117. #define VSH_ACTION_F5                (USHORT)5
  118. #define VSH_ACTION_F6                (USHORT)6
  119. #define VSH_ACTION_F7                (USHORT)7
  120. #define VSH_ACTION_F8                (USHORT)8
  121. #define VSH_ACTION_F9                (USHORT)9
  122. #define VSH_ACTION_F10                (USHORT)10
  123. #define VSH_ACTION_TAB                (USHORT)11
  124. #define VSH_ACTION_HELP                (USHORT)12
  125. #define VSH_ACTION_ESC                (USHORT)13
  126. #define VSH_ACTION_RETURN            (USHORT)14
  127. #define VSH_ACTION_NUM_5            (USHORT)15
  128. #define VSH_ACTION_NUM_7            (USHORT)16   /* scroll keys */
  129. #define VSH_ACTION_NUM_1            (USHORT)17
  130. #define VSH_ACTION_NUM_9            (USHORT)18   /* keys with autorepeat */
  131. #define VSH_ACTION_NUM_3            (USHORT)19
  132. #define VSH_ACTION_NUM_8            (USHORT)20
  133. #define VSH_ACTION_NUM_2            (USHORT)21
  134. #define VSH_ACTION_NUM_4            (USHORT)22
  135. #define VSH_ACTION_NUM_6            (USHORT)23
  136. #define VSH_ACTION_NUM_0            (USHORT)24   /* last key with repeat */
  137. #define VSH_ACTION_NUM_LEFT_BRAKET        (USHORT)25
  138. #define VSH_ACTION_NUM_RIGHT_BRAKET        (USHORT)26
  139. #define VSH_ACTION_NUM_SLASH            (USHORT)27
  140. #define VSH_ACTION_NUM_ASTERIKS            (USHORT)28
  141. #define VSH_ACTION_NUM_MINUS            (USHORT)29
  142. #define VSH_ACTION_NUM_PLUS            (USHORT)30
  143. #define VSH_ACTION_NUM_ENTER            (USHORT)31
  144. #define VSH_ACTION_NUM_POINT            (USHORT)32
  145. #define VSH_ACTION_SPEED_SEARCH            (USHORT)33   /* other actions */
  146. #define VSH_ACTION_GADGET_END_KEY        (USHORT)34
  147. #define VSH_ACTION_QUALIFIER            (USHORT)35
  148. #define VSH_ACTION_NUMLOCK            (USHORT)36
  149.  
  150. #define VSH_ACTION_PARENT_DIR            VSH_ACTION_NUM_4
  151. #define VSH_ACTION_READ_AGAIN            VSH_ACTION_NUM_5
  152. #define VSH_ACTION_NEW_DIR            VSH_ACTION_NUM_6
  153. #define VSH_ACTION_FORCE_BASE            VSH_ACTION_NUM_POINT
  154. #define VSH_ACTION_MARK_FILE            VSH_ACTION_NUM_0
  155. #define VSH_ACTION_SCROLL_TOP            VSH_ACTION_NUM_7
  156. #define VSH_ACTION_SCROLL_BOTTOM        VSH_ACTION_NUM_1
  157. #define VSH_ACTION_SCROLL_PAGE_UP        VSH_ACTION_NUM_9
  158. #define VSH_ACTION_SCROLL_PAGE_DOWN        VSH_ACTION_NUM_3
  159. #define VSH_ACTION_SCROLL_UP            VSH_ACTION_NUM_8
  160. #define VSH_ACTION_SCROLL_DOWN            VSH_ACTION_NUM_2
  161. #define VSH_ACTION_SCROLL_LEFT            VSH_ACTION_NUM_4
  162. #define VSH_ACTION_SCROLL_RIGHT            VSH_ACTION_NUM_6
  163. #define VSH_ACTION_QUIT                VSH_ACTION_F10
  164. #define VSH_ACTION_F11                (VSH_ACTION_F1  + SHIFTED)
  165. #define VSH_ACTION_F12                (VSH_ACTION_F2  + SHIFTED)
  166. #define VSH_ACTION_F13                (VSH_ACTION_F3  + SHIFTED)
  167. #define VSH_ACTION_F14                (VSH_ACTION_F4  + SHIFTED)
  168. #define VSH_ACTION_F15                (VSH_ACTION_F5  + SHIFTED)
  169. #define VSH_ACTION_F16                (VSH_ACTION_F6  + SHIFTED)
  170. #define VSH_ACTION_F17                (VSH_ACTION_F7  + SHIFTED)
  171. #define VSH_ACTION_F18                (VSH_ACTION_F8  + SHIFTED)
  172. #define VSH_ACTION_F19                (VSH_ACTION_F9  + SHIFTED)
  173. #define VSH_ACTION_F20                (VSH_ACTION_F10 + SHIFTED)
  174. #define VSH_ACTION_CALL_USER_FUNC1        (VSH_ACTION_F1  + ALTERNATED)
  175. #define VSH_ACTION_CALL_USER_FUNC2        (VSH_ACTION_F2  + ALTERNATED)
  176. #define VSH_ACTION_CALL_USER_FUNC3        (VSH_ACTION_F3  + ALTERNATED)
  177. #define VSH_ACTION_CALL_USER_FUNC4        (VSH_ACTION_F4  + ALTERNATED)
  178. #define VSH_ACTION_CALL_USER_FUNC5        (VSH_ACTION_F5  + ALTERNATED)
  179. #define VSH_ACTION_CALL_USER_FUNC6        (VSH_ACTION_F6  + ALTERNATED)
  180. #define VSH_ACTION_CALL_USER_FUNC7        (VSH_ACTION_F7  + ALTERNATED)
  181. #define VSH_ACTION_CALL_USER_FUNC8        (VSH_ACTION_F8  + ALTERNATED)
  182. #define VSH_ACTION_CALL_USER_FUNC9        (VSH_ACTION_F9  + ALTERNATED)
  183. #define VSH_ACTION_CALL_USER_FUNC10        (VSH_ACTION_F10 + ALTERNATED)
  184. #define VSH_ACTION_CHANGE_USER_FUNC1        (VSH_ACTION_F1  + ALTERNATED + SHIFTED)
  185. #define VSH_ACTION_CHANGE_USER_FUNC2        (VSH_ACTION_F2  + ALTERNATED + SHIFTED)
  186. #define VSH_ACTION_CHANGE_USER_FUNC3        (VSH_ACTION_F3  + ALTERNATED + SHIFTED)
  187. #define VSH_ACTION_CHANGE_USER_FUNC4        (VSH_ACTION_F4  + ALTERNATED + SHIFTED)
  188. #define VSH_ACTION_CHANGE_USER_FUNC5        (VSH_ACTION_F5  + ALTERNATED + SHIFTED)
  189. #define VSH_ACTION_CHANGE_USER_FUNC6        (VSH_ACTION_F6  + ALTERNATED + SHIFTED)
  190. #define VSH_ACTION_CHANGE_USER_FUNC7        (VSH_ACTION_F7  + ALTERNATED + SHIFTED)
  191. #define VSH_ACTION_CHANGE_USER_FUNC8        (VSH_ACTION_F8  + ALTERNATED + SHIFTED)
  192. #define VSH_ACTION_CHANGE_USER_FUNC9        (VSH_ACTION_F9  + ALTERNATED + SHIFTED)
  193. #define VSH_ACTION_CHANGE_USER_FUNC10        (VSH_ACTION_F10 + ALTERNATED + SHIFTED)
  194. #define VSH_ACTION_UNMARK_ALL_FILES        (VSH_ACTION_MARK_FILE + SHIFTED)
  195. #define VSH_ACTION_ROOT_DIR            (VSH_ACTION_PARENT_DIR + SHIFTED)
  196. #define VSH_ACTION_NEW_DIR_TO_NONACTIVE        (VSH_ACTION_NEW_DIR + SHIFTED)
  197. #define VSH_ACTION_FORCE_FULL            (VSH_ACTION_FORCE_BASE + SHIFTED)
  198. #define VSH_ACTION_SHIFT_GADGET_END_KEY        (VSH_ACTION_GADGET_END_KEY + SHIFTED)
  199. #define VSH_ACTION_ABOUT            (VSH_ACTION_HELP + SHIFTED)
  200. #define VSH_ACTION_CONFIG            (VSH_ACTION_HELP + SHIFTED + ALTERNATED)
  201. #define VSH_ACTION_NEXT_PAGE            VSH_ACTION_NUM_ENTER
  202. #define VSH_ACTION_PREVIOUS_PAGE        (VSH_ACTION_NUM_ENTER + SHIFTED)
  203.     /* keyboard dependend action keys */
  204. #define VSH_ACTION_PAT_SELECT_MARK1        VSH_ACTION_NUM_MINUS
  205. #define VSH_ACTION_PAT_SELECT_MARK2        VSH_ACTION_NUM_PLUS
  206. #define VSH_ACTION_PAT_SELECT_UNMARK1        (VSH_ACTION_NUM_MINUS + SHIFTED)
  207. #define VSH_ACTION_PAT_SELECT_UNMARK2        VSH_ACTION_NUM_MINUS
  208.  
  209. #define VSH_STATUS_NORMAL            (SHORT)0
  210. #define VSH_STATUS_READ_DIR            (SHORT)1
  211. #define VSH_STATUS_DUPLICATE_FREQ        (SHORT)2
  212. #define VSH_STATUS_READ_DEVS            (SHORT)3
  213. #define VSH_STATUS_READ_FILE            (SHORT)4
  214. #define VSH_STATUS_BUILD_LINE_LIST        (SHORT)5
  215. #define VSH_STATUS_FREE_LINE_LIST        (SHORT)6
  216. #define VSH_STATUS_RUN_FILE            (SHORT)7
  217. #define VSH_STATUS_EDIT_FILE            (SHORT)8
  218. #define VSH_STATUS_INSERT_FILE            (SHORT)9
  219. #define VSH_STATUS_CHANGE_VIEW_MODE        (SHORT)10
  220. #define VSH_STATUS_EXECUTE_USER_FUNCTION    (SHORT)11
  221. #define VSH_STATUS_PRINT_TEXT            (SHORT)12
  222. #define VSH_STATUS_MAKE_DIR            (SHORT)13
  223. #define VSH_STATUS_FREE_TREE            (SHORT)14
  224. #define VSH_STATUS_HISTORY            (SHORT)15
  225. #define VSH_STATUS_EXECUTE_HISTORY_LINE        (SHORT)16
  226. #define VSH_STATUS_EXECUTE_SCRIPT        (SHORT)17
  227. #define VSH_STATUS_COMPARING_DIRECTORIES    (SHORT)18
  228.  
  229. #define VSH_ERROR_OUT_OF_MEM            (SHORT)-1
  230. #define VSH_ERROR_NO_DIR            (SHORT)-2
  231. #define VSH_ERROR_NO_LOAD_FILE            (SHORT)-3
  232. #define VSH_ERROR_LOCK_FAILED            (SHORT)-4
  233. #define VSH_ERROR_OPEN_FAILED            (SHORT)-5
  234. #define VSH_ERROR_READ_FAILED            (SHORT)-6
  235. #define VSH_ERROR_WRITE_FAILED            (SHORT)-7
  236. #define VSH_ERROR_SEEK_FAILED            (SHORT)-8
  237. #define VSH_ERROR_EXAMINE_FAILED        (SHORT)-9
  238. #define VSH_ERROR_EXNEXT_FAILED            (SHORT)-10
  239. #define VSH_ERROR_PARENTDIR_FAILED        (SHORT)-11
  240. #define VSH_ERROR_INFO_FAILED            (SHORT)-12
  241. #define VSH_ERROR_FINDFIRST_OR_FINDNEXT_FAILED    (SHORT)-13
  242. #define VSH_ERROR_SYNCRUN_FAILED        (SHORT)-14
  243. #define VSH_ERROR_EXECUTE_FAILED        (SHORT)-15
  244. #define VSH_ERROR_RENAME_FAILED            (SHORT)-16
  245. #define VSH_ERROR_CREATEDIR_FAILED        (SHORT)-17
  246. #define VSH_ERROR_DELETEFILE_FAILED        (SHORT)-18
  247. #define VSH_ERROR_SETPROTECTION_FAILED        (SHORT)-19
  248. #define VSH_ERROR_SETCOMMENT_FAILED        (SHORT)-20
  249. #define VSH_ERROR_SETDATE_FAILED        (SHORT)-21
  250. #define VSH_ERROR_SEARCH_FAILED            (SHORT)-22
  251. #define VSH_ERROR_DIR_NOT_FOUND            (SHORT)-23
  252. #define VSH_ERROR_NO_CLI            (SHORT)-24
  253. #define VSH_ERROR_WRONG_CONMAN_VERSION        (SHORT)-25
  254. #define VSH_ERROR_NO_EDITOR            (SHORT)-26
  255. #define VSH_ERROR_EDITOR_NO_LOAD_FILE        (SHORT)-27
  256. #define VSH_ERROR_NO_PATH_NAME            (SHORT)-28
  257. #define VSH_ERROR_NO_PRINTER            (SHORT)-29
  258. #define VSH_ERROR_PRINTING_FAILED        (SHORT)-30
  259. #define VSH_ERROR_MISSING_SECOND_QUOTE        (SHORT)-31
  260. #define VSH_ERROR_NO_FILENAME            (SHORT)-32
  261. #define VSH_ERROR_EMPTY_FILE            (SHORT)-33
  262. #define VSH_ERROR_NO_SOURCE            (SHORT)-34
  263. #define VSH_ERROR_NO_DESTINATION        (SHORT)-35
  264. #define VSH_ERROR_OBJECT_NOT_FOUND        (SHORT)-36
  265. #define VSH_ERROR_OBJECT_IN_USE            (SHORT)-37
  266. #define VSH_ERROR_OBJECT_ALREADY_EXISTS        (SHORT)-38
  267. #define VSH_ERROR_OBJECT_WRONG_TYPE        (SHORT)-39
  268. #define VSH_ERROR_DIRNAME_ALREADY_USED        (SHORT)-40
  269. #define VSH_ERROR_DISK_WRITE_PROTECTED        (SHORT)-41
  270. #define VSH_ERROR_DISK_NOT_VALIDATED        (SHORT)-42
  271. #define VSH_ERROR_DISK_FULL            (SHORT)-43
  272. #define VSH_ERROR_NO_DISK            (SHORT)-44
  273. #define VSH_ERROR_NO_DOS_DISK            (SHORT)-45
  274. #define VSH_ERROR_INVALID_PATTERN        (SHORT)-46
  275. #define VSH_ERROR_COPY_ONTO_ITSELF        (SHORT)-47
  276. #define VSH_ERROR_MULTI_COPY_NO_DIR        (SHORT)-48
  277. #define VSH_ERROR_RENMOVE_ONTO_ITSELF        (SHORT)-49
  278. #define VSH_ERROR_MULTI_RENMOVE_NO_DIR        (SHORT)-50
  279. #define VSH_ERROR_RENAME_ACROSS_DEVICES        (SHORT)-51
  280. #define VSH_ERROR_ABORTED            (SHORT)-52
  281. #define VSH_ERROR_INVALID_LINE_NUM        (SHORT)-53
  282. #define VSH_ERROR_INVALID_HEX_NUM        (SHORT)-54
  283. #define VSH_ERROR_DIFFERENT_DIRECTORY_MODES    (SHORT)-55
  284. #define VSH_ERROR_READ_PROTECTED        (SHORT)-56
  285. #define VSH_ERROR_WRITE_PROTECTED        (SHORT)-57
  286. #define VSH_ERROR_EXECUTE_PROTECTED        (SHORT)-58
  287. #define VSH_ERROR_DELETE_PROTECTED        (SHORT)-59
  288. #define VSH_ERROR_SKIPPED            (SHORT)-60
  289. #define VSH_ERROR_NO_COPY_BUFFER        (SHORT)-61
  290. #define VSH_ERROR_DIRECTORY_NOT_EMPTY        (SHORT)-62
  291.  
  292. #define SCROLL_SPEED_SLOW    (USHORT)1
  293. #define SCROLL_SPEED_NORMAL    (USHORT)2
  294. #define SCROLL_SPEED_FAST    (USHORT)3
  295.  
  296. #define KEYBOARD_TYPE1        (USHORT)1
  297. #define KEYBOARD_TYPE2        (USHORT)2
  298.  
  299. #define DUMP_MODE_ALL_CHARS    (USHORT)1
  300. #define DUMP_MODE_ONLY_CHARS    (USHORT)2
  301. #define DUMP_MODE_ASCII_CHARS    (USHORT)3
  302.  
  303. #define EVENT_MODE_IGNORE    (USHORT)0
  304. #define EVENT_MODE_NORMAL    (USHORT)1
  305. #define EVENT_MODE_INPUT    (USHORT)2
  306. #define EVENT_MODE_ANSWER    (USHORT)3
  307. #define EVENT_MODE_CONFIG    (USHORT)4
  308.  
  309. #define DRAW_MODE_NORMAL    (USHORT)0
  310. #define DRAW_MODE_CLEAR        (USHORT)1
  311.  
  312. #define FKEY_MODE_NONE            (USHORT)0
  313. #define FKEY_MODE_NORMAL        (USHORT)1
  314. #define FKEY_MODE_SHIFT_NORMAL        (USHORT)2
  315. #define FKEY_MODE_SHIFT_DEVS_ASN    (USHORT)3
  316. #define FKEY_MODE_SHIFT_INFO        (USHORT)4
  317. #define FKEY_MODE_SHIFT_QUICK_VIEW    (USHORT)5
  318. #define FKEY_MODE_SHIFT_FIND        (USHORT)6
  319. #define FKEY_MODE_HIDDEN        (USHORT)7
  320. #define FKEY_MODE_QUIT_ONLY        (USHORT)8
  321. #define FKEY_MODE_VIEW            (USHORT)9   /* 2 function key modes (ASCII and HEX dump) */
  322. #define FKEY_MODE_HISTORY        (USHORT)11
  323. #define FKEY_MODE_CONFIG        (USHORT)12
  324. #define FKEY_MODE_USER_FUNCS        (USHORT)13
  325.  
  326. #define FREQ_MODE_NORMAL        (USHORT)0
  327. #define FREQ_MODE_DEVS_ASN        (USHORT)1
  328. #define FREQ_MODE_FIND            (USHORT)2
  329. #define FREQ_MODE_INFO            (USHORT)3
  330. #define FREQ_MODE_QUICK_VIEW        (USHORT)4
  331.  
  332. #define VIEW_MODE_ASCII            (USHORT)0
  333. #define VIEW_MODE_HEX            (USHORT)1
  334.  
  335. #define LINE_MODE_NORMAL        _max_line_len
  336. #define LINE_MODE_NO_FILL        (USHORT)0
  337.  
  338. #define INPUT_MODE_FREQ_ENTRY            (USHORT)0
  339. #define INPUT_MODE_VIEW_LINE            (USHORT)1
  340. #define INPUT_MODE_VIEW_SEARCH            (USHORT)2
  341. #define INPUT_MODE_HISTORY_LINE            (USHORT)3
  342. #define INPUT_MODE_HISTORY_SEARCH        (USHORT)4
  343. #define INPUT_MODE_FILE_PATTERN            (USHORT)5
  344. #define INPUT_MODE_SELECT_PATTERN_MARK        (USHORT)6
  345. #define INPUT_MODE_SELECT_PATTERN_UNMARK    (USHORT)7
  346. #define INPUT_MODE_CD                (USHORT)8
  347. #define INPUT_MODE_USER_FUNCTION        (USHORT)9
  348. #define INPUT_MODE_COPY                (USHORT)10
  349. #define INPUT_MODE_RENAME_MOVE            (USHORT)11
  350. #define INPUT_MODE_MAKE_DIR            (USHORT)12
  351. #define INPUT_MODE_FIND                (USHORT)13
  352. #define INPUT_MODE_TREQ_ENTRY            (USHORT)14
  353.  
  354. #define ANSWER_MODE_COPY_NO_READ    (USHORT)0
  355. #define ANSWER_MODE_COPY_OVERWRITE    (USHORT)1
  356. #define ANSWER_MODE_DELETE_START    (USHORT)2
  357. #define ANSWER_MODE_DELETE_NO_DELETE    (USHORT)3
  358. #define ANSWER_MODE_QUIT        (USHORT)4
  359.  
  360. #define ANSWER_TYPE_ESC            (USHORT)0
  361. #define ANSWER_TYPE_YES            (USHORT)1
  362. #define ANSWER_TYPE_NO            (USHORT)2
  363. #define ANSWER_TYPE_ALL            (USHORT)3
  364.  
  365. #define DISPLAY_MODE_FILE        (USHORT)0
  366. #define DISPLAY_MODE_VIEW        (USHORT)1
  367. #define DISPLAY_MODE_HISTORY        (USHORT)2
  368. #define DISPLAY_MODE_TREE        (USHORT)3
  369.  
  370. #define INFO_LINE_MODE_NORMAL        (USHORT)0
  371. #define INFO_LINE_MODE_EMPTY        (USHORT)1
  372. #define INFO_LINE_MODE_MARKED        (USHORT)2
  373.  
  374. #define PRINT_MODE_PAGE            (USHORT)0
  375. #define PRINT_MODE_ALL            (USHORT)1
  376.  
  377. #define APPEND_MODE_NORMAL        (USHORT)0
  378. #define APPEND_MODE_QUOTED        (USHORT)1
  379.  
  380. #define JUMP_MODE_FIRST            (USHORT)0
  381. #define JUMP_MODE_NEXT            (USHORT)1
  382.  
  383. #define VIEW_SEARCH_MODE_FIRST        (USHORT)0
  384. #define VIEW_SEARCH_MODE_NEXT        (USHORT)2
  385.  
  386. #define HISTORY_SEARCH_MODE_FIRST    (USHORT)0
  387. #define HISTORY_SEARCH_MODE_NEXT    (USHORT)2
  388.  
  389. #define PATTERN_SELECT_MODE_MARK    (USHORT)0
  390. #define PATTERN_SELECT_MODE_UNMARK    (USHORT)1
  391.  
  392. #define NEW_DIR_MODE_NORMAL        (USHORT)0
  393. #define NEW_DIR_MODE_TO_NONACTIVE    (USHORT)1
  394.  
  395. #define READ_DIR_MODE_NORMAL        (USHORT)0
  396. #define READ_DIR_MODE_NO_OUTPUT        (USHORT)1
  397. #define READ_DIR_MODE_NO_PRINT        (USHORT)2
  398. #define READ_DIR_MODE_NO_CD        (USHORT)3
  399.  
  400. #define READ_SAME_DIR_MODE_NORMAL    (USHORT)0
  401. #define READ_SAME_DIR_MODE_NO_CURSOR    (USHORT)1
  402. #define READ_SAME_DIR_MODE_NO_READ    (USHORT)2
  403. #define READ_SAME_DIR_MODE_NO_OUTPUT    (USHORT)3
  404.  
  405. #define MOVE_MODE_NORMAL        (USHORT)0
  406. #define MOVE_MODE_PRINT            (USHORT)1
  407. #define MOVE_MODE_NO_OUTPUT        (USHORT)2
  408. #define MOVE_MODE_NO_CURSOR        (USHORT)3
  409. #define MOVE_MODE_NO_HCOMP        (USHORT)4
  410.  
  411. #define DOS_MODE_NORMAL            (USHORT)0
  412. #define DOS_MODE_COPY            (USHORT)1
  413. #define DOS_MODE_RENAME            (USHORT)2
  414. #define DOS_MODE_DELETE            (USHORT)3
  415. #define DOS_MODE_FIND            (USHORT)4
  416. #define DOS_MODE_TREE            (USHORT)5
  417. #define DOS_MODE_SKIP            (USHORT)6
  418.  
  419. #define LIMITED_PATH_MODE_NORMAL    (USHORT)0
  420. #define LIMITED_PATH_MODE_FILL        (USHORT)1
  421.  
  422. #define FORCE_MODE_NO_NEWLINE        (USHORT)0
  423. #define FORCE_MODE_NEWLINE_APPEND    (USHORT)1
  424. #define FORCE_MODE_NEWLINE_COPY        (USHORT)2
  425.  
  426. #define CONFIG_ENTRY_LEFT_EDGE        (USHORT)0
  427. #define CONFIG_ENTRY_TOP_EDGE        (USHORT)1
  428. #define CONFIG_ENTRY_WIDTH        (USHORT)2
  429. #define CONFIG_ENTRY_HEIGHT        (USHORT)3
  430. #define CONFIG_ENTRY_CLI_LINES        (USHORT)4
  431. #define CONFIG_ENTRY_SCROLL_SPEED    (USHORT)5
  432. #define CONFIG_ENTRY_KEYBOARD_TYPE    (USHORT)6
  433. #define CONFIG_ENTRY_DUMP_MODE        (USHORT)7
  434. #define CONFIG_ENTRY_EDITOR_NAME    (USHORT)8
  435. #define CONFIG_ENTRY_EDITOR_OPTS    (USHORT)9
  436.  
  437. #define QUALIFIER_NONE            (USHORT)0
  438. #define QUALIFIER_SHIFT            (USHORT)1    /* Bit 0 */
  439. #define QUALIFIER_ALT            (USHORT)2    /* Bit 1 */
  440. #define QUALIFIER_SHIFT_ALT        (USHORT)3    /* Bit 0 + 1 */
  441. #define QUALIFIER_CTRL            (USHORT)4    /* Bit 2 */
  442. #define QUALIFIER_AMIGA            (USHORT)8    /* Bit 3 */
  443.  
  444. #define QUALIFIERB_SHIFT        (USHORT)0    /* Bit 0 */
  445. #define QUALIFIERB_ALT            (USHORT)1    /* Bit 1 */
  446. #define QUALIFIERB_CTRL            (USHORT)2    /* Bit 2 */
  447. #define QUALIFIERB_AMIGA        (USHORT)3    /* Bit 3 */
  448.  
  449.     /* Structures */
  450.  
  451. struct ConfigEntry {
  452.     BYTE    *ce_Text;
  453.     USHORT    ce_Activation;
  454.     USHORT    ce_MaxStringLen;
  455.     LONG    ce_MinValue;
  456.     LONG    ce_MaxValue;
  457. };
  458. struct FileNode {
  459.     struct    MinNode    fn_Node;
  460.     struct    DateStamp  fn_Date;
  461.     BYTE    *fn_Path;   /* used only by Find */
  462.     ULONG    fn_Pos;
  463.     ULONG    fn_Size;
  464.     UBYTE    fn_Type;
  465.     UBYTE    fn_Marked;
  466.     USHORT    fn_NameLen;
  467.     USHORT    fn_Protection;
  468.     BYTE    fn_Text[MAX_FREQ_LINE_LEN + 1];
  469. };
  470. struct LineNode {
  471.     struct    MinNode  ln_Node;
  472.     BYTE    *ln_Line;
  473.     ULONG    ln_Offset;
  474.     ULONG    ln_Pos;
  475.     USHORT    ln_LineLen;
  476. };
  477. struct TreeNode {
  478.     struct    MinNode   tn_Node;
  479.     struct    MinList   tn_List;
  480.     struct    TreeNode  *tn_ParentNode;
  481.     ULONG    tn_XPos;   /* depth */
  482.     ULONG    tn_YPos;
  483.     ULONG    tn_MaxDirs;
  484.     ULONG    tn_MaxDepth;
  485.     BYTE    tn_Name[MAX_FILE_NAME_LEN + 1];
  486. };
  487. struct Display {
  488.     USHORT    d_Mode;
  489.     USHORT    d_LeftEdge;
  490.     USHORT    d_TopEdge;
  491.     USHORT    d_Width;
  492.     USHORT    d_VisibleLines;
  493.     ULONG    d_NumEntries;
  494.     struct    MinList  *d_List;
  495.     struct    MinNode  *d_FirstVisibleNode;
  496. };
  497. struct Info {
  498.     USHORT    i_Valid;
  499.     ULONG    i_NumSoftErrors;
  500.     ULONG    i_DiskState;
  501.     ULONG    i_BytesPerBlock;
  502.     ULONG    i_TotalSize;
  503.     ULONG    i_FreeSize;
  504.     ULONG    i_Dirs;
  505.     ULONG    i_Files;
  506.     ULONG    i_FileSizes;
  507.     struct DateStamp  i_LastChanged;
  508.     BYTE    i_VolumeName[MAX_FILE_NAME_LEN + 1];
  509. };
  510. struct FileRequest {
  511.     struct    Display  fr_Display;
  512.     USHORT    fr_Mode;
  513.     SHORT    fr_CursorLine;
  514.     BYTE    fr_DirName[MAX_DIR_NAME_LEN + 2];
  515.     BPTR    fr_DirLock;
  516.     ULONG    fr_MarkedEntries;
  517.     ULONG    fr_MarkedSize;
  518.     ULONG    fr_SaveNumEntries;
  519.     SHORT    fr_SaveCursorLine;
  520.     ULONG    fr_SaveMarkedEntries;
  521.     ULONG    fr_SaveMarkedSize;
  522.     struct    MinList  *fr_SaveFileList;
  523.     struct    MinNode  *fr_SaveFirstVisibleNode;
  524.     struct    Info     fr_Info;
  525.     BYTE    fr_FilePattern[MAX_PATTERN_LEN + 2];
  526.     BYTE    fr_MarkPattern[MAX_PATTERN_LEN + 2];
  527.     BYTE    fr_UnmarkPattern[MAX_PATTERN_LEN + 2];
  528.     struct    AnchorPath  fr_AnchorPath;
  529. };
  530. struct ViewRequest {
  531.     struct    Display  vr_Display;
  532.     USHORT    vr_Mode;
  533.     BYTE    *vr_FileName;
  534.     BYTE    *vr_Buffer;
  535.     ULONG    vr_BufferSize;
  536.     USHORT    vr_MarkedEntries;
  537.     BYTE    vr_LastSearchString[MAX_SEARCH_STRING_LEN + 1];
  538. };
  539. struct HistoryRequest {
  540.     struct    Display  hr_Display;
  541.     SHORT    hr_CursorLine;
  542.     BYTE    *hr_Buffer;
  543.     BYTE    hr_LastSearchString[MAX_SEARCH_STRING_LEN + 1];
  544. };
  545. struct TreeRequest {
  546.     struct    Display   tr_Display;
  547.     struct    TreeNode  *tr_DirNode;
  548.     struct    TreeNode  *tr_CursorNode;
  549.     USHORT    tr_Columns;
  550.     USHORT    tr_Rows;
  551.     ULONG    tr_XPos;
  552.     ULONG    tr_YPos;
  553.     BYTE    tr_DeviceName[MAX_FILE_NAME_LEN + 2];
  554.     BYTE    tr_DirName[MAX_DIR_NAME_LEN + 2];
  555.     struct    TreeNode  tr_RootNode;
  556. };
  557.