summaryrefslogtreecommitdiff
path: root/systems/msdos/tx/src/txdefs.h
blob: aa192aae3fb0621f3d199fcb526f92090631d594 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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"