Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / sbr / m_foil.c
1 /* m_foil.c - foil search of .mh_profile */
2
3 #include "../h/mh.h"
4 #include <stdio.h>
5
6
7 void m_foil (path)
8 char   *path;
9 {
10     register struct node *np;
11
12     defpath = context = "/dev/null";
13
14     if (path) {
15         np = m_defs = (struct node *) malloc (sizeof *np);
16         if (np == NULL)
17             adios (NULLCP, "unable to allocate profile storage");
18
19         np -> n_name = getcpy ("Path");
20         np -> n_field = getcpy (path);
21         np -> n_context = 0;
22         np -> n_next = NULL;
23
24         if (mypath == NULL && (mypath = getenv ("HOME")) != NULL)
25             mypath = getcpy (mypath);           
26     }
27 }