e7e6fb6c40f76abf753b7f26c0d6b3ec6aca6ed8
[reactos.git] / subsys / system / 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
11 typedef struct tagBATCHCONTEXT
12 {
13         struct tagBATCHCONTEXT *prev;
14         LPWIN32_FIND_DATA ffind;
15         HANDLE hBatchFile;
16         LPTSTR forproto;
17         LPTSTR params;
18         INT    shiftlevel;
19         BOOL   bEcho;        /* Preserve echo flag across batch calls */
20         HANDLE hFind;        /* Preserve find handle when doing a for */
21         TCHAR forvar;
22 } BATCH_CONTEXT, *LPBATCH_CONTEXT;
23
24
25 /*  The stack of current batch contexts.
26  * NULL when no batch is active
27  */
28 extern LPBATCH_CONTEXT bc;
29
30 extern BOOL bEcho;       /* The echo flag */
31
32 #define BATCH_BUFFSIZE  2048
33
34 extern TCHAR textline[BATCH_BUFFSIZE]; /* Buffer for reading Batch file lines */
35
36
37 LPTSTR FindArg (INT);
38 LPTSTR BatchParams (LPTSTR, LPTSTR);
39 VOID   ExitBatch (LPTSTR);
40 BOOL   Batch (LPTSTR, LPTSTR, LPTSTR);
41 LPTSTR ReadBatchLine (LPBOOL);
42
43 #endif /* _BATCH_H_INCLUDED_ */