11324e38c61e0726a5bf6f014551636af8c525e2
[reactos.git] / rosapps / cmd / batch.h
1 /*
2 * BATCH.H - A structure to preserve the context of a batch file
3 *
4 *
5 */
6
7
8 typedef struct tagBATCHCONTEXT
9 {
10 struct tagBATCHCONTEXT *prev;
11 LPWIN32_FIND_DATA ffind;
12 HANDLE hBatchFile;
13 LPTSTR forproto;
14 LPTSTR params;
15 INT shiftlevel;
16 BOOL bEcho; /* Preserve echo flag across batch calls [HBP_001] */
17 TCHAR forvar;
18 } BATCH_CONTEXT, *LPBATCH_CONTEXT;
19
20 /* HBP_002 } */
21
22
23 /* The stack of current batch contexts.
24 * NULL when no batch is active
25 */
26 extern LPBATCH_CONTEXT bc;
27
28 extern BOOL bEcho; /* The echo flag */
29
30 #define BATCH_BUFFSIZE 2048
31
32 extern TCHAR textline[BATCH_BUFFSIZE]; /* Buffer for reading Batch file lines */
33
34
35 LPTSTR FindArg (INT);
36 LPTSTR BatchParams (LPTSTR, LPTSTR);
37 VOID ExitBatch (LPTSTR);
38 BOOL Batch (LPTSTR, LPTSTR, LPTSTR);
39 LPTSTR ReadBatchLine (LPBOOL);