ReactOS 0.4.16-dev-2491-g3dc6630
for.c
Go to the documentation of this file.
1/*
2 * FOR.C - for internal batch command.
3 *
4 *
5 * History:
6 *
7 * 16-Jul-1998 (Hans B Pufal)
8 * Started.
9 *
10 * 16-Jul-1998 (John P Price)
11 * Separated commands into individual files.
12 *
13 * 19-Jul-1998 (Hans B Pufal)
14 * Implementation of FOR.
15 *
16 * 27-Jul-1998 (John P Price <linux-guru@gcfl.net>)
17 * Added config.h include.
18 *
19 * 20-Jan-1999 (Eric Kohl)
20 * Unicode and redirection safe!
21 *
22 * 01-Sep-1999 (Eric Kohl)
23 * Added help text.
24 *
25 * 23-Feb-2001 (Carl Nettelblad <cnettel@hem.passagen.se>)
26 * Implemented preservation of echo flag. Some other for related
27 * code in other files fixed, too.
28 *
29 * 28-Apr-2005 (Magnus Olsen <magnus@greatlord.com>)
30 * Remove all hardcoded strings in En.rc
31 */
32
33#include "precomp.h"
34
35/* Enable this define for "buggy" Windows' CMD FOR-command compatibility.
36 * Currently, this enables the buggy behaviour of FOR /F token parsing. */
37#define MSCMD_FOR_QUIRKS
38
39
40/* FOR is a special command, so this function is only used for showing help now */
42{
43 TRACE("cmd_for(\'%s\')\n", debugstr_aw(param));
44
45 if (!_tcsncmp(param, _T("/?"), 2))
46 {
48 return 0;
49 }
50
52 return 1;
53}
54
55/* The stack of current FOR contexts.
56 * NULL when no FOR command is active */
58
59/* Get the next element of the FOR's list */
60static BOOL GetNextElement(TCHAR **pStart, TCHAR **pEnd)
61{
62 TCHAR *p = *pEnd;
63 BOOL InQuotes = FALSE;
64 while (_istspace(*p))
65 p++;
66 if (!*p)
67 return FALSE;
68 *pStart = p;
69 while (*p && (InQuotes || !_istspace(*p)))
70 InQuotes ^= (*p++ == _T('"'));
71 *pEnd = p;
72 return TRUE;
73}
74
75/* Execute a single instance of a FOR command */
76/* Just run the command (variable expansion is done in DoDelayedExpansion) */
77#define RunInstance(Cmd) \
78 ExecuteCommandWithEcho((Cmd)->Subcommands)
79
80/* Check if this FOR should be terminated early */
81#define Exiting(Cmd) \
82 /* Someone might have removed our context */ \
83 (bCtrlBreak || (fc != (Cmd)->For.Context))
84/* Take also GOTO jumps into account */
85#define ExitingOrGoto(Cmd) \
86 (Exiting(Cmd) || (bc && bc->current == NULL))
87
88/* Read the contents of a text file into memory,
89 * dynamically allocating enough space to hold it all */
91{
92 SIZE_T Len = 0;
93 SIZE_T AllocLen = 1000;
94
95 LPTSTR Contents = cmd_alloc(AllocLen * sizeof(TCHAR));
96 if (!Contents)
97 {
98 WARN("Cannot allocate memory for Contents!\n");
99 return NULL;
100 }
101
102 while (_fgetts(Buffer, CMDLINE_LENGTH, InputFile))
103 {
104 ULONG_PTR CharsRead = _tcslen(Buffer);
105 while (Len + CharsRead >= AllocLen)
106 {
107 LPTSTR OldContents = Contents;
108 Contents = cmd_realloc(Contents, (AllocLen *= 2) * sizeof(TCHAR));
109 if (!Contents)
110 {
111 WARN("Cannot reallocate memory for Contents!\n");
112 cmd_free(OldContents);
113 return NULL;
114 }
115 }
116 _tcscpy(&Contents[Len], Buffer);
117 Len += CharsRead;
118 }
119
120 Contents[Len] = _T('\0');
121 return Contents;
122}
123
124/* FOR /F: Parse the contents of each file */
126{
127 LPTSTR Delims = _T(" \t");
128 PTCHAR DelimsEndPtr = NULL;
129 TCHAR DelimsEndChr = _T('\0');
130 TCHAR Eol = _T(';');
131 INT SkipLines = 0;
132 DWORD TokensMask = (1 << 1);
133#ifdef MSCMD_FOR_QUIRKS
134 DWORD NumTokens = 1;
135 DWORD RemainderVar = 0;
136#else
137 DWORD NumTokens = 0;
138#endif
139 TCHAR StringQuote = _T('"');
140 TCHAR CommandQuote = _T('\'');
141 LPTSTR Variables[32];
142 PTCHAR Start, End;
143 INT Ret = 0;
144
145 if (Cmd->For.Params)
146 {
147 TCHAR Quote = 0;
148 PTCHAR Param = Cmd->For.Params;
149 if (*Param == _T('"') || *Param == _T('\''))
150 Quote = *Param++;
151
152 while (*Param && *Param != Quote)
153 {
154 if (*Param <= _T(' '))
155 {
156 Param++;
157 }
158 else if (_tcsnicmp(Param, _T("delims="), 7) == 0)
159 {
160 Param += 7;
161 /*
162 * delims=xxx: Specifies the list of characters that separate tokens.
163 * This option does not cumulate: only the latest 'delims=' specification
164 * is taken into account.
165 */
166 Delims = Param;
167 DelimsEndPtr = NULL;
168 while (*Param && *Param != Quote)
169 {
170 if (*Param == _T(' '))
171 {
172 PTCHAR FirstSpace = Param;
173 Param += _tcsspn(Param, _T(" "));
174 /* Exclude trailing spaces if this is not the last parameter */
175 if (*Param && *Param != Quote)
176 {
177 /* Save where the delimiters specification string ends */
178 DelimsEndPtr = FirstSpace;
179 }
180 break;
181 }
182 Param++;
183 }
184 if (*Param == Quote)
185 {
186 /* Save where the delimiters specification string ends */
187 DelimsEndPtr = Param++;
188 }
189 }
190 else if (_tcsnicmp(Param, _T("eol="), 4) == 0)
191 {
192 Param += 4;
193 /* eol=c: Lines starting with this character (may be
194 * preceded by delimiters) are skipped. */
195 Eol = *Param;
196 if (Eol != _T('\0'))
197 Param++;
198 }
199 else if (_tcsnicmp(Param, _T("skip="), 5) == 0)
200 {
201 /* skip=n: Number of lines to skip at the beginning of each file */
202 SkipLines = _tcstol(Param + 5, &Param, 0);
203 if (SkipLines <= 0)
204 goto error;
205 }
206 else if (_tcsnicmp(Param, _T("tokens="), 7) == 0)
207 {
208#ifdef MSCMD_FOR_QUIRKS
209 DWORD NumToksInSpec = 0; // Number of tokens in this specification.
210#endif
211 Param += 7;
212 /*
213 * tokens=x,y,m-n: List of token numbers (must be between 1 and 31)
214 * that will be assigned into variables. This option does not cumulate:
215 * only the latest 'tokens=' specification is taken into account.
216 *
217 * NOTE: In MSCMD_FOR_QUIRKS mode, for Windows' CMD compatibility,
218 * not all the tokens-state is reset. This leads to subtle bugs.
219 */
220 TokensMask = 0;
221#ifdef MSCMD_FOR_QUIRKS
222 NumToksInSpec = 0;
223 // Windows' CMD compatibility: bug: the asterisk-token's position is not reset!
224 // RemainderVar = 0;
225#else
226 NumTokens = 0;
227#endif
228
229 while (*Param && *Param != Quote && *Param != _T('*'))
230 {
231 INT First = _tcstol(Param, &Param, 0);
232 INT Last = First;
233#ifdef MSCMD_FOR_QUIRKS
234 if (First < 1)
235#else
236 if ((First < 1) || (First > 31))
237#endif
238 goto error;
239 if (*Param == _T('-'))
240 {
241 /* It's a range of tokens */
242 Last = _tcstol(Param + 1, &Param, 0);
243#ifdef MSCMD_FOR_QUIRKS
244 /* Ignore the range if the endpoints are not in correct order */
245 if (Last < 1)
246#else
247 if ((Last < First) || (Last > 31))
248#endif
249 goto error;
250 }
251#ifdef MSCMD_FOR_QUIRKS
252 /* Ignore the range if the endpoints are not in correct order */
253 if ((First <= Last) && (Last <= 31))
254 {
255#endif
256 TokensMask |= (2 << Last) - (1 << First);
257#ifdef MSCMD_FOR_QUIRKS
258 NumToksInSpec += (Last - First + 1);
259 }
260#endif
261
262 if (*Param != _T(','))
263 break;
264 Param++;
265 }
266 /* With an asterisk at the end, an additional variable
267 * will be created to hold the remainder of the line
268 * (after the last specified token). */
269 if (*Param == _T('*'))
270 {
271#ifdef MSCMD_FOR_QUIRKS
272 RemainderVar = ++NumToksInSpec;
273#else
274 ++NumTokens;
275#endif
276 Param++;
277 }
278#ifdef MSCMD_FOR_QUIRKS
279 NumTokens = max(NumTokens, NumToksInSpec);
280#endif
281 }
282 else if (_tcsnicmp(Param, _T("useback"), 7) == 0)
283 {
284 Param += 7;
285 /* usebackq: Use alternate quote characters */
286 StringQuote = _T('\'');
287 CommandQuote = _T('`');
288 /* Can be written as either "useback" or "usebackq" */
289 if (_totlower(*Param) == _T('q'))
290 Param++;
291 }
292 else
293 {
294 error:
295 error_syntax(Param);
296 return 1;
297 }
298 }
299 }
300
301#ifdef MSCMD_FOR_QUIRKS
302 /* Windows' CMD compatibility: use the wrongly evaluated number of tokens */
303 fc->varcount = NumTokens;
304 /* Allocate a large enough variables array if needed */
305 if (NumTokens <= ARRAYSIZE(Variables))
306 {
307 fc->values = Variables;
308 }
309 else
310 {
311 fc->values = cmd_alloc(fc->varcount * sizeof(*fc->values));
312 if (!fc->values)
313 {
315 return 1;
316 }
317 }
318#else
319 /* Count how many variables will be set: one for each token,
320 * plus maybe one for the remainder. */
321 fc->varcount = NumTokens;
322 for (NumTokens = 1; NumTokens < 32; ++NumTokens)
323 fc->varcount += (TokensMask >> NumTokens) & 1;
324 fc->values = Variables;
325#endif
326
327 if (*List == StringQuote || *List == CommandQuote)
328 {
329 /* Treat the entire "list" as one single element */
330 Start = List;
331 End = &List[_tcslen(List)];
332 goto single_element;
333 }
334
335 /* Loop over each file */
336 End = List;
337 while (!ExitingOrGoto(Cmd) && GetNextElement(&Start, &End))
338 {
339 FILE* InputFile;
340 LPTSTR FullInput, In, NextLine;
341 INT Skip;
342 single_element:
343
344 if (*Start == StringQuote && End[-1] == StringQuote)
345 {
346 /* Input given directly as a string */
347 End[-1] = _T('\0');
348 FullInput = cmd_dup(Start + 1);
349 }
350 else if (*Start == CommandQuote && End[-1] == CommandQuote)
351 {
352 /*
353 * Read input from a command. We let the CRT do the ANSI/UNICODE conversion.
354 * NOTE: Should we do that, or instead read in binary mode and
355 * do the conversion by ourselves, using *OUR* current codepage??
356 */
357 End[-1] = _T('\0');
358 InputFile = _tpopen(Start + 1, _T("r"));
359 if (!InputFile)
360 {
362 Ret = 1;
363 goto Quit;
364 }
365 FullInput = ReadFileContents(InputFile, Buffer);
366 _pclose(InputFile);
367 }
368 else
369 {
370 /* Read input from a file */
371 TCHAR Temp = *End;
372 *End = _T('\0');
374 InputFile = _tfopen(Start, _T("r"));
375 *End = Temp;
376 if (!InputFile)
377 {
379 Ret = 1;
380 goto Quit;
381 }
382 FullInput = ReadFileContents(InputFile, Buffer);
383 fclose(InputFile);
384 }
385
386 if (!FullInput)
387 {
389 Ret = 1;
390 goto Quit;
391 }
392
393 /* Patch the delimiters string */
394 if (DelimsEndPtr)
395 {
396 DelimsEndChr = *DelimsEndPtr;
397 *DelimsEndPtr = _T('\0');
398 }
399
400 /* Loop over the input line by line */
401 for (In = FullInput, Skip = SkipLines;
402 !ExitingOrGoto(Cmd) && (In != NULL);
403 In = NextLine)
404 {
405 DWORD RemainingTokens = TokensMask;
406 LPTSTR* CurVar = fc->values;
407
408 ZeroMemory(fc->values, fc->varcount * sizeof(*fc->values));
409#ifdef MSCMD_FOR_QUIRKS
410 NumTokens = fc->varcount;
411#endif
412
413 NextLine = _tcschr(In, _T('\n'));
414 if (NextLine)
415 *NextLine++ = _T('\0');
416
417 if (--Skip >= 0)
418 continue;
419
420 /* Ignore lines where the first token starts with the eol character */
421 In += _tcsspn(In, Delims);
422 if (*In == Eol)
423 continue;
424
425 /* Loop as long as we have not reached the end of
426 * the line, and that we have tokens available.
427 * A maximum of 31 tokens will be enumerated. */
428 while (*In && ((RemainingTokens >>= 1) != 0))
429 {
430 /* Save pointer to this token in a variable if requested */
431 if (RemainingTokens & 1)
432 {
433#ifdef MSCMD_FOR_QUIRKS
434 --NumTokens;
435#endif
436 *CurVar++ = In;
437 }
438 /* Find end of token */
439 In += _tcscspn(In, Delims);
440 /* NULL-terminate it and advance to next token */
441 if (*In)
442 {
443 *In++ = _T('\0');
444 In += _tcsspn(In, Delims);
445 }
446 }
447
448 /* Save pointer to remainder of the line if we need to do so */
449 if (*In)
450#ifdef MSCMD_FOR_QUIRKS
451 if (RemainderVar && (fc->varcount - NumTokens + 1 == RemainderVar))
452#endif
453 {
454 /* NOTE: This sets fc->values[0] at least, if no tokens
455 * were initialized so far, since CurVar is initialized
456 * originally to point to fc->values. */
457 *CurVar = In;
458 }
459
460 /* Don't run unless we have at least one variable filled */
461 if (fc->values[0])
462 Ret = RunInstance(Cmd);
463 }
464
465 /* Restore the delimiters string */
466 if (DelimsEndPtr)
467 *DelimsEndPtr = DelimsEndChr;
468
469 cmd_free(FullInput);
470 }
471
472Quit:
473#ifdef MSCMD_FOR_QUIRKS
474 if (fc->values && (fc->values != Variables))
476#endif
477 fc->values = NULL;
478
479 return Ret;
480}
481
482/* FOR /L: Do a numeric loop */
484{
485 enum { START, STEP, END };
486 INT params[3] = { 0, 0, 0 };
487 INT i;
488 INT Ret = 0;
489 TCHAR *Start, *End = List;
490
491 for (i = 0; i < 3 && GetNextElement(&Start, &End); ++i)
492 params[i] = _tcstol(Start, NULL, 0);
493
494 i = params[START];
495 /*
496 * Windows' CMD compatibility:
497 * Contrary to the other FOR-loops, FOR /L does not check
498 * whether a GOTO has been done, and will continue to loop.
499 */
500 while (!Exiting(Cmd) &&
501 (params[STEP] >= 0 ? (i <= params[END]) : (i >= params[END])))
502 {
503 _itot(i, Buffer, 10);
504 Ret = RunInstance(Cmd);
505 i += params[STEP];
506 }
507
508 return Ret;
509}
510
511/* Process a FOR in one directory. Stored in Buffer (up to BufPos) is a
512 * string which is prefixed to each element of the list. In a normal FOR
513 * it will be empty, but in FOR /R it will be the directory name. */
515{
516 INT Ret = 0;
517 TCHAR *Start, *End = List;
518
519 while (!ExitingOrGoto(Cmd) && GetNextElement(&Start, &End))
520 {
521 if (BufPos + (End - Start) > &Buffer[CMDLINE_LENGTH])
522 continue;
523 memcpy(BufPos, Start, (End - Start) * sizeof(TCHAR));
524 BufPos[End - Start] = _T('\0');
525
526 if (_tcschr(BufPos, _T('?')) || _tcschr(BufPos, _T('*')))
527 {
528 WIN32_FIND_DATA w32fd;
529 HANDLE hFind;
530 TCHAR *FilePart;
531
532 StripQuotes(BufPos);
533 hFind = FindFirstFile(Buffer, &w32fd);
534 if (hFind == INVALID_HANDLE_VALUE)
535 continue;
536 FilePart = _tcsrchr(BufPos, _T('\\'));
537 FilePart = FilePart ? FilePart + 1 : BufPos;
538 do
539 {
540 if (w32fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
541 continue;
542 if (!(w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
543 != !(Cmd->For.Switches & FOR_DIRS))
544 continue;
545 if (_tcscmp(w32fd.cFileName, _T(".")) == 0 ||
546 _tcscmp(w32fd.cFileName, _T("..")) == 0)
547 continue;
548 _tcscpy(FilePart, w32fd.cFileName);
549 Ret = RunInstance(Cmd);
550 } while (!ExitingOrGoto(Cmd) && FindNextFile(hFind, &w32fd));
551 FindClose(hFind);
552 }
553 else
554 {
555 Ret = RunInstance(Cmd);
556 }
557 }
558 return Ret;
559}
560
561/* FOR /R: Process a FOR in each directory of a tree, recursively */
563{
564 INT Ret = 0;
565 HANDLE hFind;
566 WIN32_FIND_DATA w32fd;
567
568 if (BufPos[-1] != _T('\\'))
569 {
570 *BufPos++ = _T('\\');
571 *BufPos = _T('\0');
572 }
573
574 Ret = ForDir(Cmd, List, Buffer, BufPos);
575
576 /* NOTE (We don't apply Windows' CMD compatibility here):
577 * Windows' CMD does not check whether a GOTO has been done,
578 * and will continue to loop. */
579 if (ExitingOrGoto(Cmd))
580 return Ret;
581
582 _tcscpy(BufPos, _T("*"));
583 hFind = FindFirstFile(Buffer, &w32fd);
584 if (hFind == INVALID_HANDLE_VALUE)
585 return Ret;
586 do
587 {
588 if (!(w32fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
589 continue;
590 if (_tcscmp(w32fd.cFileName, _T(".")) == 0 ||
591 _tcscmp(w32fd.cFileName, _T("..")) == 0)
592 continue;
593 Ret = ForRecursive(Cmd, List, Buffer, _stpcpy(BufPos, w32fd.cFileName));
594
595 /* NOTE (We don't apply Windows' CMD compatibility here):
596 * Windows' CMD does not check whether a GOTO has been done,
597 * and will continue to loop. */
598 } while (!ExitingOrGoto(Cmd) && FindNextFile(hFind, &w32fd));
599 FindClose(hFind);
600
601 return Ret;
602}
603
604INT
606{
607 INT Ret;
608 LPTSTR List;
609 PFOR_CONTEXT lpNew;
610 TCHAR Buffer[CMDLINE_LENGTH]; /* Buffer to hold the variable value */
611 LPTSTR BufferPtr = Buffer;
612
613 List = DoDelayedExpansion(Cmd->For.List);
614 if (!List)
615 return 1;
616
617 /* Create our FOR context */
618 lpNew = cmd_alloc(sizeof(FOR_CONTEXT));
619 if (!lpNew)
620 {
621 WARN("Cannot allocate memory for lpNew!\n");
622 cmd_free(List);
623 return 1;
624 }
625 lpNew->prev = fc;
626 lpNew->firstvar = Cmd->For.Variable;
627 lpNew->varcount = 1;
628 lpNew->values = &BufferPtr;
629
630 Cmd->For.Context = lpNew;
631 fc = lpNew;
632
633 /* Run the extended FOR syntax only if extensions are enabled */
635 {
636 if (Cmd->For.Switches & FOR_F)
637 {
638 Ret = ForF(Cmd, List, Buffer);
639 }
640 else if (Cmd->For.Switches & FOR_LOOP)
641 {
642 Ret = ForLoop(Cmd, List, Buffer);
643 }
644 else if (Cmd->For.Switches & FOR_RECURSIVE)
645 {
646 DWORD Len = GetFullPathName(Cmd->For.Params ? Cmd->For.Params : _T("."),
648 Ret = ForRecursive(Cmd, List, Buffer, &Buffer[Len]);
649 }
650 else
651 {
652 Ret = ForDir(Cmd, List, Buffer, Buffer);
653 }
654 }
655 else
656 {
657 Ret = ForDir(Cmd, List, Buffer, Buffer);
658 }
659
660 /* Remove our context, unless someone already did that */
661 if (fc == lpNew)
662 fc = lpNew->prev;
663
664 cmd_free(lpNew);
665 cmd_free(List);
666 return Ret;
667}
668
669/* EOF */
WCHAR First[]
Definition: FormatMessage.c:11
#define CMDLINE_LENGTH
Definition: help.h:12
PTSTR DoDelayedExpansion(IN PCTSTR Line)
Definition: cmd.c:1640
LPTSTR _stpcpy(LPTSTR, LPCTSTR)
Definition: misc.c:474
VOID ParseErrorEx(IN PCTSTR s)
Definition: parser.c:227
VOID error_bad_command(PCTSTR s)
#define FOR_F
Definition: cmd.h:236
VOID error_out_of_memory(VOID)
Definition: error.c:138
#define FOR_LOOP
Definition: cmd.h:237
#define FOR_DIRS
Definition: cmd.h:235
#define FOR_RECURSIVE
Definition: cmd.h:238
VOID error_syntax(PCTSTR s)
VOID error_sfile_not_found(PCTSTR s)
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
Definition: console.c:178
#define debugstr_aw
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: precomp.h:61
#define STRING_FOR_HELP1
Definition: resource.h:129
Definition: bufpool.h:45
static VOID StripQuotes(LPSTR in)
Definition: cmdcons.c:116
#define cmd_realloc(ptr, size)
Definition: cmddbg.h:30
#define cmd_free(ptr)
Definition: cmddbg.h:31
#define cmd_alloc(size)
Definition: cmddbg.h:29
#define cmd_dup(str)
Definition: cmddbg.h:32
#define Len
Definition: deflate.h:82
@ In
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
int CDECL fclose(FILE *file)
Definition: file.c:3757
_ACRTIMP int __cdecl _pclose(FILE *)
Definition: process.c:1212
#define END()
Definition: resources.c:584
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ExitingOrGoto(Cmd)
Definition: for.c:85
static LPTSTR ReadFileContents(FILE *InputFile, TCHAR *Buffer)
Definition: for.c:90
INT cmd_for(LPTSTR param)
Definition: for.c:41
static INT ForLoop(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer)
Definition: for.c:483
#define RunInstance(Cmd)
Definition: for.c:77
static INT ForDir(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer, TCHAR *BufPos)
Definition: for.c:514
static INT ForF(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer)
Definition: for.c:125
#define Exiting(Cmd)
Definition: for.c:81
static BOOL GetNextElement(TCHAR **pStart, TCHAR **pEnd)
Definition: for.c:60
INT ExecuteFor(PARSED_COMMAND *Cmd)
Definition: for.c:605
PFOR_CONTEXT fc
Definition: for.c:57
static INT ForRecursive(PARSED_COMMAND *Cmd, LPTSTR List, TCHAR *Buffer, TCHAR *BufPos)
Definition: for.c:562
return pTarget Start()
GLenum const GLfloat * params
Definition: glext.h:5645
GLfloat GLfloat p
Definition: glext.h:8902
GLfloat param
Definition: glext.h:5796
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define _istspace
Definition: tchar.h:1504
#define _tcscmp
Definition: tchar.h:1424
#define _tcscpy
Definition: tchar.h:623
#define _itot
Definition: tchar.h:608
#define _fgetts
Definition: tchar.h:565
#define _tcsncmp
Definition: tchar.h:1428
#define _tpopen
Definition: tchar.h:698
#define _tcscspn
Definition: tchar.h:1407
#define _tcstol
Definition: tchar.h:594
#define _tcsspn
Definition: tchar.h:1414
#define _tcschr
Definition: tchar.h:1406
#define _totlower
Definition: tchar.h:1511
#define ZeroMemory
Definition: minwinbase.h:31
#define error(str)
Definition: mkdosfs.c:1605
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define _tcsrchr
Definition: utility.h:116
#define STEP
Definition: msg.c:14392
BOOL bEnableExtensions
Definition: more.c:52
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
char * PTCHAR
Definition: ntbasedef.h:488
#define START
Definition: patmatch.h:63
@ Cmd
Definition: sacdrv.h:278
ULONG SkipLines(VOID)
Definition: parser.c:275
BOOLEAN NextLine(PCHAR LineBuffer, ULONG BufferSize, FILE *File)
Definition: parser.c:230
STDMETHOD() Skip(THIS_ ULONG celt) PURE
#define TRACE(s)
Definition: solgame.cpp:4
LPTSTR * values
Definition: batch.h:50
UINT varcount
Definition: batch.h:49
TCHAR firstvar
Definition: batch.h:48
struct _FOR_CONTEXT * prev
Definition: batch.h:47
#define max(a, b)
Definition: svc.c:63
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define _T(x)
Definition: vfdio.h:22
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
#define FindNextFile
Definition: winbase.h:3537
#define FindFirstFile
Definition: winbase.h:3531
#define GetFullPathName
Definition: winbase.h:3570
char TCHAR
Definition: xmlstorage.h:189
#define _tfopen
Definition: xmlstorage.h:196
#define _tcsnicmp
Definition: xmlstorage.h:207
CHAR * LPTSTR
Definition: xmlstorage.h:192
#define _tcslen
Definition: xmlstorage.h:198