ReactOS  0.4.14-dev-337-gf981a68
batch.h
Go to the documentation of this file.
1 /*
2  * BATCH.H - A structure to preserve the context of a batch file
3  */
4 
5 #pragma once
6 
7 typedef struct tagBATCHCONTEXT
8 {
10  char *mem; /* batchfile content in memory */
11  DWORD memsize; /* size of batchfile */
12  DWORD mempos; /* current position to read from */
13  BOOL memfree; /* true if it need to be freed when exitbatch is called */
16  LPTSTR raw_params; /* Holds the raw params given by the input */
18  BOOL bEcho; /* Preserve echo flag across batch calls */
23 
24 typedef struct tagFORCONTEXT
25 {
31 
32 
33 /*
34  * The stack of current batch contexts.
35  * NULL when no batch is active
36  */
37 extern LPBATCH_CONTEXT bc;
38 
39 extern LPFOR_CONTEXT fc;
40 
41 extern BOOL bEcho; /* The echo flag */
42 
43 #define BATCH_BUFFSIZE 8192
44 
45 extern TCHAR textline[BATCH_BUFFSIZE]; /* Buffer for reading Batch file lines */
46 
47 
VOID AddBatchRedirection(REDIRECTION **)
Definition: batch.c:380
REDIRECTION * RedirList
Definition: batch.h:19
LPTSTR BatchParams(LPTSTR, LPTSTR)
Definition: batch.c:113
INT Batch(LPTSTR, LPTSTR, LPTSTR, PARSED_COMMAND *)
Definition: batch.c:238
LPBATCH_CONTEXT bc
Definition: batch.c:66
DWORD mempos
Definition: batch.h:12
BOOL memfree
Definition: batch.h:13
struct tagBATCHCONTEXT BATCH_CONTEXT
LPTSTR params
Definition: batch.h:15
LPTSTR FindArg(TCHAR, BOOL *)
Definition: batch.c:83
LPTSTR ReadBatchLine(VOID)
Definition: batch.c:453
UINT varcount
Definition: batch.h:28
int32_t INT
Definition: typedefs.h:56
CHAR * LPTSTR
Definition: xmlstorage.h:192
TCHAR firstvar
Definition: batch.h:27
struct tagFORCONTEXT * LPFOR_CONTEXT
TCHAR textline[BATCH_BUFFSIZE]
Definition: batch.c:73
PARSED_COMMAND * current
Definition: batch.h:20
BOOL bEcho
Definition: batch.c:68
unsigned int BOOL
Definition: ntddk_ex.h:94
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
char * mem
Definition: batch.h:10
#define BATCH_BUFFSIZE
Definition: batch.h:43
_In_ LPCSTR _In_opt_ LPCSTR _In_ DWORD nBufferLength
Definition: winbase.h:3018
struct _SETLOCAL * setlocal
Definition: batch.h:21
char TCHAR
Definition: xmlstorage.h:189
TCHAR BatchFilePath[MAX_PATH]
Definition: batch.h:14
#define MAX_PATH
Definition: compat.h:26
struct tagFORCONTEXT FOR_CONTEXT
unsigned long DWORD
Definition: ntddk_ex.h:95
LPFOR_CONTEXT fc
Definition: for.c:53
LPTSTR * values
Definition: batch.h:29
VOID ExitBatch(VOID)
Definition: batch.c:186
INT shiftlevel[10]
Definition: batch.h:17
DWORD memsize
Definition: batch.h:11
unsigned int UINT
Definition: ndis.h:50
LPTSTR raw_params
Definition: batch.h:16
BOOL bEcho
Definition: batch.h:18
BOOL BatchGetString(LPTSTR lpBuffer, INT nBufferLength)
Definition: batch.c:400
struct tagFORCONTEXT * prev
Definition: batch.h:26
struct tagBATCHCONTEXT * LPBATCH_CONTEXT
struct tagBATCHCONTEXT * prev
Definition: batch.h:9