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 >
Wrap
Text File
|
1992-10-28
|
21KB
|
557 lines
/*********************************
* *
* Visual Shell v1.17 10/92 *
* *
* by Torsten Jürgeleit *
* *
* defines *
* *
*********************************/
#define DEFAULT_ERROR_DELAY (USHORT)50
#define DEFAULT_STATUS_DELAY (USHORT)8
#define DEFAULT_EDITOR_NAME "c:ED"
#define DEFAULT_EDITOR_OPTS ""
#define DEFAULT_LEFT_EDGE (USHORT)0
#define DEFAULT_TOP_EDGE (USHORT)0
#define DEFAULT_CLI_LINES (USHORT)3
#define DEFAULT_SCROLL_SPEED SCROLL_SPEED_NORMAL
#define DEFAULT_KEYBOARD_TYPE KEYBOARD_TYPE1
#define DEFAULT_DUMP_MODE DUMP_MODE_ALL_CHARS
#define DEFAULT_FILE_PATTERN "*"
#define DEFAULT_MARK_PATTERN "*"
#define DEFAULT_UNMARK_PATTERN "*"
#define VSH_CONFIG_FILE "s:VSh.Config"
#define EXECUTE_NAME "c:Execute "
#define PROTECTION_BITS "CHSPARWED"
#define WSHELL_SEARCH_ESCAPE '['
#define CTOB(cptr) ((BPTR)((ULONG)cptr >> 2)) /* Convert C ptr to BCPL ptr */
#define BTOC(bptr) ((VOID *)((ULONG)bptr << 2)) /* Convert BCPL ptr to C ptr */
#define FKEY_HEIGHT (USHORT)(2 + 8 + 2)
#define STATUS_HEIGHT (USHORT)8
#define DIR_NAME_HEIGHT (USHORT)12
#define SHOW_CLI_LINES (USHORT)(vsh_cli_lines)
#define SHOW_CLI_HEIGHT (USHORT)(SHOW_CLI_LINES * 8)
#define HIDDEN_CLI_LINES (USHORT)(con_window->GZZHeight / 8)
#define HIDDEN_CLI_HEIGHT (USHORT)(con_window->GZZHeight)
#define INFO_LINE_HEIGHT (USHORT)(2 + 8 + 3)
#define INFO_LINE_VPOS (USHORT)(cli_vpos - INFO_LINE_HEIGHT + 2)
#define BORDER_LEFT (USHORT)4
#define BORDER_RIGHT (USHORT)4
#define BORDER_TOP (USHORT)11
#define BORDER_TOP_HIDDEN (USHORT)(BORDER_TOP + STATUS_HEIGHT + 2)
#define BORDER_TOP_SHOW (USHORT)(vsh_height - SHOW_CLI_HEIGHT - FKEY_HEIGHT - 1)
#define BORDER_BOTTOM (USHORT)FKEY_HEIGHT
#define MIN_VSH_WIDTH (USHORT)640 /* NTSC resolution */
#define MIN_VSH_HEIGHT (USHORT)200
#define PROCESS_NAME "VSh v1.17 for CLI %ld"
#define MAX_PROCESS_NAME_LEN (USHORT)25
#define MAX_ACTION_KEYS (USHORT)27
#define MAX_OUTPUT_HEIGHT (USHORT)((cli_vpos - 3) - BORDER_TOP)
#define MAX_KEYWORDS (USHORT)13
#define MAX_FKEYS (USHORT)10
#define MAX_FKEY_MODES (USHORT)14
#define MAX_FKEY_NAME_LEN (USHORT)6
#define MAX_FKEY_LEN (USHORT)(MAX_FKEY_NAME_LEN + 1)
#define MAX_DIR_NAME_LEN (USHORT)500
#define MAX_FILE_NAME_LEN (USHORT)30
#define MAX_PATH_NAME_LEN (USHORT)(MAX_DIR_NAME_LEN + MAX_FILE_NAME_LEN)
#define MAX_FILE_SIZE_LEN (USHORT)8
#define MAX_LINE_LEN (USHORT)150
#define MAX_FREQ_LINE_LEN (USHORT)(MAX_FILE_NAME_LEN + MAX_FILE_SIZE_LEN + 1)
#define MAX_FREQ_LINE_WIDTH (USHORT)(MAX_FREQ_LINE_LEN * 8)
#define MAX_ABOUT_LINES (USHORT)14
#define MAX_INFO_LINES (USHORT)14
#define MAX_GADGET_BUFFER_LEN (USHORT)MAX_PATH_NAME_LEN
#define MAX_EDITOR_NAME_LEN (USHORT)30
#define MAX_EDITOR_OPTS_LEN (USHORT)30
#define MAX_USER_FUNCTIONS (USHORT)10
#define MAX_USER_FUNCTION_LEN (USHORT)90
#define MAX_SEARCH_STRING_LEN (USHORT)90
#define MAX_PATTERN_LEN (USHORT)90
#define MAX_QVIEW_BYTES_PER_LINE (USHORT)12
#define MAX_TREE_NODE_NAME_LEN (USHORT)10
#define MAX_FONT_CHARS (USHORT)256
#define MAX_SPECIAL_CHARS (USHORT)5
#define MAX_PROTECTION_BITS (USHORT)9
#define MAX_CONFIG_ENTRY_LEN (USHORT)90
#define MAX_CONFIG_ENTRIES (USHORT)10
#define ENTRY_TYPE_FILE (USHORT)0
#define ENTRY_TYPE_DIR (USHORT)1
#define ENTRY_TYPE_ASSIGN ENTRY_TYPE_FILE
#define ENTRY_TYPE_DEVICE ENTRY_TYPE_DIR
#define COLOR0 (USHORT)0
#define COLOR1 (USHORT)1
#define COLOR2 (USHORT)2
#define COLOR3 (USHORT)3
#define SIGB_ACTION ((ULONG)vsh_port->mp_SigBit)
#define SIGF_ACTION (1L << SIGB_ACTION)
#define SIGB_INTUITION ((ULONG)con_window->UserPort->mp_SigBit)
#define SIGF_INTUITION (1L << SIGB_INTUITION)
#define PART_DISPLAY (USHORT)0
#define FULL_DISPLAY (USHORT)1
#define SHIFTED (USHORT)50
#define ALTERNATED (USHORT)100
#define CONMAN_ACTION_FORCE 2001L /* private packet types supported by ConMan */
#define CONMAN_ACTION_READ_HISTORY 2007L
#define VSH_ACTION_NONE (USHORT)0
#define VSH_ACTION_F1 (USHORT)1 /* actions for keys */
#define VSH_ACTION_F2 (USHORT)2
#define VSH_ACTION_F3 (USHORT)3
#define VSH_ACTION_F4 (USHORT)4
#define VSH_ACTION_F5 (USHORT)5
#define VSH_ACTION_F6 (USHORT)6
#define VSH_ACTION_F7 (USHORT)7
#define VSH_ACTION_F8 (USHORT)8
#define VSH_ACTION_F9 (USHORT)9
#define VSH_ACTION_F10 (USHORT)10
#define VSH_ACTION_TAB (USHORT)11
#define VSH_ACTION_HELP (USHORT)12
#define VSH_ACTION_ESC (USHORT)13
#define VSH_ACTION_RETURN (USHORT)14
#define VSH_ACTION_NUM_5 (USHORT)15
#define VSH_ACTION_NUM_7 (USHORT)16 /* scroll keys */
#define VSH_ACTION_NUM_1 (USHORT)17
#define VSH_ACTION_NUM_9 (USHORT)18 /* keys with autorepeat */
#define VSH_ACTION_NUM_3 (USHORT)19
#define VSH_ACTION_NUM_8 (USHORT)20
#define VSH_ACTION_NUM_2 (USHORT)21
#define VSH_ACTION_NUM_4 (USHORT)22
#define VSH_ACTION_NUM_6 (USHORT)23
#define VSH_ACTION_NUM_0 (USHORT)24 /* last key with repeat */
#define VSH_ACTION_NUM_LEFT_BRAKET (USHORT)25
#define VSH_ACTION_NUM_RIGHT_BRAKET (USHORT)26
#define VSH_ACTION_NUM_SLASH (USHORT)27
#define VSH_ACTION_NUM_ASTERIKS (USHORT)28
#define VSH_ACTION_NUM_MINUS (USHORT)29
#define VSH_ACTION_NUM_PLUS (USHORT)30
#define VSH_ACTION_NUM_ENTER (USHORT)31
#define VSH_ACTION_NUM_POINT (USHORT)32
#define VSH_ACTION_SPEED_SEARCH (USHORT)33 /* other actions */
#define VSH_ACTION_GADGET_END_KEY (USHORT)34
#define VSH_ACTION_QUALIFIER (USHORT)35
#define VSH_ACTION_NUMLOCK (USHORT)36
#define VSH_ACTION_PARENT_DIR VSH_ACTION_NUM_4
#define VSH_ACTION_READ_AGAIN VSH_ACTION_NUM_5
#define VSH_ACTION_NEW_DIR VSH_ACTION_NUM_6
#define VSH_ACTION_FORCE_BASE VSH_ACTION_NUM_POINT
#define VSH_ACTION_MARK_FILE VSH_ACTION_NUM_0
#define VSH_ACTION_SCROLL_TOP VSH_ACTION_NUM_7
#define VSH_ACTION_SCROLL_BOTTOM VSH_ACTION_NUM_1
#define VSH_ACTION_SCROLL_PAGE_UP VSH_ACTION_NUM_9
#define VSH_ACTION_SCROLL_PAGE_DOWN VSH_ACTION_NUM_3
#define VSH_ACTION_SCROLL_UP VSH_ACTION_NUM_8
#define VSH_ACTION_SCROLL_DOWN VSH_ACTION_NUM_2
#define VSH_ACTION_SCROLL_LEFT VSH_ACTION_NUM_4
#define VSH_ACTION_SCROLL_RIGHT VSH_ACTION_NUM_6
#define VSH_ACTION_QUIT VSH_ACTION_F10
#define VSH_ACTION_F11 (VSH_ACTION_F1 + SHIFTED)
#define VSH_ACTION_F12 (VSH_ACTION_F2 + SHIFTED)
#define VSH_ACTION_F13 (VSH_ACTION_F3 + SHIFTED)
#define VSH_ACTION_F14 (VSH_ACTION_F4 + SHIFTED)
#define VSH_ACTION_F15 (VSH_ACTION_F5 + SHIFTED)
#define VSH_ACTION_F16 (VSH_ACTION_F6 + SHIFTED)
#define VSH_ACTION_F17 (VSH_ACTION_F7 + SHIFTED)
#define VSH_ACTION_F18 (VSH_ACTION_F8 + SHIFTED)
#define VSH_ACTION_F19 (VSH_ACTION_F9 + SHIFTED)
#define VSH_ACTION_F20 (VSH_ACTION_F10 + SHIFTED)
#define VSH_ACTION_CALL_USER_FUNC1 (VSH_ACTION_F1 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC2 (VSH_ACTION_F2 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC3 (VSH_ACTION_F3 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC4 (VSH_ACTION_F4 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC5 (VSH_ACTION_F5 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC6 (VSH_ACTION_F6 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC7 (VSH_ACTION_F7 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC8 (VSH_ACTION_F8 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC9 (VSH_ACTION_F9 + ALTERNATED)
#define VSH_ACTION_CALL_USER_FUNC10 (VSH_ACTION_F10 + ALTERNATED)
#define VSH_ACTION_CHANGE_USER_FUNC1 (VSH_ACTION_F1 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC2 (VSH_ACTION_F2 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC3 (VSH_ACTION_F3 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC4 (VSH_ACTION_F4 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC5 (VSH_ACTION_F5 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC6 (VSH_ACTION_F6 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC7 (VSH_ACTION_F7 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC8 (VSH_ACTION_F8 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC9 (VSH_ACTION_F9 + ALTERNATED + SHIFTED)
#define VSH_ACTION_CHANGE_USER_FUNC10 (VSH_ACTION_F10 + ALTERNATED + SHIFTED)
#define VSH_ACTION_UNMARK_ALL_FILES (VSH_ACTION_MARK_FILE + SHIFTED)
#define VSH_ACTION_ROOT_DIR (VSH_ACTION_PARENT_DIR + SHIFTED)
#define VSH_ACTION_NEW_DIR_TO_NONACTIVE (VSH_ACTION_NEW_DIR + SHIFTED)
#define VSH_ACTION_FORCE_FULL (VSH_ACTION_FORCE_BASE + SHIFTED)
#define VSH_ACTION_SHIFT_GADGET_END_KEY (VSH_ACTION_GADGET_END_KEY + SHIFTED)
#define VSH_ACTION_ABOUT (VSH_ACTION_HELP + SHIFTED)
#define VSH_ACTION_CONFIG (VSH_ACTION_HELP + SHIFTED + ALTERNATED)
#define VSH_ACTION_NEXT_PAGE VSH_ACTION_NUM_ENTER
#define VSH_ACTION_PREVIOUS_PAGE (VSH_ACTION_NUM_ENTER + SHIFTED)
/* keyboard dependend action keys */
#define VSH_ACTION_PAT_SELECT_MARK1 VSH_ACTION_NUM_MINUS
#define VSH_ACTION_PAT_SELECT_MARK2 VSH_ACTION_NUM_PLUS
#define VSH_ACTION_PAT_SELECT_UNMARK1 (VSH_ACTION_NUM_MINUS + SHIFTED)
#define VSH_ACTION_PAT_SELECT_UNMARK2 VSH_ACTION_NUM_MINUS
#define VSH_STATUS_NORMAL (SHORT)0
#define VSH_STATUS_READ_DIR (SHORT)1
#define VSH_STATUS_DUPLICATE_FREQ (SHORT)2
#define VSH_STATUS_READ_DEVS (SHORT)3
#define VSH_STATUS_READ_FILE (SHORT)4
#define VSH_STATUS_BUILD_LINE_LIST (SHORT)5
#define VSH_STATUS_FREE_LINE_LIST (SHORT)6
#define VSH_STATUS_RUN_FILE (SHORT)7
#define VSH_STATUS_EDIT_FILE (SHORT)8
#define VSH_STATUS_INSERT_FILE (SHORT)9
#define VSH_STATUS_CHANGE_VIEW_MODE (SHORT)10
#define VSH_STATUS_EXECUTE_USER_FUNCTION (SHORT)11
#define VSH_STATUS_PRINT_TEXT (SHORT)12
#define VSH_STATUS_MAKE_DIR (SHORT)13
#define VSH_STATUS_FREE_TREE (SHORT)14
#define VSH_STATUS_HISTORY (SHORT)15
#define VSH_STATUS_EXECUTE_HISTORY_LINE (SHORT)16
#define VSH_STATUS_EXECUTE_SCRIPT (SHORT)17
#define VSH_STATUS_COMPARING_DIRECTORIES (SHORT)18
#define VSH_ERROR_OUT_OF_MEM (SHORT)-1
#define VSH_ERROR_NO_DIR (SHORT)-2
#define VSH_ERROR_NO_LOAD_FILE (SHORT)-3
#define VSH_ERROR_LOCK_FAILED (SHORT)-4
#define VSH_ERROR_OPEN_FAILED (SHORT)-5
#define VSH_ERROR_READ_FAILED (SHORT)-6
#define VSH_ERROR_WRITE_FAILED (SHORT)-7
#define VSH_ERROR_SEEK_FAILED (SHORT)-8
#define VSH_ERROR_EXAMINE_FAILED (SHORT)-9
#define VSH_ERROR_EXNEXT_FAILED (SHORT)-10
#define VSH_ERROR_PARENTDIR_FAILED (SHORT)-11
#define VSH_ERROR_INFO_FAILED (SHORT)-12
#define VSH_ERROR_FINDFIRST_OR_FINDNEXT_FAILED (SHORT)-13
#define VSH_ERROR_SYNCRUN_FAILED (SHORT)-14
#define VSH_ERROR_EXECUTE_FAILED (SHORT)-15
#define VSH_ERROR_RENAME_FAILED (SHORT)-16
#define VSH_ERROR_CREATEDIR_FAILED (SHORT)-17
#define VSH_ERROR_DELETEFILE_FAILED (SHORT)-18
#define VSH_ERROR_SETPROTECTION_FAILED (SHORT)-19
#define VSH_ERROR_SETCOMMENT_FAILED (SHORT)-20
#define VSH_ERROR_SETDATE_FAILED (SHORT)-21
#define VSH_ERROR_SEARCH_FAILED (SHORT)-22
#define VSH_ERROR_DIR_NOT_FOUND (SHORT)-23
#define VSH_ERROR_NO_CLI (SHORT)-24
#define VSH_ERROR_WRONG_CONMAN_VERSION (SHORT)-25
#define VSH_ERROR_NO_EDITOR (SHORT)-26
#define VSH_ERROR_EDITOR_NO_LOAD_FILE (SHORT)-27
#define VSH_ERROR_NO_PATH_NAME (SHORT)-28
#define VSH_ERROR_NO_PRINTER (SHORT)-29
#define VSH_ERROR_PRINTING_FAILED (SHORT)-30
#define VSH_ERROR_MISSING_SECOND_QUOTE (SHORT)-31
#define VSH_ERROR_NO_FILENAME (SHORT)-32
#define VSH_ERROR_EMPTY_FILE (SHORT)-33
#define VSH_ERROR_NO_SOURCE (SHORT)-34
#define VSH_ERROR_NO_DESTINATION (SHORT)-35
#define VSH_ERROR_OBJECT_NOT_FOUND (SHORT)-36
#define VSH_ERROR_OBJECT_IN_USE (SHORT)-37
#define VSH_ERROR_OBJECT_ALREADY_EXISTS (SHORT)-38
#define VSH_ERROR_OBJECT_WRONG_TYPE (SHORT)-39
#define VSH_ERROR_DIRNAME_ALREADY_USED (SHORT)-40
#define VSH_ERROR_DISK_WRITE_PROTECTED (SHORT)-41
#define VSH_ERROR_DISK_NOT_VALIDATED (SHORT)-42
#define VSH_ERROR_DISK_FULL (SHORT)-43
#define VSH_ERROR_NO_DISK (SHORT)-44
#define VSH_ERROR_NO_DOS_DISK (SHORT)-45
#define VSH_ERROR_INVALID_PATTERN (SHORT)-46
#define VSH_ERROR_COPY_ONTO_ITSELF (SHORT)-47
#define VSH_ERROR_MULTI_COPY_NO_DIR (SHORT)-48
#define VSH_ERROR_RENMOVE_ONTO_ITSELF (SHORT)-49
#define VSH_ERROR_MULTI_RENMOVE_NO_DIR (SHORT)-50
#define VSH_ERROR_RENAME_ACROSS_DEVICES (SHORT)-51
#define VSH_ERROR_ABORTED (SHORT)-52
#define VSH_ERROR_INVALID_LINE_NUM (SHORT)-53
#define VSH_ERROR_INVALID_HEX_NUM (SHORT)-54
#define VSH_ERROR_DIFFERENT_DIRECTORY_MODES (SHORT)-55
#define VSH_ERROR_READ_PROTECTED (SHORT)-56
#define VSH_ERROR_WRITE_PROTECTED (SHORT)-57
#define VSH_ERROR_EXECUTE_PROTECTED (SHORT)-58
#define VSH_ERROR_DELETE_PROTECTED (SHORT)-59
#define VSH_ERROR_SKIPPED (SHORT)-60
#define VSH_ERROR_NO_COPY_BUFFER (SHORT)-61
#define VSH_ERROR_DIRECTORY_NOT_EMPTY (SHORT)-62
#define SCROLL_SPEED_SLOW (USHORT)1
#define SCROLL_SPEED_NORMAL (USHORT)2
#define SCROLL_SPEED_FAST (USHORT)3
#define KEYBOARD_TYPE1 (USHORT)1
#define KEYBOARD_TYPE2 (USHORT)2
#define DUMP_MODE_ALL_CHARS (USHORT)1
#define DUMP_MODE_ONLY_CHARS (USHORT)2
#define DUMP_MODE_ASCII_CHARS (USHORT)3
#define EVENT_MODE_IGNORE (USHORT)0
#define EVENT_MODE_NORMAL (USHORT)1
#define EVENT_MODE_INPUT (USHORT)2
#define EVENT_MODE_ANSWER (USHORT)3
#define EVENT_MODE_CONFIG (USHORT)4
#define DRAW_MODE_NORMAL (USHORT)0
#define DRAW_MODE_CLEAR (USHORT)1
#define FKEY_MODE_NONE (USHORT)0
#define FKEY_MODE_NORMAL (USHORT)1
#define FKEY_MODE_SHIFT_NORMAL (USHORT)2
#define FKEY_MODE_SHIFT_DEVS_ASN (USHORT)3
#define FKEY_MODE_SHIFT_INFO (USHORT)4
#define FKEY_MODE_SHIFT_QUICK_VIEW (USHORT)5
#define FKEY_MODE_SHIFT_FIND (USHORT)6
#define FKEY_MODE_HIDDEN (USHORT)7
#define FKEY_MODE_QUIT_ONLY (USHORT)8
#define FKEY_MODE_VIEW (USHORT)9 /* 2 function key modes (ASCII and HEX dump) */
#define FKEY_MODE_HISTORY (USHORT)11
#define FKEY_MODE_CONFIG (USHORT)12
#define FKEY_MODE_USER_FUNCS (USHORT)13
#define FREQ_MODE_NORMAL (USHORT)0
#define FREQ_MODE_DEVS_ASN (USHORT)1
#define FREQ_MODE_FIND (USHORT)2
#define FREQ_MODE_INFO (USHORT)3
#define FREQ_MODE_QUICK_VIEW (USHORT)4
#define VIEW_MODE_ASCII (USHORT)0
#define VIEW_MODE_HEX (USHORT)1
#define LINE_MODE_NORMAL _max_line_len
#define LINE_MODE_NO_FILL (USHORT)0
#define INPUT_MODE_FREQ_ENTRY (USHORT)0
#define INPUT_MODE_VIEW_LINE (USHORT)1
#define INPUT_MODE_VIEW_SEARCH (USHORT)2
#define INPUT_MODE_HISTORY_LINE (USHORT)3
#define INPUT_MODE_HISTORY_SEARCH (USHORT)4
#define INPUT_MODE_FILE_PATTERN (USHORT)5
#define INPUT_MODE_SELECT_PATTERN_MARK (USHORT)6
#define INPUT_MODE_SELECT_PATTERN_UNMARK (USHORT)7
#define INPUT_MODE_CD (USHORT)8
#define INPUT_MODE_USER_FUNCTION (USHORT)9
#define INPUT_MODE_COPY (USHORT)10
#define INPUT_MODE_RENAME_MOVE (USHORT)11
#define INPUT_MODE_MAKE_DIR (USHORT)12
#define INPUT_MODE_FIND (USHORT)13
#define INPUT_MODE_TREQ_ENTRY (USHORT)14
#define ANSWER_MODE_COPY_NO_READ (USHORT)0
#define ANSWER_MODE_COPY_OVERWRITE (USHORT)1
#define ANSWER_MODE_DELETE_START (USHORT)2
#define ANSWER_MODE_DELETE_NO_DELETE (USHORT)3
#define ANSWER_MODE_QUIT (USHORT)4
#define ANSWER_TYPE_ESC (USHORT)0
#define ANSWER_TYPE_YES (USHORT)1
#define ANSWER_TYPE_NO (USHORT)2
#define ANSWER_TYPE_ALL (USHORT)3
#define DISPLAY_MODE_FILE (USHORT)0
#define DISPLAY_MODE_VIEW (USHORT)1
#define DISPLAY_MODE_HISTORY (USHORT)2
#define DISPLAY_MODE_TREE (USHORT)3
#define INFO_LINE_MODE_NORMAL (USHORT)0
#define INFO_LINE_MODE_EMPTY (USHORT)1
#define INFO_LINE_MODE_MARKED (USHORT)2
#define PRINT_MODE_PAGE (USHORT)0
#define PRINT_MODE_ALL (USHORT)1
#define APPEND_MODE_NORMAL (USHORT)0
#define APPEND_MODE_QUOTED (USHORT)1
#define JUMP_MODE_FIRST (USHORT)0
#define JUMP_MODE_NEXT (USHORT)1
#define VIEW_SEARCH_MODE_FIRST (USHORT)0
#define VIEW_SEARCH_MODE_NEXT (USHORT)2
#define HISTORY_SEARCH_MODE_FIRST (USHORT)0
#define HISTORY_SEARCH_MODE_NEXT (USHORT)2
#define PATTERN_SELECT_MODE_MARK (USHORT)0
#define PATTERN_SELECT_MODE_UNMARK (USHORT)1
#define NEW_DIR_MODE_NORMAL (USHORT)0
#define NEW_DIR_MODE_TO_NONACTIVE (USHORT)1
#define READ_DIR_MODE_NORMAL (USHORT)0
#define READ_DIR_MODE_NO_OUTPUT (USHORT)1
#define READ_DIR_MODE_NO_PRINT (USHORT)2
#define READ_DIR_MODE_NO_CD (USHORT)3
#define READ_SAME_DIR_MODE_NORMAL (USHORT)0
#define READ_SAME_DIR_MODE_NO_CURSOR (USHORT)1
#define READ_SAME_DIR_MODE_NO_READ (USHORT)2
#define READ_SAME_DIR_MODE_NO_OUTPUT (USHORT)3
#define MOVE_MODE_NORMAL (USHORT)0
#define MOVE_MODE_PRINT (USHORT)1
#define MOVE_MODE_NO_OUTPUT (USHORT)2
#define MOVE_MODE_NO_CURSOR (USHORT)3
#define MOVE_MODE_NO_HCOMP (USHORT)4
#define DOS_MODE_NORMAL (USHORT)0
#define DOS_MODE_COPY (USHORT)1
#define DOS_MODE_RENAME (USHORT)2
#define DOS_MODE_DELETE (USHORT)3
#define DOS_MODE_FIND (USHORT)4
#define DOS_MODE_TREE (USHORT)5
#define DOS_MODE_SKIP (USHORT)6
#define LIMITED_PATH_MODE_NORMAL (USHORT)0
#define LIMITED_PATH_MODE_FILL (USHORT)1
#define FORCE_MODE_NO_NEWLINE (USHORT)0
#define FORCE_MODE_NEWLINE_APPEND (USHORT)1
#define FORCE_MODE_NEWLINE_COPY (USHORT)2
#define CONFIG_ENTRY_LEFT_EDGE (USHORT)0
#define CONFIG_ENTRY_TOP_EDGE (USHORT)1
#define CONFIG_ENTRY_WIDTH (USHORT)2
#define CONFIG_ENTRY_HEIGHT (USHORT)3
#define CONFIG_ENTRY_CLI_LINES (USHORT)4
#define CONFIG_ENTRY_SCROLL_SPEED (USHORT)5
#define CONFIG_ENTRY_KEYBOARD_TYPE (USHORT)6
#define CONFIG_ENTRY_DUMP_MODE (USHORT)7
#define CONFIG_ENTRY_EDITOR_NAME (USHORT)8
#define CONFIG_ENTRY_EDITOR_OPTS (USHORT)9
#define QUALIFIER_NONE (USHORT)0
#define QUALIFIER_SHIFT (USHORT)1 /* Bit 0 */
#define QUALIFIER_ALT (USHORT)2 /* Bit 1 */
#define QUALIFIER_SHIFT_ALT (USHORT)3 /* Bit 0 + 1 */
#define QUALIFIER_CTRL (USHORT)4 /* Bit 2 */
#define QUALIFIER_AMIGA (USHORT)8 /* Bit 3 */
#define QUALIFIERB_SHIFT (USHORT)0 /* Bit 0 */
#define QUALIFIERB_ALT (USHORT)1 /* Bit 1 */
#define QUALIFIERB_CTRL (USHORT)2 /* Bit 2 */
#define QUALIFIERB_AMIGA (USHORT)3 /* Bit 3 */
/* Structures */
struct ConfigEntry {
BYTE *ce_Text;
USHORT ce_Activation;
USHORT ce_MaxStringLen;
LONG ce_MinValue;
LONG ce_MaxValue;
};
struct FileNode {
struct MinNode fn_Node;
struct DateStamp fn_Date;
BYTE *fn_Path; /* used only by Find */
ULONG fn_Pos;
ULONG fn_Size;
UBYTE fn_Type;
UBYTE fn_Marked;
USHORT fn_NameLen;
USHORT fn_Protection;
BYTE fn_Text[MAX_FREQ_LINE_LEN + 1];
};
struct LineNode {
struct MinNode ln_Node;
BYTE *ln_Line;
ULONG ln_Offset;
ULONG ln_Pos;
USHORT ln_LineLen;
};
struct TreeNode {
struct MinNode tn_Node;
struct MinList tn_List;
struct TreeNode *tn_ParentNode;
ULONG tn_XPos; /* depth */
ULONG tn_YPos;
ULONG tn_MaxDirs;
ULONG tn_MaxDepth;
BYTE tn_Name[MAX_FILE_NAME_LEN + 1];
};
struct Display {
USHORT d_Mode;
USHORT d_LeftEdge;
USHORT d_TopEdge;
USHORT d_Width;
USHORT d_VisibleLines;
ULONG d_NumEntries;
struct MinList *d_List;
struct MinNode *d_FirstVisibleNode;
};
struct Info {
USHORT i_Valid;
ULONG i_NumSoftErrors;
ULONG i_DiskState;
ULONG i_BytesPerBlock;
ULONG i_TotalSize;
ULONG i_FreeSize;
ULONG i_Dirs;
ULONG i_Files;
ULONG i_FileSizes;
struct DateStamp i_LastChanged;
BYTE i_VolumeName[MAX_FILE_NAME_LEN + 1];
};
struct FileRequest {
struct Display fr_Display;
USHORT fr_Mode;
SHORT fr_CursorLine;
BYTE fr_DirName[MAX_DIR_NAME_LEN + 2];
BPTR fr_DirLock;
ULONG fr_MarkedEntries;
ULONG fr_MarkedSize;
ULONG fr_SaveNumEntries;
SHORT fr_SaveCursorLine;
ULONG fr_SaveMarkedEntries;
ULONG fr_SaveMarkedSize;
struct MinList *fr_SaveFileList;
struct MinNode *fr_SaveFirstVisibleNode;
struct Info fr_Info;
BYTE fr_FilePattern[MAX_PATTERN_LEN + 2];
BYTE fr_MarkPattern[MAX_PATTERN_LEN + 2];
BYTE fr_UnmarkPattern[MAX_PATTERN_LEN + 2];
struct AnchorPath fr_AnchorPath;
};
struct ViewRequest {
struct Display vr_Display;
USHORT vr_Mode;
BYTE *vr_FileName;
BYTE *vr_Buffer;
ULONG vr_BufferSize;
USHORT vr_MarkedEntries;
BYTE vr_LastSearchString[MAX_SEARCH_STRING_LEN + 1];
};
struct HistoryRequest {
struct Display hr_Display;
SHORT hr_CursorLine;
BYTE *hr_Buffer;
BYTE hr_LastSearchString[MAX_SEARCH_STRING_LEN + 1];
};
struct TreeRequest {
struct Display tr_Display;
struct TreeNode *tr_DirNode;
struct TreeNode *tr_CursorNode;
USHORT tr_Columns;
USHORT tr_Rows;
ULONG tr_XPos;
ULONG tr_YPos;
BYTE tr_DeviceName[MAX_FILE_NAME_LEN + 2];
BYTE tr_DirName[MAX_DIR_NAME_LEN + 2];
struct TreeNode tr_RootNode;
};