Lines Matching refs:pp

72 	if (a = (struct pplist*)hashget(pp.prdtab, pred))  in assert()
94 hashput(pp.prdtab, pred, a); in assert()
95 if (sym = ppsymref(pp.symtab, pred)) in assert()
105 hashput(pp.prdtab, NiL, p); in assert()
107 if ((pp.state & COMPILE) && pp.truncate) return; in assert()
108 if (sym = ppsymset(pp.symtab, pred)) in assert()
136 pp.state &= ~NOSPACE; in tokop()
138 pp.state |= NOSPACE; in tokop()
141 ppop(op, (flags & TOKOP_DUP) ? strdup(pp.token) : pp.token, n); in tokop()
166 error(2, "%s: invalid macro name", pptokstr(pp.token, 0)); in macsym()
169 sym = pprefmac(pp.token, REF_CREATE); in macsym()
170 if ((sym->flags & SYM_FINAL) && (pp.mode & HOSTED)) return 0; in macsym()
173 if (!(pp.option & ALLPOSSIBLE)) in macsym()
196 restore = pp.state & (NOSPACE|STRIP); in getline()
197 pp.state &= ~(NEWLINE|NOSPACE|STRIP); in getline()
198 pp.state |= EOF2NL; in getline()
207 disable = (c == T_ID && streq(pp.token, pp.pass)) ? 2 : 0; in getline()
212 pp.state |= DISABLE; in getline()
215 s = pp.token; in getline()
230 pp.state &= ~(NOSPACE|STRIP); in getline()
231 pp.state |= restore; in getline()
310 if (pp.state & SKIPCONTROL) pp.level--; in ppcontrol()
311 restore = (pp.state & RESTORE)|NEWLINE; in ppcontrol()
312 if (pp.state & PASSTHROUGH) restore |= DISABLE; in ppcontrol()
314 pp.state &= ~(NEWLINE|RESTORE|SKIPCONTROL); in ppcontrol()
315 pp.state |= DIRECTIVE|DISABLE|EOF2NL|NOSPACE|NOVERTICAL; in ppcontrol()
317 …if ((pp.state & (COMPATIBILITY|STRICT)) == COMPATIBILITY || (pp.mode & HOSTED)) pp.state &= ~NOVER… in ppcontrol()
319 if (pp.mode & HOSTED) pp.state &= ~NOVERTICAL; in ppcontrol()
325 if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
330 switch (directive = (int)hashref(pp.dirtab, pp.token)) in ppcontrol()
334 if ((pp.option & ALLPOSSIBLE) && !pp.in->prev->prev) in ppcontrol()
336 if (pp.control <= pp.in->control) in ppcontrol()
341 if (pp.control == (pp.in->control + 1)) pp.in->flags |= IN_noguard; in ppcontrol()
342 if (*pp.control & HADELSE) in ppcontrol()
345 *pp.control |= SKIP; in ppcontrol()
348 if (*pp.control & KEPT) in ppcontrol()
350 *pp.control |= SKIP; in ppcontrol()
355 *pp.control &= ~SKIP; in ppcontrol()
361 *pp.control &= ~SKIP; in ppcontrol()
362 *pp.control |= KEPT; in ppcontrol()
364 else *pp.control |= SKIP; in ppcontrol()
365 c = (pp.state & NEWLINE) ? '\n' : ' '; in ppcontrol()
368 if ((pp.option & ALLPOSSIBLE) && !pp.in->prev->prev) in ppcontrol()
370 …if ((pp.option & ELSEIF) && (c = pplex()) == T_ID && ((n = (int)hashref(pp.dirtab, pp.token)) == I… in ppcontrol()
376 … if (pp.control <= pp.in->control) error(2, "no matching #%s for #%s", dirname(IF), dirname(ELSE)); in ppcontrol()
379 if (pp.control == (pp.in->control + 1)) pp.in->flags |= IN_noguard; in ppcontrol()
380 if (!(*pp.control & KEPT)) in ppcontrol()
382 *pp.control &= ~SKIP; in ppcontrol()
383 *pp.control |= HADELSE|KEPT; in ppcontrol()
387 if (*pp.control & HADELSE) error(2, "more than one #%s for #%s", dirname(ELSE), dirname(IF)); in ppcontrol()
388 *pp.control |= HADELSE|SKIP; in ppcontrol()
393 if ((pp.option & ALLPOSSIBLE) && !pp.in->prev->prev) in ppcontrol()
395 …if (pp.control <= pp.in->control) error(2, "no matching #%s for #%s", dirname(IF), dirname(ENDIF)); in ppcontrol()
396 else if (--pp.control == pp.in->control && pp.in->symbol) in ppcontrol()
398 if (pp.in->flags & IN_endguard) pp.in->flags |= IN_noguard; in ppcontrol()
401 pp.in->flags &= ~IN_tokens; in ppcontrol()
402 pp.in->flags |= IN_endguard; in ppcontrol()
409 if ((pp.option & ALLPOSSIBLE) && !pp.in->prev->prev) in ppcontrol()
412 SETIFBLOCK(pp.control); in ppcontrol()
413 if (*pp.control & SKIP) in ppcontrol()
415 *pp.control |= KEPT; in ppcontrol()
422 sym = pprefmac(pp.token, REF_IF); in ppcontrol()
423 if (directive == IFNDEF && pp.control == pp.in->control + 1) in ppcontrol()
425 if (pp.in->flags & (IN_defguard|IN_endguard)) in ppcontrol()
426 pp.in->flags |= IN_noguard; in ppcontrol()
429 pp.in->flags |= IN_defguard; in ppcontrol()
430 if (!(pp.in->flags & IN_tokens)) in ppcontrol()
431 pp.in->symbol = sym ? sym : pprefmac(pp.token, REF_CREATE); in ppcontrol()
438 if (!(pp.mode & HOSTED)) in ppcontrol()
439 error(1, "%s: invalid macro name", pptokstr(pp.token, 0)); in ppcontrol()
441 *pp.control |= ((sym != 0) == (directive == IFDEF)) ? KEPT : SKIP; in ppcontrol()
444 if (*pp.control & SKIP) in ppcontrol()
446 pp.state |= HEADER; in ppcontrol()
448 pp.state &= ~HEADER; in ppcontrol()
451 pp.state &= ~DISABLE; in ppcontrol()
452 pp.state |= HEADER|STRIP; in ppcontrol()
453 pp.in->flags |= IN_noguard; in ppcontrol()
457 p = pp.token; in ppcontrol()
458 do pp.token = pp.toknxt; while ((c = pplex()) == T_STRING); in ppcontrol()
459 *pp.token = 0; in ppcontrol()
460 pp.token = p; in ppcontrol()
464 if (!*pp.token) in ppcontrol()
469 if (*pp.token == '/' && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
470 error(1, "#%s: reference to %s is not portable", dirname(INCLUDE), pp.token); in ppcontrol()
471 n = ppsearch(pp.token, c, SEARCH_INCLUDE); in ppcontrol()
478 if (!(p = pp.hdrbuf) && !(p = pp.hdrbuf = newof(0, char, MAXTOKEN, 0))) in ppcontrol()
480 pp.state &= ~NOSPACE; in ppcontrol()
484 STRCOPY(p, pp.token, s); in ppcontrol()
485 if (p == v && *(p - 1) == ' ' && pp.in->type != IN_MACRO) in ppcontrol()
488 pp.state |= NOSPACE; in ppcontrol()
490 memcpy(pp.token, pp.hdrbuf, p - pp.hdrbuf); in ppcontrol()
503 p = pp.valbuf; in ppcontrol()
505 STRCOPY(p, pp.token, s); in ppcontrol()
507 pp.mode |= EXPOSE; in ppcontrol()
508 pp.state |= HEADER; in ppcontrol()
509 p6 = getline(p, &pp.valbuf[MAXTOKEN], 0); in ppcontrol()
510 pp.state &= ~HEADER; in ppcontrol()
511 pp.mode &= ~EXPOSE; in ppcontrol()
515 error(2, "%s: directive too long", pp.valbuf); in ppcontrol()
523 p = pp.valbuf; in ppcontrol()
526 for (map = (struct map*)pp.maps; map; map = map->next) in ppcontrol()
540 if ((pp.state & (STRICT|WARN)) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
543 if (!(pp.state & WARN) || strcmp(p + 1, dirname(PRAGMA))) in ppcontrol()
547 if (!(*pp.control & SKIP)) in ppcontrol()
577 if (directive != PRAGMA && (!(*pp.control & SKIP) || !(pp.mode & (HOSTED|RELAX)))) in ppcontrol()
580 error(1, "%s: unknown directive", pptokstr(pp.valbuf, 0)); in ppcontrol()
584 …if (!(*pp.control & SKIP) && pp.pragma && !(pp.state & NOTEXT) && (directive == PRAGMA || !(pp.mod… in ppcontrol()
592 p5 = strcpy(pp.tmpbuf, p5); in ppcontrol()
603 if (p = (char*)memchr(pp.valbuf + 1, MARK, p6 - pp.valbuf - 1)) in ppcontrol()
617 (*pp.pragma)(pp.valbuf + 1, p1, p3, p5, (pp.state & COMPILE) || (pp.mode & INIT) != 0); in ppcontrol()
625 if (*pp.control & SKIP) goto eatdirective; in ppcontrol()
636 if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
637 error(1, "#%s: non-standard directive", pp.token); in ppcontrol()
653 if (pp.truncate) in ppcontrol()
654 ppfsm(FSM_MACRO, pp.token); in ppcontrol()
656 if ((pp.option & ALLPOSSIBLE) && !pp.in->prev->prev && mac->value) in ppcontrol()
670 pp.state &= ~NOSPACE; in ppcontrol()
671 pp.state |= DEFINITION|NOEXPAND; in ppcontrol()
676 pp.state |= NOSPACE; in ppcontrol()
678 if (pp.option & KEYARGS) in ppcontrol()
688 STRAPP(p, pp.token, s); in ppcontrol()
694 else error(2, "%s: formal argument %s ignored", sym->name, pp.token); in ppcontrol()
705 pp.state &= ~NOSPACE; in ppcontrol()
734 STRCOPY(p, pp.token, s); in ppcontrol()
750 pp.state |= NOSPACE; in ppcontrol()
765 if ((pp.state & COMPATIBILITY) && c == ',') in ppcontrol()
767 if ((pp.state & WARN) && !(pp.mode & HOSTED)) in ppcontrol()
777 error(2, "%s: %s: duplicate macro formal argument", sym->name, pp.token); in ppcontrol()
783 v = pp.token; in ppcontrol()
805 if ((pp.state & COMPATIBILITY) && c == ',') in ppcontrol()
807 if ((pp.state & WARN) && !(pp.mode & HOSTED)) in ppcontrol()
818 error(2, "%s: %s: duplicate macro formal argument", sym->name, pp.token); in ppcontrol()
841 pp.state |= NOEXPAND|NOSPACE; in ppcontrol()
843 pp.state |= NOEXPAND; in ppcontrol()
859 pp.state &= ~NOSPACE; in ppcontrol()
875 n3 = pp.state; in ppcontrol()
877 if ((pp.option & PLUSPLUS) && (pp.state & (COMPATIBILITY|TRANSITION)) != COMPATIBILITY) in ppcontrol()
898 if (streq(formargs[c], pp.token)) in ppcontrol()
901 if (!(pp.state & COMPATIBILITY)) in ppcontrol()
903 …if (var.type != TOK_TOKCAT && p > mac->value && *(p - 1) != ' ' && !(pp.option & PRESERVE)) *p++ =… in ppcontrol()
906 if ((pp.state & (COMPATIBILITY|TRANSITION)) == COMPATIBILITY) *p++ = 'C'; in ppcontrol()
911 …if ((pp.state & WARN) && !(pp.mode & (HOSTED|RELAX)) && var.type != TOK_TOKCAT && !(var.type & TOK… in ppcontrol()
913 s = pp.in->nextchr; in ppcontrol()
926 …mal should be parenthesized in macro value (t=%x o=%#c c=%#c)", sym->name, pp.token, var.type, o, … in ppcontrol()
933 if (var.type == TOK_BUILTIN) switch ((int)hashget(pp.strtab, pp.token)) in ppcontrol()
940 else if (pp.hiding && (var.symbol = ppsymref(pp.symtab, pp.token)) && var.symbol->hidden) in ppcontrol()
942 for (var.inp = pp.in; var.inp->type != IN_FILE && var.inp->prev; var.inp = var.inp->prev); in ppcontrol()
943 p += sfsprintf(p, MAXTOKEN, "_%d_%s_hIDe", var.inp->hide, pp.token); in ppcontrol()
956 pp.state |= NOSPACE; in ppcontrol()
964 pp.state &= ~NOSPACE; in ppcontrol()
967 if (streq(formargs[c], pp.token)) in ppcontrol()
976 pp.state &= ~NOEXPAND; in ppcontrol()
977 switch ((int)hashref(pp.dirtab, pp.token)) in ppcontrol()
995 if (pp.state & COMPATIBILITY) *p++ = '#'; in ppcontrol()
1002 if (p > mac->value && ppisidig(*(p - 1)) && !(pp.option & PRESERVE)) *p++ = ' '; in ppcontrol()
1010 if (p <= mac->value) error(2, "%s lhs operand omitted", pp.token); in ppcontrol()
1016 pp.state |= NOSPACE; in ppcontrol()
1018 pp.state &= ~NOSPACE; in ppcontrol()
1023 if (*pp.token == '#') in ppcontrol()
1040 pp.state &= ~NOEXPAND; in ppcontrol()
1042 if (strchr(pp.token, MARK)) pp.state &= ~NOEXPAND; in ppcontrol()
1046 if ((sym->flags & SYM_FUNCTION) && (pp.state & (COMPATIBILITY|TRANSITION))) in ppcontrol()
1050 s = pp.token; in ppcontrol()
1066 … if (!(pp.mode & HOSTED) && (!(pp.state & COMPATIBILITY) || (pp.state & WARN))) switch (*pp.token) in ppcontrol()
1091 if (pp.state & EOF2NL) in ppcontrol()
1094 pp.state |= HIDDEN; in ppcontrol()
1095 pp.hidden++; in ppcontrol()
1101 pp.state |= EOF2NL; in ppcontrol()
1111 if (pp.state & COMPATIBILITY) var.type = 0; in ppcontrol()
1112 if (pp.option & PRESERVE) break; in ppcontrol()
1123 if (pp.state & WARN) error(1, "use the ## operator to concatenate macro arguments"); in ppcontrol()
1129 if (pp.option & PRESERVE) break; in ppcontrol()
1134 pp.state &= ~NOEXPAND; in ppcontrol()
1141 STRCOPY(p, pp.token, s); in ppcontrol()
1151 n3 = pp.state; in ppcontrol()
1157 …if (p > mac->value && (pp.option & PLUSPLUS) && (pp.state & (COMPATIBILITY|TRANSITION)) != COMPATI… in ppcontrol()
1174 else if (pp.option & KEYARGS) in ppcontrol()
1201 if (pp.option & KEYARGS) in ppcontrol()
1212 if (pp.option & KEYARGS) in ppcontrol()
1227 if (!(pp.mode & HOSTED) || !(i0 & SYM_INITIAL)) in ppcontrol()
1230 if ((pp.option & KEYARGS) && mac->formkeys) in ppcontrol()
1234 if (!(pp.option & KEYARGS)) in ppcontrol()
1239 else if (!pp.truncate) ppfsm(FSM_MACRO, sym->name); in ppcontrol()
1241pp.option & (DEFINITIONS|PREDEFINITIONS|REGUARD)) && !sym->hidden && !(sym->flags & SYM_MULTILINE)… in ppcontrol()
1288 if (pp.mode & BUILTIN) sym->flags |= SYM_BUILTIN; in ppcontrol()
1289 if (pp.option & FINAL) sym->flags |= SYM_FINAL; in ppcontrol()
1290 if (pp.mode & INIT) sym->flags |= SYM_INIT; in ppcontrol()
1291 if (pp.option & INITIAL) sym->flags |= SYM_INITIAL; in ppcontrol()
1292 if (pp.state & NOEXPAND) sym->flags |= SYM_NOEXPAND; in ppcontrol()
1293 if (pp.option & PREDEFINED) sym->flags |= SYM_PREDEFINED; in ppcontrol()
1294 if (pp.mode & READONLY) sym->flags |= SYM_READONLY; in ppcontrol()
1295 …if (pp.macref) (*pp.macref)(sym, error_info.file, n2, mac ? error_info.line - n2 + 1 : REF_UNDEF, … in ppcontrol()
1299 if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
1300 error(1, "#%s #%s: assertions are non-standard", dirname(directive), pptokstr(pp.token, 0)); in ppcontrol()
1303 error(2, "%s: invalid predicate name", pptokstr(pp.token, 0)); in ppcontrol()
1306 switch ((int)hashref(pp.strtab, pp.token)) in ppcontrol()
1311 error(2, "%s is a builtin predicate", pp.token); in ppcontrol()
1314 error(2, "%s cannot be a predicate", pp.token); in ppcontrol()
1317 strcpy(pp.tmpbuf, pp.token); in ppcontrol()
1322 assert(directive, pp.tmpbuf, pp.args); in ppcontrol()
1325 assert(directive, pp.tmpbuf, NiL); in ppcontrol()
1333 pp.state |= DEFINITION|NOEXPAND|NOSPACE; in ppcontrol()
1341 if (streq(tp->token, pp.token)) in ppcontrol()
1345 if (!(tp = newof(0, struct pptuple, 1, strlen(pp.token)))) in ppcontrol()
1347 strcpy(tp->token, pp.token); in ppcontrol()
1362 pp.state &= ~NOSPACE; in ppcontrol()
1372 STRCOPY(p, pp.token, s); in ppcontrol()
1390 if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
1391 error(1, "#%s: non-standard directive", pp.token); in ppcontrol()
1394 pp.state &= ~DISABLE; in ppcontrol()
1395 p = pp.tmpbuf; in ppcontrol()
1397 if (p + strlen(pp.token) < &pp.tmpbuf[MAXTOKEN]) in ppcontrol()
1399 STRCOPY(p, pp.token, s); in ppcontrol()
1400 pp.state &= ~NOSPACE; in ppcontrol()
1403 p = *pp.tmpbuf ? pp.tmpbuf : ((directive == WARNING) ? "user warning" : "user error"); in ppcontrol()
1409 if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
1410 error(1, "#%s: non-standard directive", pp.token); in ppcontrol()
1425 if ((pp.option & KEYARGS) && mac->formkeys) free(mac->formkeys); in ppcontrol()
1438 if (i1) c = sfsprintf(pp.tmpbuf, MAXTOKEN, "%luU", n1); in ppcontrol()
1439 else c = sfsprintf(pp.tmpbuf, MAXTOKEN, "%ld", n1); in ppcontrol()
1445 strcpy(mac->value, pp.tmpbuf); in ppcontrol()
1447 c = (pp.state & NEWLINE) ? '\n' : ' '; in ppcontrol()
1450 pp.state &= ~DISABLE; in ppcontrol()
1463 error_info.line = strtol(pp.token, NiL, 0); in ppcontrol()
1464 if (error_info.line == 0 && directive == LINE && (pp.state & STRICT) && !(pp.mode & HOSTED)) in ppcontrol()
1466 pp.state &= ~DISABLE; in ppcontrol()
1467 pp.state |= STRIP; in ppcontrol()
1472 if (*(p = pp.token)) in ppcontrol()
1484 if (directive == LINE && (pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
1491 if (directive == LINE) pp.in->flags &= ~IN_ignoreline; in ppcontrol()
1492 else if (pp.incref) in ppcontrol()
1496 switch (*pp.token) in ppcontrol()
1499 if (pp.insert) (*pp.incref)(s, error_info.file, n, PP_SYNC_INSERT); in ppcontrol()
1500 else (*pp.incref)(s, error_info.file, n, PP_SYNC_PUSH); in ppcontrol()
1503 if (pp.insert) (*pp.incref)(s, error_info.file, n, PP_SYNC_INSERT); in ppcontrol()
1504 else (*pp.incref)(s, error_info.file, n - 1, PP_SYNC_POP); in ppcontrol()
1507 if (pp.insert) (*pp.incref)(s, error_info.file, n, PP_SYNC_INSERT); in ppcontrol()
1510 (*pp.incref)(s, error_info.file, n, PP_SYNC_IGNORE); in ppcontrol()
1517 if (fp == pp.insert) in ppcontrol()
1518 pp.insert = 0; in ppcontrol()
1519 else if (error_info.line == 1 && !pp.insert) in ppcontrol()
1520 (*pp.incref)(s, error_info.file, n, PP_SYNC_PUSH); in ppcontrol()
1523 if (!pp.insert) pp.insert = ppgetfile(s); in ppcontrol()
1524 (*pp.incref)(s, error_info.file, n, PP_SYNC_INSERT); in ppcontrol()
1538 if (directive == LINE && (pp.in->flags & IN_ignoreline)) in ppcontrol()
1542 pp.hidden = 0; in ppcontrol()
1543 pp.state &= ~HIDDEN; in ppcontrol()
1544 if (pp.linesync) in ppcontrol()
1547 if (pp.state & JOINING) pp.state |= HIDDEN|SYNCLINE; in ppcontrol()
1551 s = pp.lineid; in ppcontrol()
1552 n = pp.flags; in ppcontrol()
1555 pp.flags &= ~PP_linetype; in ppcontrol()
1556 if (pp.macref) pp.lineid = dirname(LINE); in ppcontrol()
1558 (*pp.linesync)(error_info.line, error_info.file); in ppcontrol()
1559 pp.flags = n; in ppcontrol()
1560 pp.lineid = s; in ppcontrol()
1593 p = pp.valbuf; in ppcontrol()
1595 STRCOPY(p, pp.token, s); in ppcontrol()
1597 if (pp.option & PRAGMAEXPAND) in ppcontrol()
1598 pp.state &= ~DISABLE; in ppcontrol()
1599 if (!(p6 = getline(p, &pp.valbuf[MAXTOKEN], !!(pp.option & PRAGMAEXPAND)))) in ppcontrol()
1602 error(2, "%s: directive too long", pp.valbuf); in ppcontrol()
1644 if ((pp.state & WARN) && (pp.mode & (HOSTED|RELAX|PEDANTIC)) == PEDANTIC) in ppcontrol()
1652 n = streq(p1, pp.pass); in ppcontrol()
1661 …if (((i1 = (int)hashref(pp.strtab, p3 + (i0 ? 0 : 2))) < 1 || i1 > X_last_option) && (i0 || (i1 = … in ppcontrol()
1663 if ((pp.state & (COMPATIBILITY|STRICT)) == STRICT && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
1665 if (pp.optflags[i1] & OPT_GLOBAL) in ppcontrol()
1667 if (n || (pp.mode & WARN)) in ppcontrol()
1676 if (!(pp.optflags[i1] & OPT_GLOBAL)) in ppcontrol()
1681 if (!(pp.optflags[i1] & OPT_PASS)) in ppcontrol()
1686 else if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
1702 if (pp.mode & CATLITERAL) in ppcontrol()
1745 if (c != T_ID) error(1, "%s: %s: identifier expected", p3, pp.token); in ppcontrol()
1746 else if (sym = ppsymset(pp.symtab, pp.token)) in ppcontrol()
1761 pp.hiding++; in ppcontrol()
1783 pp.hiding--; in ppcontrol()
1823 if (pp.linesync) pp.olinesync = pp.linesync; in ppcontrol()
1824 pp.linesync = i0 ? pp.olinesync : (PPLINESYNC)0; in ppcontrol()
1841 if (i0 && !pp.macref) in ppcontrol()
1850 if (pp.macref && (s = strchr(p, ' '))) in ppcontrol()
1854 var.type = pp.truncate; in ppcontrol()
1855 pp.truncate = PPTOKSIZ; in ppcontrol()
1856 …(*pp.macref)(pprefmac(p, REF_CREATE), error_info.file, error_info.line - (c == REF_NORMAL ? 2 : 1)… in ppcontrol()
1857 pp.truncate = var.type; in ppcontrol()
1881 sfsprintf(pp.tmpbuf, MAXTOKEN, "__%s__", s = pp.token); in ppcontrol()
1882 if (c = (int)hashget(pp.dirtab, s)) in ppcontrol()
1884 hashput(pp.dirtab, 0, 0); in ppcontrol()
1885 hashput(pp.dirtab, pp.tmpbuf, c); in ppcontrol()
1887 if (c = (int)hashget(pp.strtab, s)) in ppcontrol()
1889 hashput(pp.strtab, 0, 0); in ppcontrol()
1890 hashput(pp.strtab, pp.tmpbuf, c); in ppcontrol()
1893 if (c != T_STRING || !*(s = pp.token)) in ppcontrol()
1896 error(2, "%s: %s: address argument expected", p3, pptokstr(pp.token, 0)); in ppcontrol()
1920 if (!*(s = pp.token)) in ppcontrol()
1941 error(2, "%s: %s: substitution argument expected", p3, pptokstr(pp.token, 0)); in ppcontrol()
1944 map->next = (struct map*)pp.maps; in ppcontrol()
1945 pp.maps = (char*)map; in ppcontrol()
1958 if (pp.in->type == IN_FILE || pp.in->type == IN_RESCAN) in ppcontrol()
1996 if (pp.option & PRESERVE) in ppcontrol()
2037 if (!(pp.state & (COMPATIBILITY|COMPILE))) in ppcontrol()
2057 if (pp.option & STRINGSPLIT) in ppcontrol()
2063 pp.mode |= HOSTED; in ppcontrol()
2064 pp.flags |= PP_hosted; in ppcontrol()
2065 pp.in->flags |= IN_hosted; in ppcontrol()
2069 pp.mode &= ~HOSTED; in ppcontrol()
2070 pp.flags &= ~PP_hosted; in ppcontrol()
2071 pp.in->flags &= ~PP_hosted; in ppcontrol()
2078 if (!(pp.option & KEEPNOTEXT)) in ppcontrol()
2083 if (pp.state & TRANSITION) ppop(PP_COMPATIBILITY, i0); in ppcontrol()
2092 if (!(*pp.control & SKIP) && pp.pragma && !(pp.state & NOTEXT)) in ppcontrol()
2094 sfsprintf(pp.tmpbuf, MAXTOKEN, "\"%s\"", pp.version); in ppcontrol()
2095 (*pp.pragma)(dirname(PRAGMA), pp.pass, p3, pp.tmpbuf, !n); in ppcontrol()
2096 if (pp.linesync && !n) in ppcontrol()
2097 (*pp.linesync)(error_info.line, error_info.file); in ppcontrol()
2115 error(PANIC, "%s: option recognized but not implemented", pp.valbuf); in ppcontrol()
2124 if ((pp.state & STRICT) && !(pp.mode & (HOSTED|RELAX))) in ppcontrol()
2125 error(1, "#%s: non-standard directive", pp.token); in ppcontrol()
2128 error(1, "%s: invalid macro name", pptokstr(pp.token, 0)); in ppcontrol()
2131 if (!(sym = pprefmac(pp.token, REF_DELETE)) || !sym->macro) in ppcontrol()
2135 if (!(pp.option & ALLPOSSIBLE)) in ppcontrol()
2141 error(1, "%s: invalid macro name", pptokstr(pp.token, 0)); in ppcontrol()
2144 var.symbol = pprefmac(pp.token, REF_CREATE); in ppcontrol()
2149 if (!(pp.option & ALLPOSSIBLE)) in ppcontrol()
2153 if (!(pp.mode & HOSTED) || !(var.symbol->flags & SYM_INITIAL)) in ppcontrol()
2168 error(1, "%s: invalid macro name", pptokstr(pp.token, 0)); in ppcontrol()
2171 if (sym = pprefmac(pp.token, REF_DELETE)) in ppcontrol()
2177 if (!(pp.option & ALLPOSSIBLE)) in ppcontrol()
2186pp.option & (DEFINITIONS|PREDEFINITIONS|REGUARD)) && !sym->hidden && !(sym->flags & SYM_MULTILINE)… in ppcontrol()
2196 else pprefmac(pp.token, REF_UNDEF); in ppcontrol()
2200 error(PANIC, "#%s: directive recognized but not implemented", pp.token); in ppcontrol()
2208 error(1, "%s: invalid directive name", pptokstr(pp.token, 0)); in ppcontrol()
2213 if (c != '\n' && !(pp.state & COMPATIBILITY)) in ppcontrol()
2218 pp.state |= DISABLE|NOSPACE; in ppcontrol()
2219 if ((c = pplex()) != '\n' && (pp.mode & (HOSTED|PEDANTIC)) == PEDANTIC) in ppcontrol()
2220 error(1, "%s: invalid characters after directive", pptokstr(pp.token, 0)); in ppcontrol()
2225 pp.state |= DISABLE; in ppcontrol()
2230 if (!(pp.state & EOF2NL)) in ppcontrol()
2233 pp.state &= ~RESTORE; in ppcontrol()
2234 pp.mode &= ~RELAX; in ppcontrol()
2235 if (!(*pp.control & SKIP)) in ppcontrol()
2237 pp.state |= restore; in ppcontrol()
2243 if (pp.include) in ppcontrol()
2246 PUSH_FILE(pp.include, n); in ppcontrol()
2247 if (!pp.vendor && (pp.found->type & TYPE_VENDOR)) in ppcontrol()
2248 pp.vendor = 1; in ppcontrol()
2249 pp.include = 0; in ppcontrol()
2252 if (pp.incref) in ppcontrol()
2253 (*pp.incref)(error_info.file, ppgetfile(pp.path)->name, error_info.line, PP_SYNC_IGNORE); in ppcontrol()
2254 else if (pp.linesync && pp.macref) in ppcontrol()
2256 pp.flags |= PP_lineignore; in ppcontrol()
2257 (*pp.linesync)(error_info.line, ppgetfile(pp.path)->name); in ppcontrol()
2261 pp.in->flags |= IN_tokens; in ppcontrol()
2272 pp.state |= HIDDEN; in ppcontrol()
2273 pp.hidden++; in ppcontrol()
2278 pp.state |= restore|HIDDEN|SKIPCONTROL; in ppcontrol()
2279 pp.hidden++; in ppcontrol()
2280 pp.level++; in ppcontrol()
2299 oz = pp.constack; in ppnest()
2300 op = pp.maxcon - oz + 1; in ppnest()
2305 ip = pp.in; in ppnest()
2312 pp.control = np + oz; in ppnest()
2313 pp.constack = nz; in ppnest()
2314 pp.maxcon = np + nz - 1; in ppnest()