- if (!m_convert (mp, msg))
- done (1);
- seq_setprev (mp); /* set the previous-sequence */
-
- if (mp->numsel > 1)
- adios (NULL, "only one message at a time!");
-
- if ((in = open (form = getcpy (m_name (mp->lowsel)),
- O_RDONLY)) == NOTOK)
- adios (form, "unable to open message");
- } else
- in = open_form(&form, components);
-
-try_it_again:
- strncpy (drft, m_draft(use ? (msg?msg:"cur") : "new"), sizeof(drft));
-
- /*
- ** Check if we have an existing draft
- */
- if ((out = open (drft, O_RDONLY)) != NOTOK) {
- i = fdcompare (in, out);
- close (out);
-
- /*
- ** If we have given -use flag, or if the
- ** draft is just the same as the components
- ** file, then no need to ask any questions.
- */
- if (use || i)
- goto edit_it;
-
- if (stat (drft, &st) == NOTOK)
- adios (drft, "unable to stat");
- printf ("Draft \"%s\" exists (%ld bytes).", drft, (long) st.st_size);
- for (i = LISTDSW; i != YESW;) {
- if (!(argp = getans ("\nDisposition? ", aqrunl)))
- done (1);
- switch (i = smatch (*argp, aqrunl)) {
- case NOSW:
- done (0);
- case NEWSW:
- use = NOUSE;
- goto try_it_again;
- case YESW:
- break;
- case USELSW:
- use++;
- goto edit_it;
- case LISTDSW:
- showfile (++argp, drft);
- break;
- case REFILSW:
- if (refile (++argp, drft) == 0)
- i = YESW;
- break;
- default:
- advise (NULL, "say what?");
- break;
- }
+ if (!m_convert(mp, msg)) {
+ exit(EX_SOFTWARE);
+ }
+ seq_setprev(mp); /* set the previous-sequence */
+ if (mp->numsel > 1) {
+ adios(EX_USAGE, NULL, "only one message at a time!");
+ }
+ if ((in = open(form = getcpy(m_name(mp->lowsel)),
+ O_RDONLY)) == NOTOK) {
+ adios(EX_IOERR, form, "unable to open message");