- /*
- ** Check if the parameters for the external body
- ** specified a filename.
- */
- if (autosw) {
- char *cp;
-
- cp = mhbasename(e->eb_name);
- if (*cp && *cp!='.' && *cp!='|' && *cp!='!' &&
- !strchr(cp, '%')) {
- /* filename looks good: use it */
- 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(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(ct->c_file, "unable to read");