Go to the source code of this file.
|
static BOOL | seta_eval (LPCTSTR expr) |
|
static LPCTSTR | skip_ws (LPCTSTR p) |
|
static LPTSTR | GetQuotedString (TCHAR *p) |
|
INT | cmd_set (LPTSTR param) |
|
static INT | ident_len (LPCTSTR p) |
|
static INT | seta_identval (LPCTSTR ident) |
|
static BOOL | calc (INT *lval, TCHAR op, INT rval) |
|
static BOOL | seta_stmt (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_unaryTerm (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_mulTerm (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_ltorTerm (LPCTSTR *p_, INT *result, LPCTSTR ops, BOOL(*subTerm)(LPCTSTR *, INT *)) |
|
static BOOL | seta_addTerm (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_logShiftTerm (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_bitAndTerm (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_bitExclOrTerm (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_bitOrTerm (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_expr (LPCTSTR *p_, INT *result) |
|
static BOOL | seta_assignment (LPCTSTR *p_, INT *result) |
|
◆ ENV_BUFFER_SIZE
Definition at line 42 of file set.c.
◆ PARSE_IDENT
Value:do { \
} while (0)
static INT ident_len(LPCTSTR p)
_In_ ULONG _In_ ULONG_PTR ident
Definition at line 278 of file set.c.
◆ calc()
Definition at line 298 of file set.c.
299{
301 {
302 case '*':
304 break;
305
306 case '/':
307 {
309 {
313 }
315 break;
316 }
317
318 case '%':
319 {
321 {
325 }
327 break;
328 }
329
330 case '+':
332 break;
333 case '-':
335 break;
336 case '&':
338 break;
339 case '^':
341 break;
342 case '|':
344 break;
345
346 default:
350 }
352}
#define ConErrResPuts(uID)
#define STRING_INVALID_OPERAND
#define STRING_ERROR_DIVISION_BY_ZERO
◆ cmd_set()
Definition at line 72 of file set.c.
73{
78
80 {
82 return 0;
83 }
84
86
87
89 {
91 if (lpEnv)
92 {
93 lpOutput = lpEnv;
94 while (*lpOutput)
95 {
96
97 if (*lpOutput !=
_T(
'='))
98 {
101 }
102 lpOutput +=
_tcslen(lpOutput) + 1;
103 }
105 }
106
107 retval = 0;
108 goto Quit;
109 }
110
111
113 {
115
116
117
119
123 {
124#if 0
125
126 retval = 9165;
127#endif
130 }
131 else
132 {
133 retval = 0;
134 }
135 goto Quit;
136 }
137
139 {
144 {
146 retval = 1;
147 goto Quit;
148 }
149
153
155 {
156 retval = 1;
157 goto Quit;
158 }
159 retval = 0;
160 goto Quit;
161 }
162
164
167 {
168
170 {
171
173 retval = 1;
174 goto Quit;
175 }
176
178
179#ifdef FEATURE_DYNAMIC_TRACE
180
183#endif
184
186 {
187 retval = 1;
188 goto Quit;
189 }
190 }
191 else
192 {
193
197
198
199
200
201
202
203
204
205
206
207
208
211
212
214 bRestoreSpace = (
p !=
NULL);
218
220 if (lpEnv)
221 {
222 lpOutput = lpEnv;
223 while (*lpOutput)
224 {
225
226 if (!
_tcsnicmp(lpOutput, pOrgParam,
p - pOrgParam) ||
228 {
232 }
233 lpOutput +=
_tcslen(lpOutput) + 1;
234 }
236 }
237
238
239
240 if (bRestoreSpace)
242
243 if (!bFound)
244 {
246 retval = 1;
247 goto Quit;
248 }
249 }
250
251Quit:
253 {
254 if (retval != 0)
256 }
257 else
258 {
260 }
261
262 return retval;
263}
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
#define ConOutPrintf(szStr,...)
#define ConErrResPrintf(uID,...)
#define ConOutPuts(szStr)
#define STRING_SYNTAX_COMMAND_INCORRECT
#define STRING_SET_ENV_ERROR
static VOID StripQuotes(LPSTR in)
static VOID ConInString(LPWSTR lpInput, DWORD dwLength)
static BOOL seta_eval(LPCTSTR expr)
static LPTSTR GetQuotedString(TCHAR *p)
static LPCTSTR skip_ws(LPCTSTR p)
#define FreeEnvironmentStrings
LPSTR WINAPI GetEnvironmentStrings(void)
#define SetEnvironmentVariable
◆ GetQuotedString()
◆ ident_len()
◆ seta_addTerm()
Definition at line 494 of file set.c.
495{
497}
static BOOL seta_mulTerm(LPCTSTR *p_, INT *result)
static BOOL seta_ltorTerm(LPCTSTR *p_, INT *result, LPCTSTR ops, BOOL(*subTerm)(LPCTSTR *, INT *))
Referenced by seta_logShiftTerm().
◆ seta_assignment()
Definition at line 582 of file set.c.
583{
587 INT identlen, exprval;
588
590 if (identlen)
591 {
593
594
596 {
599 }
600
602 {
604
605
608 {
610 goto evaluate;
611 }
612
613
615 }
616
618 {
620
621
624 {
626 goto evaluate;
627 }
628
629
632 {
634 goto evaluate;
635 }
636
637
639 }
640 }
641
642evaluate:
643
645 {
648
651
653
655 {
656
657 case '=':
658 identval = exprval;
659 break;
660
661
662 case '<':
663 {
664
665
666 if (exprval < 0 || exprval >= (8 * sizeof(identval)))
667 identval = 0;
668 else
669 identval <<= exprval;
670 break;
671 }
672
673
674 case '>':
675 identval >>= exprval;
676 break;
677
678
679 default:
680 if (!
calc(&identval,
op, exprval))
682 }
683
687 exprval = identval;
688 }
689 else
690 {
691
695 }
696
700}
GLenum GLuint GLenum GLsizei const GLchar * buf
static INT seta_identval(LPCTSTR ident)
static BOOL seta_assignment(LPCTSTR *p_, INT *result)
static BOOL seta_expr(LPCTSTR *p_, INT *result)
#define PARSE_IDENT(ident, identlen, p)
Referenced by seta_assignment(), and seta_stmt().
◆ seta_bitAndTerm()
Definition at line 506 of file set.c.
507{
510
511
514
515
517 {
520
521
524 break;
525
526
528
529
532
533
535 {
536 case '<':
537 {
538
539
540 if (rval < 0 || rval >= (8 * sizeof(lval)))
541 lval = 0;
542 else
544 break;
545 }
546
547 case '>':
549 break;
550
551 default:
555 }
556 }
557
561}
static BOOL seta_logShiftTerm(LPCTSTR *p_, INT *result)
Referenced by seta_bitExclOrTerm().
◆ seta_bitExclOrTerm()
Definition at line 564 of file set.c.
565{
567}
static BOOL seta_bitAndTerm(LPCTSTR *p_, INT *result)
Referenced by seta_bitOrTerm().
◆ seta_bitOrTerm()
Definition at line 570 of file set.c.
571{
573}
static BOOL seta_bitExclOrTerm(LPCTSTR *p_, INT *result)
Referenced by seta_expr().
◆ seta_eval()
Definition at line 726 of file set.c.
727{
729
731 {
735 }
738
739
741 {
745 }
746
747
750
752}
static BOOL seta_stmt(LPCTSTR *p_, INT *result)
Referenced by cmd_set().
◆ seta_expr()
Definition at line 576 of file set.c.
577{
579}
static BOOL seta_bitOrTerm(LPCTSTR *p_, INT *result)
Referenced by seta_assignment().
◆ seta_identval()
◆ seta_logShiftTerm()
Definition at line 500 of file set.c.
501{
503}
static BOOL seta_addTerm(LPCTSTR *p_, INT *result)
Referenced by seta_bitAndTerm().
◆ seta_ltorTerm()
◆ seta_mulTerm()
Definition at line 419 of file set.c.
420{
424
426 {
429
432
434 {
435 case '!':
437 break;
438 case '~':
440 break;
441 case '-':
443 break;
444#if 0
445 case '+':
447 break;
448#endif
449 }
450 }
451 else
452 {
455 }
456
460}
static BOOL seta_unaryTerm(LPCTSTR *p_, INT *result)
Referenced by seta_addTerm(), and seta_mulTerm().
◆ seta_stmt()
◆ seta_unaryTerm()
Definition at line 358 of file set.c.
359{
362
364 {
369 {
373 }
375 }
377 {
380
381
383 {
387 }
388
389
390
391
392
394 {
398 }
400 }
402 {
407 }
408 else
409 {
413 }
416}
#define STRING_ERROR_INVALID_NUMBER2
#define STRING_EXPECTED_CLOSE_PAREN
#define STRING_ERROR_INVALID_NUMBER1
#define STRING_EXPECTED_NUMBER_OR_VARIABLE
Referenced by seta_mulTerm().
◆ skip_ws()
Definition at line 48 of file set.c.
49{
50 while (*
p && *
p <=
_T(
' '))
53}
Referenced by cmd_set(), findend(), GetQuotedString(), import_file(), process_preprocessor(), seta_assignment(), seta_bitAndTerm(), seta_ltorTerm(), seta_mulTerm(), seta_stmt(), seta_unaryTerm(), and tokenize().