Home | History | Annotate | Download | only in sh

Lines Matching refs:parsefile

83  * The parsefile structure pointed to by the global variable parsefile
88 struct parsefile {
89 struct parsefile *prev; /* preceding file on stack */
102 int parsenleft; /* copy of parsefile->nleft */
103 MKINIT int parselleft; /* copy of parsefile->lleft */
104 char *parsenextc; /* copy of parsefile->nextc */
105 MKINIT struct parsefile basepf; /* top level input file */
107 struct parsefile *parsefile = &basepf; /* current input file */
179 return parsefile != NULL && parsefile->fd == 0;
186 char *buf = parsefile->buf;
191 if (parsefile->fd == 0 && el) {
214 if (parsefile->fd == 0) {
252 nr = read(parsefile->fd, buf, BUFSIZ - 8);
259 if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
293 if (parsefile->strpush) {
298 if (parsenleft == EOF_NLEFT || parsefile->buf == NULL)
350 if (parsefile->fd == 0 && hist && something) {
382 * Push a string back onto the input at this current parsefile level.
392 if (parsefile->strpush) {
394 sp->prev = parsefile->strpush;
395 parsefile->strpush = sp;
397 sp = parsefile->strpush = &(parsefile->basestrpush);
412 struct strpush *sp = parsefile->strpush;
421 parsefile->strpush = sp->prev;
422 if (sp != &(parsefile->basestrpush))
464 parsefile->buf = ckmalloc(BUFSIZ);
466 if (parsefile->fd > 0)
467 close(parsefile->fd);
468 parsefile->fd = fd;
469 if (parsefile->buf == NULL)
470 parsefile->buf = ckmalloc(BUFSIZ);
488 parsefile->buf = NULL;
503 struct parsefile *pf;
505 parsefile->nleft = parsenleft;
506 parsefile->lleft = parselleft;
507 parsefile->nextc = parsenextc;
508 parsefile->linno = plinno;
509 pf = (struct parsefile *)ckmalloc(sizeof (struct parsefile));
510 pf->prev = parsefile;
514 parsefile = pf;
521 struct parsefile *pf = parsefile;
530 parsefile = pf->prev;
532 parsenleft = parsefile->nleft;
533 parselleft = parsefile->lleft;
534 parsenextc = parsefile->nextc;
535 plinno = parsefile->linno;
547 while (parsefile != &basepf)
573 if (parsefile->fd > 0) {
574 close(parsefile->fd);
575 parsefile->fd = 0;