- /*
- ** #@type/subtype (external types directive)
- */
- if (extrnal) {
- struct exbody *e;
- CT p;
-
- if (!ci->ci_magic)
- adios(NULL, "need external information for \"#@%s/%s\"", ci->ci_type, ci->ci_subtype);
- p = ct;
-
- snprintf(buffer, sizeof(buffer), "message/external-body; %s", ci->ci_magic);
- free(ci->ci_magic);
- ci->ci_magic = NULL;
-
- /*
- ** Since we are using the current Content structure to
- ** hold information about the type of the external
- ** reference, we need to create another Content
- ** structure for the message/external-body to wrap
- ** it in.
- */
- if ((ct = (CT) calloc(1, sizeof(*ct))) == NULL)
- adios(NULL, "out of memory");
- *ctp = ct;
- ci = &ct->c_ctinfo;
- if (get_ctinfo(buffer, ct, 0) == NOTOK)
- done(1);
- ct->c_type = CT_MESSAGE;
- ct->c_subtype = MESSAGE_EXTERNAL;
-
- if ((e = (struct exbody *)
- calloc(1, sizeof(*e))) == NULL)
- adios(NULL, "out of memory");
- ct->c_ctparams = (void *) e;
-
- e->eb_parent = ct;
- e->eb_content = p;
- p->c_ctexbody = e;
-
- if (params_external(ct, 1) == NOTOK)
- done(1);
-
- return OK;
- }
-