]> diplodocus.org Git - nmh/blob - docs/historical/mh-nov-1983/subs/m_update.c
Removed --depth 1 from git clone invocation.
[nmh] / docs / historical / mh-nov-1983 / subs / m_update.c
1 #include "mh.h"
2 #include <stdio.h>
3 #include <signal.h>
4
5 char defpath[];
6
7 m_update()
8 {
9 FILE *out;
10 register struct node *np;
11 int save;
12
13 if(def_flags & DEFMOD) {
14 save = (int) signal(SIGINT, SIG_IGN);
15 if((out = fopen(defpath, "w")) == NULL) {
16 fprintf(stderr, "Can't create %s!!\n", defpath);
17 done(1);
18 }
19 for(np = m_defs; np; np = np->n_next)
20 fprintf(out, "%s: %s\n", np->n_name, np->n_field);
21 fclose(out);
22 signal(SIGINT, (int (*)()) save);
23 def_flags &= ~DEFMOD;
24 }
25 }