X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;ds=sidebyside;f=uip%2Fdist.c;h=d8c261da4c9dbf78d22ff9db200f988322695fbc;hb=0569d6d1631dc90d4f2f2df6bdd0599c7ecc7814;hp=4b6ce6979b525dd9f79437e7148d5cf2ba33f310;hpb=6c42153ad9362cc676ea66563bf400d7511b3b68;p=mmh diff --git a/uip/dist.c b/uip/dist.c index 4b6ce69..d8c261d 100644 --- a/uip/dist.c +++ b/uip/dist.c @@ -10,6 +10,7 @@ */ #include +#include #include static struct swit switches[] = { @@ -179,7 +180,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!"); @@ -195,14 +196,7 @@ main (int argc, char **argv) if (file && (msg || folder)) adios (NULL, "can't mix files and folders/msgs"); - if (form) { - if ((in = open (etcpath (form), O_RDONLY)) == NOTOK) - adios (form, "unable to open form file"); - } else { - if ((in = open (etcpath (distcomps), O_RDONLY)) == NOTOK) - adios (distcomps, "unable to open default components file"); - form = distcomps; - } + in = open_form(&form, distcomps); try_it_again: strncpy (drft, m_draft (dfolder, dmsg, NOUSE, &isdf), sizeof(drft));