diff options
Diffstat (limited to 'systems/msdos/tx/src/txdefs.h')
-rw-r--r-- | systems/msdos/tx/src/txdefs.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/systems/msdos/tx/src/txdefs.h b/systems/msdos/tx/src/txdefs.h new file mode 100644 index 0000000000..aa192aae3f --- /dev/null +++ b/systems/msdos/tx/src/txdefs.h @@ -0,0 +1,93 @@ +/* All the preprocessor definitions are here */ + +#define MAX_MENUS 10 /* Maximum number of menus */ +#define MAX_ENTRIES 10 /* Maximum number of entries per menu */ +#define MAX_WIDTH 60 /* Maximum width of the text of each entry */ + /* after expanding the working file name */ +#define MAX_ACTION 128 /* Maximum width of command (DOS limit) */ +#define MAX_ARGS 20 /* Maximum number of arguments in a command */ +#define ENV_SIZE 2048 /* Choose a default env size large enough */ + +#define MAX_FILES_IN_DIR 400 /* Maximum number of files admitted in dir */ + +#define TOP 1 /* top-right location of menu */ +#define RIGHT 80 + +#ifdef __GO32__ +#define BACKSLASH '/' +#else +#define BACKSLASH '\\' +#endif +#define SLASH '/' + +#define CNF_COMLINE '@' /* sign to precede config file in command line */ + +/* Configuration file conventions */ + +#define NEW_MENU_SIGN '+' /* sign to indicate start of new menu */ +#define SUBST_SIGN '#' /* sign to indicate substitutable item */ +#define COMMENT_SIGN '%' /* sign to start comment to end of line */ +#define SWITCH_MENUS "menu" /* switch to a different menu */ +#define L_SWITCH_MENUS 4 /* length of previous string */ +#define DOS_COMMAND "dos" /* execute operating system command */ +#define L_DOS_COMMAND 3 /* length of previous string */ +#define FIND_NAME "find" /* find new working file */ +#define L_FIND_NAME 4 /* length of previous string */ +#define NEW_NAME "new" /* supply new working file name */ +#define L_NEW_NAME 3 /* length of previous string */ +#define END_PROG "end" /* end program */ +#define L_END_PROG 3 /* length of previous string */ +#define WF_NAME "name" /* working file name (no extension, no path) */ +#define L_WF_NAME 4 /* length of previous string */ +#define WF_EXT "ext" /* working file extension */ +#define L_WF_EXT 3 /* length of previous string */ +#define WF_PATH "path" /* working file drive and directory */ +#define L_WF_PATH 4 /* length of previous string */ +#define WF_SLPATH "/path" /* same as above, with / instead of \ */ +#define L_WF_SLPATH 5 /* length of previous string */ + +/* The following are defined for readability. Do not change them + unless you know what you are doing! */ +#define CR 13 +#define ESC 27 +#define SPACE 32 +#define HOMEKEY -71 +#define ENDKEY -79 +#define UPKEY -72 +#define DOWNKEY -80 +#define PGUPKEY -73 +#define PGDNKEY -81 +#define LEFTKEY -75 +#define RIGHTKEY -77 + +#define DEF_WFN "work" /* Default working file name */ +#define DEF_WFEXT ".tex" /* Default working file extension */ +#define CNF_ENVVAR "TX" /* Environmental variable: config file name */ + +/* Messages */ + +#define MSG_USAGE "Usage: %s [-h] [-m] [-e num] [@cnfname] [wfname]\n \ +\tWhere \"cnfname\" is a configuration file name,\n \ +\t \"wfname\" is a working file name,\n \ +\t \"-m\" sets monochrome display,\n \ +\t \"-e num\" sets env size for child processes to num (>256),\n \ +\t and \"-h\" prints this message.\n \ +The configuration file name may be skipped if either:\n \ +(1) It is specified by the environmental variable %s, or\n \ +(2) It resides in the same directory the executable is.\n \ +(See the documentation that came along with the program.)\n" +#define MSG_NOCONFIG "%s: Could not open configuration file.\n" +#define MSG_CONFIGERR "%s: Configuration file error.\n\tText entry \ +must be followed by a command.\n" +#define MSG_NOTMEM "%s: Not enough memory. Exiting.\n" +#define MSG_SCRSAVE "%s: Cannot save screen contents. Exiting.\n" +#define MSG_SCRBOUNDS "%s: Menu exceeds screen dimensions. \ +Exiting.\n" +#define MSG_CHOICE " Choose a number (press the space bar to restore \ +the screen momentarily)" +#define MSG_COMLONG "%s: Command too long. It will not be executed.\n" +#define MSG_NEW_FILE "Write new working file name/path: " +#define MSG_CONFFN "Write name of configuration file: " +#define MSG_DOSCOM "Write command to be executed: " +#define MSG_BADDRIVE "%s: Drive not available.\n" +#define MSG_BADDIR "%s: Directory %s not valid.\n" |