-
Notifications
You must be signed in to change notification settings - Fork 38
/
config.h
250 lines (200 loc) · 6.51 KB
/
config.h
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
/*
* config.h - Used to configure what will be compiled into the shell.
*
*/
/* define DEBUG to add debugging code */
#ifndef DEBUG /* possibly already defined via command line */
/*#define DEBUG*/
#endif
/* Define to enable the alias command, and aliases. */
#define FEATURE_ALIASES
#define ALIAS_DEFAULT_SIZE 1024
/* Define to disable context error messages that may scare a user */
/* #define NO_CONTEXT_ERROR */
/* Define to enable enhanced input (prerequisite of History and Filename
completion */
#define FEATURE_ENHANCED_INPUT
/* Define to enable history (aka DOSKEY); requires: Enhanced Input */
#define FEATURE_HISTORY
#define HISTORY_DEFAULT_SIZE 256
/* Define to enable filename completion; requires: Enhanced Input */
#define FEATURE_FILENAME_COMPLETION
/* Define to enable to load messages into memory */
#define FEATURE_LOAD_MESSAGES
/* Define to enable /Z support, display exit code on program exit */
#define DISP_EXITCODE
/* Define to enable usage of LFNs */
#define FEATURE_LONG_FILENAMES
/* Define to enable usage or the DOS switch character in option processing */
#define FEATURE_SWITCHAR
/* Define to enable printing of environment variables for "SET VAR" syntax */
/* (Like Win2k's cmd.exe does) */
#define FEATURE_CMD_SET_PRINT
/* Define for limited support of 4DOS DESCRIPT.ION files */
#define FEATURE_DESCRIPT_ION
/* Define to enable DOS NLS */
#define FEATURE_NLS
/* Define to enable F5/F8 key test on startup if /P is present on
command line */
/* #define FEATURE_BOOT_KEYS */
/* Command line logging feature */
/* #define FEATURE_CALL_LOGGING */
/* Preserves last directory (CD, CHDIR, CDD, PUSHD, POPD);
"CD -" chdir's there */
#define FEATURE_LAST_DIR
/* Enables CDD to a filepath (ignores filename portion) */
#define FEATURE_CDD_FNAME
/* Enable to support installable COMMAND extensions (MUX-AE)
*/
#define FEATURE_INSTALLABLE_COMMANDS
/* How often gets the MUX-AE called, when an installable command
extension rewrote the command. */
#define MUX_AE_MAX_REPEAT_CALL 32
/* Name of the executable */
#define COM_NAME "COMMAND.COM"
/* standard name of AUTOEXEC.BAT */
#define AUTO_EXEC "\\autoexec.bat"
/* Logfile for some logging features; MUST be fully-qualified! */
#define LOG_FILE "C:\\FreeCom.log"
/* Define to number of loops when to redirect to CON if the
shells hangs in the "hangForEver()" loop
Undefine to remove this feature */
#define FEATURE_AUTO_REDIRECT_TO_CON 5
/* How many batch files should be nestable minimally */
#define BATCH_NESTLEVEL_MIN 5
/* Define to support kernel-supported swapout of FreeCOM
see DOCS\K-SWAP.TXT
*/
#define FEATURE_KERNEL_SWAP_SHELL
/* Define to support XMS-only swap support of FreeCOM
This setting is incompatible with the above one!
*/
/* #define FEATURE_XMS_SWAP */
/* Define the size of the buffer used to store old paths for PUSHD/POPD */
#define DIRSTACK_DEFAULT_SIZE 256
/* Use this errorlevel if an external program was terminated by
^C or ^Break --> DOS error code interrupted system call */
#define CBREAK_ERRORLEVEL 0x5F
/* Use these filemode while searching for file completion */
#define FILE_SEARCH_MODE FA_RDONLY | FA_ARCH | FA_DIREC
/* If no /E: is specified, always keep this amount of bytes
free within the environment */
#define ENVIRONMENT_KEEP_FREE 256
/* Default message settings:
PATTERN: how the string is constructed for the ID (with \n)
OUTOFMEMORY: string to issue on out-of-memory condition (no \n)
ID_: the error ID when no default pattern is to be created, but
the out-of-memory string is to be displayed
*/
#define MSG_DFL_PATTERN "String #%u\n"
#define MSG_DFL_OUTOFMEMORY "Out of memory!"
#define MSG_ERR_ID_OUTOFMEMORY TEXT_ERROR_OUT_OF_MEMORY
/* Default prompt */
#define DEFAULT_PROMPT "$P$G"
/* Provides the uppermost size the context may have */
#define CONTEXT_MAX_SIZE (65535U - 12)
/* Define this value to select the initialization value of fddebug */
#define FDDEBUG_INIT_VALUE 1
#define INCLUDE_CMD_BEEP
#define INCLUDE_CMD_BREAK
#define INCLUDE_CMD_CHDIR
#define INCLUDE_CMD_CHCP
#define INCLUDE_CMD_CDD
#define INCLUDE_CMD_CLS
#define INCLUDE_CMD_COPY
#define INCLUDE_CMD_CTTY
#define INCLUDE_CMD_DATE
#define INCLUDE_CMD_DEL
#define INCLUDE_CMD_DIR
#define INCLUDE_CMD_DIRS
#ifdef FEATURE_LONG_FILENAMES
#define INCLUDE_CMD_LFNFOR
#endif
#define INCLUDE_CMD_LOADFIX
#define INCLUDE_CMD_LOADHIGH
/*#define INCLUDE_CMD_FAKELOADHIGH */ /* DO NOT include this and CMD_LOADHIGH nor CMD_LOADFIX */
#define INCLUDE_CMD_MEMORY
#define INCLUDE_CMD_MKDIR
#define INCLUDE_CMD_PATH
#define INCLUDE_CMD_PAUSE
#define INCLUDE_CMD_PROMPT
#define INCLUDE_CMD_PUSHD
#define INCLUDE_CMD_POPD
#define INCLUDE_CMD_REM
#define INCLUDE_CMD_RENAME
#define INCLUDE_CMD_RMDIR
#define INCLUDE_CMD_SET
#define INCLUDE_CMD_TIME
#define INCLUDE_CMD_TRUENAME
#define INCLUDE_CMD_TYPE
#define INCLUDE_CMD_VER
#define INCLUDE_CMD_VERIFY
#define INCLUDE_CMD_VOL
#define INCLUDE_CMD_QUESTION
#define INCLUDE_CMD_WHICH
#ifdef DEBUG
#define INCLUDE_CMD_FDDEBUG
#endif
/*
command that do not have a define:
exit
call
echo
goto
for
if
shift
*/
/********
***** Resolve dependencies
***** Don't change without change the appropriate sources!
************/
#if defined(INCLUDE_CMD_PUSHD) || defined(INCLUDE_CMD_POPD)
#define INCLUDE_CMD_CDD
#endif
/* Not available with TURBOC++ 1.0 or earlier: */
#ifdef __TURBOC__
#if __TURBOC__ > 0x297
#define _TC_LATER_
#else
#define _TC_EARLY_
#endif
#endif
/* Define if your compiler does not have 'dosdate_t' or 'dostime_t' */
#if defined(_TC_EARLY_) || defined(__GNUC__)
/* TC++1 */
#define _NO__DOS_DATE
#define _NO__DOS_TIME
#define _NO_FMEMCHR
#define _NO_FMEMCMP
#endif
/* set by MKDIST.BAT */
#ifdef IGNORE_ENHANCED_INPUT
#undef FEATURE_ENHANCED_INPUT
#endif
#ifndef FEATURE_ENHANCED_INPUT
#undef FEATURE_HISTORY
#undef FEATURE_FILENAME_COMPLETION
#endif
#ifdef INCLUDE_CMD_PUSHD
#define FEATURE_DIRSTACK
#endif
#if CONTEXT_MAX_SIZE > 65535U - 12
#error "The maximal context size may not exceed 65535 - 12 bytes"
#endif
#if defined(FEATURE_KERNEL_SWAP_SHELL) && defined(FEATURE_XMS_SWAP)
#error "FreeCOM cannot support both Kernel- and XMS-based swapping simultaneously"
#endif
/* Externally defined to compile with XMS-Swap support */
#if defined(XMS_SWAP)
#undef FEATURE_KERNEL_SWAP_SHELL
#define FEATURE_XMS_SWAP
#endif
#ifdef __TURBOC__
#if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)
/* Compiling in Large memory model --> turn of Warning:
"Conversation may lose significant digits" */
#pragma warn -sig
#endif
#endif
#include "../include/debug.h"