Visual C++ backend for rbuild (for now just a hacked mingw backend) and related compi...
[reactos.git] / base / shell / cmd / batch.h
1 /*
2 * BATCH.H - A structure to preserve the context of a batch file
3 *
4 *
5 */
6
7 #ifndef _BATCH_H_INCLUDED_
8 #define _BATCH_H_INCLUDED_
9
10 typedef struct tagBATCHCONTEXT
11 {
12 struct tagBATCHCONTEXT *prev;
13 LPWIN32_FIND_DATA ffind;
14 HANDLE hBatchFile;
15 TCHAR BatchFilePath[MAX_PATH];
16 LPTSTR forproto;
17 LPTSTR params;
18 LPTSTR raw_params; /* Holds the raw params given by the input */
19 INT shiftlevel;
20 BOOL bEcho; /* Preserve echo flag across batch calls */
21 HANDLE hFind; /* Preserve find handle when doing a for */
22 REDIRECTION *RedirList;
23 TCHAR forvar;
24 INT bCmdBlock;
25 BOOL bExecuteBlock[MAX_PATH];
26 } BATCH_CONTEXT, *LPBATCH_CONTEXT;
27
28
29 /* The stack of current batch contexts.
30 * NULL when no batch is active
31 */
32 extern LPBATCH_CONTEXT bc;
33
34 extern BOOL bEcho; /* The echo flag */
35
36 #define BATCH_BUFFSIZE 2048
37
38 extern TCHAR textline[BATCH_BUFFSIZE]; /* Buffer for reading Batch file lines */
39
40
41 LPTSTR FindArg (INT);
42 LPTSTR BatchParams (LPTSTR, LPTSTR);
43 VOID ExitBatch (LPTSTR);
44 BOOL Batch (LPTSTR, LPTSTR, LPTSTR, BOOL);
45 LPTSTR ReadBatchLine();
46 VOID AddBatchRedirection(REDIRECTION **);
47
48 #endif /* _BATCH_H_INCLUDED_ */