/*
- * comp.c -- compose a message
- *
- * This code is Copyright (c) 2002, by the authors of nmh. See the
- * COPYRIGHT file in the root directory of the nmh distribution for
- * complete copyright information.
- */
+** comp.c -- compose a message
+**
+** This code is Copyright (c) 2002, by the authors of nmh. See the
+** COPYRIGHT file in the root directory of the nmh distribution for
+** complete copyright information.
+*/
#include <h/mh.h>
#include <h/utils.h>
if (!use && (folder || msg)) {
/*
- * Take a message as the "form" for the new message.
- */
+ ** Take a message as the "form" for the new message.
+ */
if (!msg)
msg = "cur";
if (!folder)
strncpy (drft, m_draft(use ? (msg?msg:"cur") : "new"), sizeof(drft));
/*
- * Check if we have an existing draft
- */
+ ** 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 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;
break;
}
}
- } else {
- if (use)
- adios (drft, "unable to open");
+ } else if (use) {
+ adios (drft, "unable to open");
}
if ((out = creat (drft, m_gmprot ())) == NOTOK)