- while (input(line))
- {
- Iline++;
-# ifdef D1
- fprintf(stderr, "line %.20s\n",line);
-# endif
- if (prefix(".[", line) || (nobracket && line[0]!='\n'))
- {
- if (endpush && (fo==NULL || fo == stdout))
- {
- fo = fopen(tfile, "w");
-# if D1
- fprintf(stderr, "opened %s as %o\n",tfile,fo);
-# endif
- if (fo==NULL)
- {
- fprintf(stderr,"Can't open scratch file");
- exit(1);
- }
- sep = 002; /* separate records without confusing sort..*/
- }
- doref(line);
+ }
+ do {
+ if (argc > 1) {
+ fclose(in);
+ Iline = 0;
+ in = fopen(Ifile = argv[1], "r");
+ argc--;
+ argv++;
+ if (in == NULL) {
+ err("Can't read %s", (void) Ifile);
+ continue;