Lfinish(int ch, int dot, int *rvp) #endif { char *s, *se; static char what[] = "namelist input"; s = nmLbuf + 2; se = nmLbuf + sizeof(nmLbuf) - 1; *s++ = ch; while(!issep(GETC(ch)) && ch!=EOF) { if (s >= se) { nmLbuf_ovfl: return *rvp = err__fl(f__elist->cierr,131,what); } *s++ = ch; if (ch != '=') continue; if (dot) return *rvp = err__fl(f__elist->cierr,112,what); got_eq: *s = 0; nmL_getc_save = l_getc; l_getc = nmL_getc; nmL_ungetc_save = l_ungetc; l_ungetc = nmL_ungetc; nmLbuf[1] = *(nmL_next = nmLbuf) = ','; *rvp = f__lcount = 0; return 1; } if (dot) goto done; for(;;) { if (s >= se) goto nmLbuf_ovfl; *s++ = ch; if (!isblnk(ch)) break; if (GETC(ch) == EOF) goto done; } if (ch == '=') goto got_eq; done: Ungetc(ch, f__cf); return 0; }
integer do_fio(ftnint *number, char *ptr, ftnlen len) { struct syl *p; int n; int i; for (i = 0; i < *number; i++, ptr += len) { loop: switch (type_f((p = &f__syl[f__pc])->op)) { default: fprintf(stderr, "unknown code in do_fio: %d\n%s\n", p->op, f__fmtbuf); return err(f__elist->cierr, 100, "do_fio"); case NED: if ((*f__doned)(p)) { f__pc++; goto loop; } f__pc++; continue; case ED: if (f__cnt[f__cp] <= 0) { f__cp--; f__pc++; goto loop; } if (ptr == NULL) return (*f__doend)(); f__cnt[f__cp]--; f__workdone = 1; if ((n = (*f__doed)(p, ptr, len)) > 0) return err__fl(f__elist->cierr, errno, "fmt"); if (n < 0) return err(f__elist->ciend, (EOF), "fmt"); continue; case STACK: f__cnt[++f__cp] = p->p1; f__pc++; goto loop; case RET1: f__ret[++f__rp] = p->p1; f__pc++; goto loop; case GOTO: if (--f__cnt[f__cp] <= 0) { f__cp--; f__rp--; f__pc++; goto loop; } f__pc = 1 + f__ret[f__rp--]; goto loop; case REVERT: f__rp=f__cp = 0; f__pc = p->p1; if (ptr == NULL) return (*f__doend)(); if (!f__workdone) return 0; if ((n = (*f__dorevert)()) != 0) return n; goto loop; case COLON: if (ptr == NULL) return (*f__doend)(); f__pc++; goto loop; case NONL: f__nonl = 1; f__pc++; goto loop; case S: case SS: f__cplus = 0; f__pc++; goto loop; case SP: f__cplus = 1; f__pc++; goto loop; case P: f__scale = p->p1; f__pc++; goto loop; case BN: f__cblank = 0; f__pc++; goto loop; case BZ: f__cblank = 1; f__pc++; goto loop; } } return 0; }