- /*
- ** Check if the parameters for the external body
- ** specified a filename.
- */
- if (autosw) {
- char *cp;
-
- if ((cp = e->eb_name) && *cp != '/' && *cp != '.' &&
- *cp != '|' && *cp != '!' && !strchr(cp, '%')) {
- if (!ct->c_storeproc)
- ct->c_storeproc = getcpy(cp);
- if (!p->c_storeproc)
- p->c_storeproc = getcpy(cp);
+ msg = add("You need to fetch the contents yourself:", NULL);
+ ap = ct->c_ctinfo.ci_attrs;
+ ep = ct->c_ctinfo.ci_values;
+ for (; *ap; ap++, ep++) {
+ msg = add(concat("\n\t", *ap, ": ", *ep, NULL), msg);
+ }
+ if (!(fp = fopen(ct->c_file, "r"))) {
+ adios(EX_IOERR, ct->c_file, "unable to open");
+ }
+ fseek(fp, ct->c_begin, SEEK_SET);
+ while (!feof(fp) && ftell(fp) < ct->c_end) {
+ if (!fgets(buf, sizeof buf, fp)) {
+ adios(EX_IOERR, ct->c_file, "unable to read");