X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fcomp.c;h=8fced484def5a5be30089c3d19a2ecd1fcd8ef09;hp=1aca23a7855508254ffa57265b2ffa78cb7d28e7;hb=b439ec143c4d2e2daf4b0a9c332123f24500cd9a;hpb=0364511845929f2b946b7a216289e9954f4a13d6 diff --git a/uip/comp.c b/uip/comp.c index 1aca23a..8fced48 100644 --- a/uip/comp.c +++ b/uip/comp.c @@ -10,6 +10,7 @@ */ #include +#include #include static struct swit switches[] = { @@ -227,19 +228,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));