Lines Matching refs:pp
102 if (pp.option & NATIVE) in pppush()
106 cur->hide = ++pp.hide; in pppush()
109 if ((pp.mode & (DUMP|INIT)) == DUMP) in pppush()
112 if (pp.lastindex) pp.lastindex->next = cur->index; in pppush()
113 else pp.firstindex = cur->index; in pppush()
114 pp.lastindex = cur->index; in pppush()
115 cur->index->file = pp.original; in pppush()
121 if (!(pp.mode & DUMP)) in pppush()
123 if (!cur->prev->prev && !(pp.state & COMPILE) && isatty(0)) in pppush()
126 if (pp.member) in pppush()
128 switch (pp.member->archive->type & (TYPE_BUFFER|TYPE_CHECKPOINT)) in pppush()
132 cur->buflen = pp.member->size; in pppush()
134 p = (cur->buffer = oldof(0, char, 0, pp.member->size + PPBAKSIZ + 1)) + PPBAKSIZ; in pppush()
135 if (sfseek(pp.member->archive->info.sp, pp.member->offset, SEEK_SET) != pp.member->offset) in pppush()
136 error(3, "%s: archive seek error", pp.member->archive->name); in pppush()
137 if (sfread(pp.member->archive->info.sp, p, pp.member->size) != pp.member->size) in pppush()
138 error(3, "%s: archive read error", pp.member->archive->name); in pppush()
139 pp.member = 0; in pppush()
144 cur->buflen = pp.member->size; in pppush()
146 p = cur->buffer = pp.member->archive->info.buffer + pp.member->offset; in pppush()
148 pp.member = 0; in pppush()
167 …pp.option & NOPROTO) && !(pp.test & TEST_noproto) && ((pp.state & (COMPATIBILITY|TRANSITION)) == C… in pppush()
178 if (pp.incref && !(pp.mode & INIT)) in pppush()
179 (*pp.incref)(error_info.file, s, error_info.line - 1, PP_SYNC_PUSH); in pppush()
180 if (pp.macref || (pp.option & IGNORELINE)) in pppush()
182 cur->prefix = pp.prefix; in pppush()
188 cur->control = pp.control; in pppush()
189 *pp.control = 0; in pppush()
190 cur->vendor = pp.vendor; in pppush()
194 pp.mode |= MARKHOSTED; in pppush()
198 if (pp.state & HIDDEN) in pppush()
200 pp.state &= ~HIDDEN; in pppush()
201 pp.hidden = 0; in pppush()
202 if (!(pp.state & NOTEXT) && pplastout() != '\n') in pppush()
205 pp.state |= NEWLINE; in pppush()
206 if (pp.mode & HOSTED) cur->flags |= IN_hosted; in pppush()
208 if (pp.mode & (INIT|MARKHOSTED)) in pppush()
210 pp.mode |= HOSTED; in pppush()
211 pp.flags |= PP_hosted; in pppush()
216 if (!(pp.mode & (INIT|MARKHOSTED))) in pppush()
218 pp.mode &= ~HOSTED; in pppush()
219 pp.flags &= ~PP_hosted; in pppush()
222 if (pp.state & JOINING) pp.state |= HIDDEN|SYNCLINE; in pppush()
225 if (pp.linesync) in pppush()
226 (*pp.linesync)(error_info.line, error_info.file); in pppush()
228 if (pp.member) in pppush()
231 if (pp.mode & MARKC) in pppush()
234 pp.mode &= ~MARKC; in pppush()
237 … debug((-7, "PUSH in=%s next=%s [%s]", ppinstr(pp.in), pptokchr(*pp.in->nextchr), pp.in->nextchr)); in pppush()
244 … debug((-7, "PUSH in=%s next=%s [%s]", ppinstr(pp.in), pptokchr(*pp.in->nextchr), pp.in->nextchr)); in pppush()
264 debug((-7, "PUSH in=%s next=%s", ppinstr(pp.in), pptokchr(*pp.in->nextchr))); in pppush()
294 if (ppmactop = pp.mactop) in ppexpand()
296 nextmacp = pp.macp->next; in ppexpand()
297 nextframe(pp.macp, pp.mactop); in ppexpand()
299 restore = pp.state & (COLLECTING|DISABLE|STRIP); in ppexpand()
300 pp.state &= ~restore; in ppexpand()
301 pp.mode &= ~MARKMACRO; in ppexpand()
303 cur = pp.in; in ppexpand()
304 pp.in->flags |= IN_expand; in ppexpand()
305 pptoken = pp.token; in ppexpand()
307 pp.token = p = oldof(0, char, 0, n); in ppexpand()
313 if ((pp.token = pp.toknxt) > m) in ppexpand()
315 c = pp.token - p; in ppexpand()
318 pp.token = p + c; in ppexpand()
320 if (pp.mode & MARKMACRO) in ppexpand()
322 pp.mode &= ~MARKMACRO; in ppexpand()
323 *pp.token++ = MARK; in ppexpand()
324 *pp.token++ = 'X'; in ppexpand()
327 else if (pp.in == cur) in ppexpand()
330 *pp.token = 0; in ppexpand()
332 pp.macp->next = nextmacp; in ppexpand()
334 pp.token = pptoken; in ppexpand()
335 pp.state |= restore; in ppexpand()
336 pp.in = pp.in->prev; in ppexpand()
418 hashwalk(pp.symtab, 0, dump, NiL); in ppdump()
426 ip = pp.firstindex; in ppdump()
483 pp.mode |= LOADING; in ppload()
484 if (!(pp.state & STANDALONE)) in ppload()
487 if (pp.member) in ppload()
489 sp = pp.member->archive->info.sp; in ppload()
490 file_offset = pp.member->offset; in ppload()
491 file_size = pp.member->size; in ppload()
498 if (pp.in->type != IN_FILE) in ppload()
500 if (pp.in->flags & IN_prototype) in ppload()
501 pp.in->fd = pppdrop(pp.in->buffer + PPBAKSIZ); in ppload()
503 if (pp.in->fd >= 0) in ppload()
505 if (!(sp = sfnew(NiL, NiL, SF_UNBOUND, pp.in->fd, SF_READ))) in ppload()
511 file_size = pp.in->buflen; in ppload()
512 …if (!(sp = sfnew(NiL, pp.in->buffer + ((pp.in->flags & IN_static) ? 0 : PPBAKSIZ), file_size, -1, … in ppload()
516 if (!streq(s, pp.checkpoint)) in ppload()
517 error(3, "checkpoint version %s does not match %s", s, pp.checkpoint); in ppload()
549 p = PPBUFSIZ - (pp.outp - pp.outbuf); in ppload()
561 if (pp.test & 0x0200) error(2, "%s: %s p=%lu next=<%lu,%lu> keep=<%lu,%lu> skip=<-,%lu> guard=%s", … in ppload()
567 if (pp.test & 0x0100) error(2, "%s: %s IGNORE", keyname(X_CHECKPOINT), fp->name); in ppload()
576 if (pp.test & 0x0100) error(2, "%s: copy <%lu,%lu> n=%lu p=%lu", keyname(X_CHECKPOINT), keep_begin,… in ppload()
579 if (sfread(sp, pp.outp, p) != p) in ppload()
582 pp.outp = pp.outbuf; in ppload()
588 if (sfread(sp, pp.outp, n) != n) in ppload()
590 pp.outp += n; in ppload()
612 fp->guard = ppsymset(pp.symtab, g); in ppload()
622 if (pp.test & 0x0100) error(2, "%s: loop", keyname(X_CHECKPOINT)); in ppload()
656 sym = ppsymset(pp.symtab, b); in ppload()
665 if (pp.test & 0x1000) error(2, "checkpoint SKIP %s=%s [%s]", sym->name, s, sym->macro->value); in ppload()
694 if (pp.test & 0x1000) error(2, "checkpoint LOAD %s=%s", sym->name, mac->value); in ppload()
704 pp.in->fd = -1; in ppload()
708 if (pp.member) pp.member = 0; in ppload()
713 pp.in->flags |= IN_eof|IN_newline; in ppload()
714 pp.in->nextchr = pp.in->buffer + PPBAKSIZ; in ppload()
715 *pp.in->nextchr++ = 0; in ppload()
716 *pp.in->nextchr = 0; in ppload()
718 pp.mode &= ~LOADING; in ppload()