2 * BATCH.H - A structure to preserve the context of a batch file
7 #ifndef _BATCH_H_INCLUDED_
8 #define _BATCH_H_INCLUDED_
10 typedef struct tagBATCHCONTEXT
12 struct tagBATCHCONTEXT
*prev
;
13 LPWIN32_FIND_DATA ffind
;
15 TCHAR BatchFilePath
[MAX_PATH
];
18 LPTSTR raw_params
; /* Holds the raw params given by the input */
20 BOOL bEcho
; /* Preserve echo flag across batch calls */
21 HANDLE hFind
; /* Preserve find handle when doing a for */
22 REDIRECTION
*RedirList
;
25 BOOL bExecuteBlock
[MAX_PATH
];
26 } BATCH_CONTEXT
, *LPBATCH_CONTEXT
;
29 /* The stack of current batch contexts.
30 * NULL when no batch is active
32 extern LPBATCH_CONTEXT bc
;
34 extern BOOL bEcho
; /* The echo flag */
36 #define BATCH_BUFFSIZE 2048
38 extern TCHAR textline
[BATCH_BUFFSIZE
]; /* Buffer for reading Batch file lines */
42 LPTSTR
BatchParams (LPTSTR
, LPTSTR
);
43 VOID
ExitBatch (LPTSTR
);
44 BOOL
Batch (LPTSTR
, LPTSTR
, LPTSTR
, BOOL
);
45 LPTSTR
ReadBatchLine();
46 VOID
AddBatchRedirection(REDIRECTION
**);
48 #endif /* _BATCH_H_INCLUDED_ */