]> diplodocus.org Git - nmh/blob - docs/historical/mh-nov-1983/subs/m_delete.c
Removed --depth 1 from git clone invocation.
[nmh] / docs / historical / mh-nov-1983 / subs / m_delete.c
1 #include "mh.h"
2
3 m_delete(key)
4 char *key;
5 {
6 register struct node *np, *npprev;
7
8 m_getdefs();
9 for(np = (struct node *) &m_defs; npprev = np; ) {
10 if((np = np->n_next) == 0)
11 break;
12 if(uleq(np->n_name, key)) {
13 npprev->n_next = np->n_next;
14 cndfree(np->n_name);
15 cndfree(np->n_field);
16 free(np);
17 def_flags |= DEFMOD;
18 return(0);
19 }
20 }
21 return(1);
22 }