X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fcomp.c;h=5ebce6ed0e0855957311933e206f8691bad68491;hb=ecc90fb56b43863f4c33ed62da4abe898b17d7fb;hp=1aca23a7855508254ffa57265b2ffa78cb7d28e7;hpb=6c42153ad9362cc676ea66563bf400d7511b3b68;p=mmh diff --git a/uip/comp.c b/uip/comp.c index 1aca23a..5ebce6e 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -2,14 +2,13 @@ /* * comp.c -- compose a message * - * $Id$ - * * 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 +#include #include static struct swit switches[] = { @@ -171,7 +170,7 @@ main (int argc, char **argv) if (folder) adios (NULL, "only one folder at a time!"); else - folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF); + folder = pluspath (cp); } else { if (msg) adios (NULL, "only one message at a time!"); @@ -227,19 +226,8 @@ main (int argc, char **argv) if ((in = open (form = getcpy (m_name (mp->lowsel)), O_RDONLY)) == NOTOK) adios (form, "unable to open message"); - } else { - /* - * Open a component or forms file - */ - if (form) { - if ((in = open (etcpath (form), O_RDONLY)) == NOTOK) - adios (form, "unable to open form file"); - } else { - if ((in = open (etcpath (components), O_RDONLY)) == NOTOK) - adios (components, "unable to open default components file"); - form = components; - } - } + } else + in = open_form(&form, components); try_it_again: strncpy (drft, m_draft (dfolder, file, use, &isdf), sizeof(drft)); @@ -306,5 +294,6 @@ edit_it: if (nwhat) done (0); what_now (ed, nedit, use, drft, NULL, 0, NULLMP, NULL, 0, cwd); - return done (1); + done (1); + return 1; }