*/
#include <h/mh.h> /* mh internals */
+#include <h/utils.h>
#include <pwd.h> /* structure for getpwuid() results */
static struct swit switches[] = {
/*
* 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);
fprintf (out, "%s: %s\n", np->n_name, np->n_field);
}
fclose (out);
- return done (0);
+ done (0);
+ return 1;
}