- if (!(draft_file = fopen(draft_file_name, "r"))) {
- adios(NULL, "can't open draft file `%s'.", draft_file_name);
- }
-
- /* We'll grow the buffer as needed. */
- field = (char *)mh_xmalloc(field_size = 256);
-
- /*
- ** Scan the draft file for an attachment header field name.
- */
- length = strlen(attach_hdr);
- has_attachment = 0;
- while (get_line() != EOF && *field != '\0' && *field != '-') {
- if (strncasecmp(field, attach_hdr, length)==0 &&
- field[length] == ':') {
- has_attachment = 1;
- }