X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Finstall-mh.c;h=2cf9081c7a78b03675df212a2219abecb21dc538;hb=8e79ce1919d9cf54f101a812e0fd70a33286b9f3;hp=34aed9505cdc4ff01ab6245ea0bfa5ec474bc834;hpb=5afa7072e3fe7fc42287e2149e1c23b363700795;p=mmh diff --git a/uip/install-mh.c b/uip/install-mh.c index 34aed95..2cf9081 100644 --- a/uip/install-mh.c +++ b/uip/install-mh.c @@ -1,14 +1,13 @@ /* * install-mh.c -- initialize the nmh environment of a new user * - * $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 /* mh internals */ +#include #include /* structure for getpwuid() results */ static struct swit switches[] = { @@ -62,10 +61,10 @@ main (int argc, char **argv) case HELPSW: snprintf (buf, sizeof(buf), "%s [switches]", invo_name); print_help (buf, switches, 0); - done (1); + done (0); case VERSIONSW: print_version(invo_name); - done (1); + done (0); case AUTOSW: autof++; @@ -180,8 +179,7 @@ query: /* * Add some initial elements to the profile/context list */ - if (!(m_defs = (struct node *) malloc (sizeof *np))) - adios (NULL, "unable to allocate profile storage"); + m_defs = (struct node *) mh_xmalloc (sizeof *np); np = m_defs; np->n_name = getcpy ("Path"); np->n_field = getcpy (pathname); @@ -213,7 +211,8 @@ query: fprintf (out, "%s: %s\n", np->n_name, np->n_field); } fclose (out); - return done (0); + done (0); + return 1; }