ReactOS  0.4.15-dev-1177-g6cb3b62
cmd.h
Go to the documentation of this file.
1 /*
2  * CMD.H - header file for the modules in CMD.EXE
3  *
4  *
5  * History:
6  *
7  * 7-15-95 Tim Norman
8  * started
9  *
10  * 06/29/98 (Rob Lake)
11  * Moved error messages in here
12  *
13  * 07/12/98 (Rob Lake)
14  * Moved more error messages here.
15  *
16  * 30-Jul-1998 (John P Price <linux-guru@gcfl.net>)
17  * Added compile date to version.
18  *
19  * 26-Feb-1999 (Eric Kohl)
20  * Introduced a new version string.
21  * Thanks to Emanuele Aliberti!
22  */
23 
24 #pragma once
25 
26 #include <config.h>
27 
28 #include "cmdver.h"
29 #include "cmddbg.h"
30 
31 /* Version of the Command Extensions */
32 #define CMDEXTVERSION 2
33 
34 #define BREAK_BATCHFILE 1
35 #define BREAK_OUTOFBATCH 2 /* aka. BREAK_ENDOFBATCHFILES */
36 #define BREAK_INPUT 3
37 #define BREAK_IGNORE 4
38 
39 /* define some error messages */
40 #define D_ON _T("on")
41 #define D_OFF _T("off")
42 
43 /* command line buffer length */
44 #define CMDLINE_LENGTH 8192
45 
46 /* 16k = max buffer size */
47 #define BUFF_SIZE 16384
48 
49 /* Global variables */
51 extern WORD wColor;
52 extern WORD wDefColor;
53 extern BOOL bCtrlBreak;
54 extern BOOL bIgnoreEcho;
55 extern BOOL bExit;
56 extern BOOL bDisableBatchEcho;
57 extern BOOL bEnableExtensions;
58 extern BOOL bDelayedExpansion;
59 extern INT nErrorLevel;
60 
61 
62 /* Prototypes for ALIAS.C */
65 
66 /* Prototypes for ASSOC.C */
68 
69 /* Prototypes for BEEP.C */
71 
72 /* Prototypes for CALL.C */
74 
75 /* Prototypes for CHOICE.C */
77 
78 /* Prototypes for CLS.C */
80 
81 /* Prototypes for CMD.C */
85 struct _PARSED_COMMAND;
86 
87 INT
89  IN struct _PARSED_COMMAND *Cmd);
90 
91 INT
93  IN struct _PARSED_COMMAND *Cmd);
94 
98 
99 BOOL
101  IN PCTSTR Src,
102  OUT size_t* SrcIncLen, // VarNameLen
103  OUT PTCHAR Dest,
104  IN PTCHAR DestEnd,
105  OUT size_t* DestIncLen,
106  IN TCHAR Delim);
107 
108 BOOL
110  IN PCTSTR Src,
111  OUT PTSTR Dest,
112  IN TCHAR Delim);
113 
114 BOOL
116  IN PCTSTR Src,
117  OUT PTSTR Dest);
118 
119 PTSTR
121  IN PCTSTR Line);
122 
124 BOOL ReadLine(TCHAR *commandline, BOOL bMore);
125 
126 extern HANDLE CMD_ModuleHandle;
127 
128 
129 /* Prototypes for CMDINPUT.C */
131 
134 
135 #define IS_COMPLETION_DISABLED(CompletionCtrl) \
136  ((CompletionCtrl) == 0x00 || (CompletionCtrl) == 0x0D || (CompletionCtrl) >= 0x20)
137 
138 
139 /* Prototypes for CMDTABLE.C */
140 #define CMD_SPECIAL 1
141 #define CMD_BATCHONLY 2
142 #define CMD_HIDE 4
143 
144 typedef struct tagCOMMAND
145 {
147  INT flags;
148  INT (*func)(LPTSTR);
149 } COMMAND, *LPCOMMAND;
150 
151 extern COMMAND cmds[]; /* The internal command table */
152 
154 
155 LPCTSTR GetParsedEnvVar ( LPCTSTR varName, UINT* varNameLen, BOOL ModeSetA );
156 
157 /* Prototypes for CTTY.C */
158 #ifdef INCLUDE_CMD_CTTY
160 #endif
161 
162 /* Prototypes for COLOR.C */
164 
165 /* Prototypes for CONSOLE.C */
166 #include "console.h"
167 
168 /* Prototypes for COPY.C */
170 
171 /* Prototypes for DATE.C */
173 
174 /* Prototypes for DEL.C */
176 
177 /* Prototypes for DELAY.C */
179 
180 /* Prototypes for DIR.C */
184 
185 /* Prototypes for DIRSTACK.C */
192 
193 /* Prototypes for ECHO.C */
199 
200 /* Prototypes for ERROR.C */
201 VOID
203  IN DWORD dwErrorCode,
204  IN PCTSTR szFormat OPTIONAL,
205  ...);
206 
220 
222 
223 /* Prototypes for FILECOMP.C */
224 #ifdef FEATURE_UNIX_FILENAME_COMPLETION
226 INT ShowCompletionMatches (LPTSTR, INT);
227 #endif
228 #ifdef FEATURE_4NT_FILENAME_COMPLETION
230 #endif
231 
232 
233 /* Prototypes for FOR.C */
234 #define FOR_DIRS 1 /* /D */
235 #define FOR_F 2 /* /F */
236 #define FOR_LOOP 4 /* /L */
237 #define FOR_RECURSIVE 8 /* /R */
238 INT cmd_for (LPTSTR);
240 
241 
242 /* Prototypes for FREE.C */
244 
245 /* Prototypes for GOTO.C */
247 
248 /* Prototypes for HISTORY.C */
249 #ifdef FEATURE_HISTORY
251 VOID History(INT, LPTSTR);/*add entries browse history*/
257 #endif
258 
259 /* Prototypes for IF.C */
260 #define IFFLAG_NEGATE 1 /* NOT */
261 #define IFFLAG_IGNORECASE 2 /* /I - Extended */
262 typedef enum _IF_OPERATOR
263 {
265  /* Standard */
267  /* Extended */
269 
271  /* Standard */
272  IF_STRINGEQ, /* == */
273  /* Extended */
275 } IF_OPERATOR;
276 
278 
279 /* Prototypes for INTERNAL.C */
288 
289 /* Prototypes for LOCALE.C */
290 extern TCHAR cDateSeparator;
291 extern INT nDateFormat;
292 extern TCHAR cTimeSeparator;
293 extern INT nTimeFormat;
295 extern TCHAR cDecimalSeparator;
296 extern INT nNumberGroups;
297 
301 
302 /* Prototypes for MEMORY.C */
304 
305 /* Prototypes for MKLINK.C */
307 
308 /* Prototypes for MISC.C */
309 INT
311  IN LPCTSTR InPath,
312  OUT LPTSTR OutPath,
313  IN INT size);
314 
315 BOOL SetRootPath(TCHAR *oldpath,TCHAR *InPath);
321 VOID freep (LPTSTR *);
324 
325 BOOL IsValidPathName(IN LPCTSTR pszPath);
326 BOOL IsExistingFile(IN LPCTSTR pszPath);
329 
330 #define PROMPT_NO 0
331 #define PROMPT_YES 1
332 #define PROMPT_ALL 2
333 #define PROMPT_BREAK 3
334 
335 BOOL __stdcall PagePrompt(PCON_PAGER Pager, DWORD Done, DWORD Total);
338 
339 /* Prototypes for MOVE.C */
341 
342 /* Prototypes for MSGBOX.C */
344 
345 /* Prototypes from PARSER.C */
346 
347 /* These three characters act like spaces to the parser in most contexts */
348 #define STANDARD_SEPS _T(",;=")
349 
350 typedef enum _COMMAND_TYPE
351 {
352  /* Standard command */
354  /* Quiet operator */
356  /* Parenthesized block */
358  /* Operators */
360  /* Special parsed commands */
362 } COMMAND_TYPE;
363 
364 typedef struct _PARSED_COMMAND
365 {
366  /*
367  * For IF : this is the 'main' case (the 'else' is obtained via SubCmd->Next).
368  * For FOR: this is the list of all the subcommands in the DO.
369  */
371 
372  struct _PARSED_COMMAND *Next; // Next command(s) in the chain.
375  union
376  {
377  struct
378  {
381  } Command;
382  struct
383  {
389  } For;
390  struct
391  {
396  } If;
397  };
399 
402  IN PCTSTR Line);
403 
404 VOID
407  IN ULONG SpacePad);
408 
409 VOID
412 
413 PTCHAR
416  OUT PTCHAR Out,
417  IN PTCHAR OutEnd);
418 
419 VOID
422 
424 extern BOOL bParseError;
426 
429 
430 /* Prototypes from PATH.C */
432 
433 /* Prototypes from PROMPT.C */
437 
438 /* Prototypes for REDIR.C */
441 
442 typedef enum _REDIR_MODE
443 {
447 } REDIR_MODE;
448 typedef struct _REDIRECTION
449 {
455 } REDIRECTION;
460 
461 /* Prototypes for REN.C */
463 
464 /* Prototypes for REN.C */
466 
467 /* Prototypes for SCREEN.C */
469 
470 /* Prototypes for SET.C */
471 INT cmd_set (LPTSTR);
472 
473 /* Prototypes for SETLOCAL.C */
477 
478 /* Prototypes for START.C */
480 
481 /* Prototypes for STRTOCLR.C */
483 
484 /* Prototypes for TIME.C */
486 
487 /* Prototypes for TIMER.C */
489 
490 /* Prototypes for TITLE.C */
492 
493 /* Prototypes for TYPE.C */
495 
496 /* Prototypes for VER.C */
499 INT cmd_ver (LPTSTR);
500 
501 /* Prototypes for VERIFY.C */
503 
504 /* Prototypes for VOL.C */
505 INT cmd_vol (LPTSTR);
506 
507 /* Prototypes for WHERE.C */
509 
510 /* Prototypes for WINDOW.C */
513 
514 /* The MSDOS Batch Commands [MS-DOS 5.0 User's Guide and Reference p359] */
515 int cmd_if(TCHAR *);
516 int cmd_pause(TCHAR *);
517 int cmd_shift(TCHAR *);
VOID InitLocale(VOID)
Definition: locale.c:25
VOID InitLastPath(VOID)
INT GetRedirection(LPTSTR, REDIRECTION **)
INT DoCommand(LPTSTR first, LPTSTR rest, struct _PARSED_COMMAND *Cmd)
Definition: cmd.c:553
INT cmd_mklink(LPTSTR)
Definition: mklink.c:124
int cmd_shift(TCHAR *)
GLenum func
Definition: glext.h:6028
VOID PrintCommandList(VOID)
Definition: cmdtable.c:234
INT FormatTime(TCHAR *, LPSYSTEMTIME)
Definition: dir.c:703
INT CommandTimer(LPTSTR param)
Definition: timer.c:59
#define IN
Definition: typedefs.h:39
BOOL add_entry(LPINT ac, LPTSTR **arg, LPCTSTR entry)
Definition: misc.c:184
struct _PARSED_COMMAND::@53::@56 For
BOOL bCtrlBreak
Definition: cmd.c:154
Definition: cmd.h:359
BOOL CheckCtrlBreak(INT)
Definition: misc.c:132
Definition: tftpd.h:59
INT nErrorLevel
Definition: cmd.c:158
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
INT CommandHistory(LPTSTR param)
Definition: history.c:71
VOID InitHistory(VOID)
Definition: history.c:132
LPCTSTR GetParsedEnvVar(LPCTSTR varName, UINT *varNameLen, BOOL ModeSetA)
struct _PARSED_COMMAND::@53::@55 Command
struct _PARSED_COMMAND * Subcommands
Definition: cmd.h:370
VOID CleanHistory(VOID)
Definition: history.c:163
LPCSTR PCTSTR
Definition: ntbasedef.h:489
INT cmd_rmdir(LPTSTR)
Definition: internal.c:521
VOID error_invalid_drive(VOID)
Definition: error.c:117
enum _IF_OPERATOR IF_OPERATOR
COMMAND_TYPE Type
Definition: cmd.h:374
enum _REDIR_MODE REDIR_MODE
INT cmd_start(LPTSTR)
Definition: start.c:37
IF_OPERATOR Operator
Definition: cmd.h:393
LPCTSTR GetEnvVarOrSpecial(LPCTSTR varName)
Definition: cmd.c:900
INT cmd_goto(LPTSTR)
Definition: goto.c:36
Definition: cmd.h:361
INT CommandActivate(LPTSTR)
const GLint * first
Definition: glext.h:5794
VOID History_move_to_bottom(VOID)
Definition: history.c:280
INT cmd_date(LPTSTR)
Definition: date.c:176
#define INT
Definition: polytest.cpp:20
VOID DestroyDirectoryStack(VOID)
Definition: dirstack.c:91
INT CommandDirs(LPTSTR)
Definition: dirstack.c:154
BOOL IsExistingFile(IN LPCTSTR pszPath)
Definition: misc.c:498
LPTSTR * splitspace(LPTSTR, LPINT)
Definition: misc.c:381
Definition: cmd.h:361
INT cmd_copy(LPTSTR)
Definition: copy.c:331
BOOL bEnableExtensions
Definition: cmd.c:161
INT cmd_endlocal(LPTSTR)
Definition: setlocal.c:110
INT CommandFree(LPTSTR)
Definition: free.c:86
INT FormatDate(TCHAR *, LPSYSTEMTIME, BOOL)
Definition: dir.c:674
VOID InitPrompt(VOID)
Definition: prompt.c:57
INT cmd_type(LPTSTR)
Definition: type.c:221
struct _REDIRECTION REDIRECTION
VOID StripQuotes(LPTSTR)
INT cmd_path(LPTSTR)
Definition: path.c:36
INT nTimeFormat
Definition: locale.c:21
PARSED_COMMAND * ParseCommand(IN PCTSTR Line)
Definition: parser.c:1461
INT CommandRem(LPTSTR)
Definition: internal.c:695
struct tagCOMMAND * LPCOMMAND
INT flags
Definition: cmdcons.c:28
int32_t INT
Definition: typedefs.h:58
Definition: cmd.h:355
struct _PARSED_COMMAND * Next
Definition: cmd.h:372
INT CommandMsgbox(LPTSTR)
CHAR * LPTSTR
Definition: xmlstorage.h:192
LPTSTR name
Definition: cmd.h:146
REDIR_MODE Mode
Definition: cmd.h:453
BYTE Switches
Definition: cmd.h:384
VOID FreeCommand(IN OUT PARSED_COMMAND *Cmd)
Definition: parser.c:527
HANDLE OldHandle
Definition: cmd.h:451
PTSTR Rest
Definition: cmd.h:379
INT cmd_cls(LPTSTR)
Definition: cls.c:33
VOID error_invalid_parameter_format(PCTSTR s)
Definition: error.c:145
Definition: cmd.h:359
PTSTR LeftArg
Definition: cmd.h:394
INT CommandEchoerr(LPTSTR)
Definition: echo.c:106
VOID SetHandle(UINT Number, HANDLE Handle)
Definition: redir.c:50
INT CommandAssoc(LPTSTR)
Definition: assoc.c:238
LPTSTR GetTimeString(VOID)
Definition: locale.c:73
VOID freep(LPTSTR *)
Definition: misc.c:446
INT cmd_mkdir(LPTSTR)
Definition: internal.c:360
LPTSTR _stpcpy(LPTSTR, LPCTSTR)
Definition: misc.c:460
Definition: cmd.h:353
unsigned int BOOL
Definition: ntddk_ex.h:94
INT nNumberGroups
Definition: locale.c:22
Definition: cmd.h:274
VOID error_req_param_missing(VOID)
Definition: error.c:110
INT ConvertULargeInteger(ULONGLONG num, LPTSTR des, UINT len, BOOL bPutSeparator)
Definition: cmd.c:189
PTSTR RightArg
Definition: cmd.h:395
INT cmd_move(LPTSTR)
Definition: move.c:87
INT CommandMemory(LPTSTR)
Definition: memory.c:18
INT cmd_replace(LPTSTR)
Definition: replace.c:392
INT cmd_call(LPTSTR)
Definition: call.c:40
HANDLE RunFile(DWORD, LPTSTR, LPTSTR, LPTSTR, INT)
Definition: cmd.c:266
const WCHAR * str
INT GetDirectoryStackDepth(VOID)
Definition: dirstack.c:98
TCHAR First[]
Definition: cmd.h:380
INT FilePromptYN(UINT)
Definition: misc.c:559
INT ExecuteCommand(IN struct _PARSED_COMMAND *Cmd)
INT ParseCommandLine(LPTSTR)
Definition: cmd.c:632
INT cmd_setlocal(LPTSTR)
Definition: setlocal.c:42
VOID error_out_of_memory(VOID)
Definition: error.c:138
BOOL SearchForExecutable(LPCTSTR, LPTSTR)
Definition: where.c:142
#define CMDLINE_LENGTH
Definition: cmd.h:44
INT cmd_chdir(LPTSTR)
Definition: internal.c:240
TCHAR cTimeSeparator
Definition: locale.c:17
VOID CompleteFilename(LPTSTR, BOOL, LPTSTR, UINT)
Definition: filecomp.c:545
INT cmd_time(LPTSTR)
Definition: time.c:132
CHAR * PTSTR
Definition: xmlstorage.h:191
TCHAR cThousandSeparator
Definition: locale.c:18
TCHAR cDecimalSeparator
Definition: locale.c:19
LPTSTR DuplicateEnvironment(VOID)
Definition: setlocal.c:25
VOID error_invalid_switch(TCHAR ch)
Definition: error.c:72
VOID error_path_not_found(VOID)
Definition: error.c:86
INT FilePromptYNA(UINT)
Definition: misc.c:623
INT cmd_for(LPTSTR)
Definition: for.c:41
BYTE Number
Definition: cmd.h:452
PTCHAR UnparseCommand(IN PARSED_COMMAND *Cmd, OUT PTCHAR Out, IN PTCHAR OutEnd)
Definition: parser.c:1965
char TCHAR
Definition: xmlstorage.h:189
_In_ HANDLE Handle
Definition: extypes.h:390
BOOL __stdcall PagePrompt(PCON_PAGER Pager, DWORD Done, DWORD Total)
Definition: misc.c:512
BOOL bIgnoreEcho
Definition: cmd.c:155
_IF_OPERATOR
Definition: cmd.h:262
Definition: cmd.h:274
GLsizeiptr size
Definition: glext.h:5919
COMMAND cmds[]
Definition: main.c:21
VOID InitDirectoryStack(VOID)
Definition: dirstack.c:80
VOID EchoCommand(IN PARSED_COMMAND *Cmd)
Definition: parser.c:1808
INT CommandPushd(LPTSTR)
Definition: dirstack.c:107
uint64_t ULONGLONG
Definition: typedefs.h:67
Definition: cmd.h:359
PTSTR List
Definition: cmd.h:387
Definition: cmd.h:274
BOOL ReadCommand(LPTSTR, INT)
Definition: cmdinput.c:138
GLfloat param
Definition: glext.h:5796
BOOL SubstituteForVars(IN PCTSTR Src, OUT PTSTR Dest)
Definition: cmd.c:1594
VOID GetPathCase(TCHAR *, TCHAR *)
Definition: misc.c:86
TCHAR Filename[]
Definition: cmd.h:454
INT cmd_title(LPTSTR)
Definition: title.c:18
unsigned short WORD
Definition: ntddk_ex.h:93
TCHAR PathCompletionChar
Definition: cmdinput.c:112
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint num
Definition: glext.h:9618
VOID ParseErrorEx(IN PCTSTR s)
Definition: parser.c:227
#define __stdcall
Definition: typedefs.h:25
INT CommandShowCommands(LPTSTR)
Definition: internal.c:707
INT CommandScreen(LPTSTR)
Definition: screen.c:18
VOID error_file_not_found(VOID)
Definition: error.c:93
VOID PrintOSVersion(VOID)
Definition: ver.c:114
LPTSTR lpOriginalEnvironment
Definition: cmd.c:164
struct tagCOMMAND COMMAND
Definition: ncftp.h:79
VOID error_parameter_format(TCHAR ch)
Definition: error.c:65
BOOL OnOffCommand(LPTSTR param, LPBOOL flag, INT message)
Definition: echo.c:32
VOID error_sfile_not_found(PCTSTR s)
Definition: error.c:100
WORD wColor
LPTSTR GetDateString(VOID)
Definition: locale.c:58
INT cmd_set(LPTSTR)
Definition: set.c:72
VOID error_too_many_parameters(PCTSTR s)
Definition: error.c:79
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
Definition: sacdrv.h:277
TCHAR cDateSeparator
Definition: locale.c:16
INT CommandWindow(LPTSTR)
INT CommandPopd(LPTSTR)
Definition: dirstack.c:132
VOID History_del_current_entry(LPTSTR str)
Definition: history.c:175
BOOL StringToColor(LPWORD, LPTSTR *)
Definition: strtoclr.c:255
uint32_t entry
Definition: isohybrid.c:63
int cmd_if(TCHAR *)
int cmd_pause(TCHAR *)
GLenum GLsizei len
Definition: glext.h:6722
INT cmd_verify(LPTSTR)
Definition: verify.c:30
GLdouble s
Definition: gl.h:2039
INT cmd_ver(LPTSTR)
Definition: ver.c:126
VOID UndoRedirection(REDIRECTION *, REDIRECTION *End)
Definition: redir.c:142
INT CommandDelete(LPTSTR)
Definition: del.c:358
Definition: cmd.h:274
VOID ErrorMessage(IN DWORD dwErrorCode, IN PCTSTR szFormat OPTIONAL,...)
Definition: error.c:26
BOOL SetRootPath(TCHAR *oldpath, TCHAR *InPath)
Definition: internal.c:182
LPTSTR * split(LPTSTR, LPINT, BOOL, BOOL)
Definition: misc.c:282
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
Definition: ntpoapi.h:204
unsigned char BYTE
Definition: xxhash.c:193
INT CommandAlias(LPTSTR)
Definition: alias.c:174
TCHAR Variable
Definition: cmd.h:385
VOID DumpCommand(IN PARSED_COMMAND *Cmd, IN ULONG SpacePad)
Definition: parser.c:1533
TCHAR AutoCompletionChar
Definition: cmdinput.c:111
INT CommandEchoserr(LPTSTR)
Definition: echo.c:121
BOOL bDisableBatchEcho
Definition: cmd.c:160
INT ExecuteCommandWithEcho(IN struct _PARSED_COMMAND *Cmd)
struct _REDIRECTION * Redirections
Definition: cmd.h:373
VOID msg_pause(VOID)
Definition: error.c:167
INT GetRootPath(IN LPCTSTR InPath, OUT LPTSTR OutPath, IN INT size)
Definition: internal.c:152
uint16_t * LPWORD
Definition: typedefs.h:56
Definition: cmd.h:361
struct _FOR_CONTEXT * Context
Definition: cmd.h:388
enum _COMMAND_TYPE COMMAND_TYPE
_REDIR_MODE
Definition: cmd.h:442
INT CommandDir(LPTSTR)
Definition: dir.c:1835
INT CommandChoice(LPTSTR)
Definition: choice.c:102
LPCTSTR PeekHistory(INT)
Definition: history.c:287
INT cmd_beep(LPTSTR)
Definition: beep.c:31
BOOL * LPBOOL
Definition: windef.h:162
BOOL ReadLine(TCHAR *commandline, BOOL bMore)
Definition: cmd.c:1719
static const WCHAR des[]
Definition: oid.c:1212
INT cmd_rename(LPTSTR)
Definition: ren.c:53
Definition: cmd.h:357
VOID error_bad_command(PCTSTR s)
Definition: error.c:124
BOOL bIgnoreParserComments
Definition: parser.c:96
VOID RemoveBreakHandler(VOID)
Definition: cmd.c:1848
BOOL bExit
Definition: cmd.c:152
unsigned int UINT
Definition: ndis.h:50
VOID ExpandAlias(LPTSTR, INT)
Definition: alias.c:89
VOID FreeRedirection(REDIRECTION *)
Definition: redir.c:153
BOOL bHandleContinuations
Definition: parser.c:97
BOOL PerformRedirection(REDIRECTION *)
Definition: redir.c:63
VOID AddBreakHandler(VOID)
Definition: cmd.c:1842
INT cmd_ctty(LPTSTR)
Definition: ctty.c:102
struct _PARSED_COMMAND PARSED_COMMAND
struct _REDIRECTION * Next
Definition: cmd.h:450
INT cmd_prompt(LPTSTR)
Definition: prompt.c:244
Definition: cmd.h:359
#define OUT
Definition: typedefs.h:40
INT CommandEcho(LPTSTR)
Definition: echo.c:65
INT nDateFormat
Definition: locale.c:20
HANDLE CMD_ModuleHandle
Definition: cmd.c:165
unsigned int ULONG
Definition: retypes.h:1
VOID error_no_pipe(VOID)
Definition: error.c:131
INT ExecuteIf(struct _PARSED_COMMAND *Cmd)
Definition: if.c:66
TCHAR cgetchar(VOID)
Definition: misc.c:41
PTSTR Params
Definition: cmd.h:386
INT ExecuteFor(struct _PARSED_COMMAND *Cmd)
Definition: for.c:604
VOID History(INT, LPTSTR)
Definition: history.c:326
Definition: cmd.h:266
HANDLE GetHandle(UINT Number)
Definition: redir.c:39
VOID error_syntax(PCTSTR s)
Definition: error.c:152
INT CommandDelay(LPTSTR)
Definition: delay.c:17
INT CommandEchos(LPTSTR)
Definition: echo.c:91
VOID FreeLastPath(VOID)
BOOL bDelayedExpansion
Definition: cmd.c:162
struct _PARSED_COMMAND::@53::@57 If
BOOL IsValidPathName(IN LPCTSTR pszPath)
Definition: misc.c:482
Definition: main.c:14
INT CommandExit(LPTSTR)
Definition: internal.c:621
BYTE Flags
Definition: cmd.h:392
_COMMAND_TYPE
Definition: cmd.h:350
BOOL SubstituteVars(IN PCTSTR Src, OUT PTSTR Dest, IN TCHAR Delim)
Definition: cmd.c:1512
INT cmd_vol(LPTSTR)
Definition: vol.c:64
VOID InitOSVersion(VOID)
Definition: ver.c:32
VOID PrintPrompt(VOID)
Definition: prompt.c:109
Definition: cmd.h:274
PTSTR DoDelayedExpansion(IN PCTSTR Line)
Definition: cmd.c:1638
BOOL IsExistingDirectory(IN LPCTSTR pszPath)
Definition: misc.c:504
BOOL SubstituteVar(IN PCTSTR Src, OUT size_t *SrcIncLen, OUT PTCHAR Dest, IN PTCHAR DestEnd, OUT size_t *DestIncLen, IN TCHAR Delim)
Definition: cmd.c:1324
BOOL bParseError
Definition: parser.c:90
char * PTCHAR
Definition: ntbasedef.h:477
Definition: cmd.h:274
INT CommandColor(LPTSTR)
Definition: color.c:32
TCHAR ParseLine[CMDLINE_LENGTH]
Definition: parser.c:92
int * LPINT
Definition: windef.h:178
WORD wDefColor
Definition: cmd.c:180
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68