Pristine Ack-5.5
[Ack-5.5.git] / mach / proto / ncg / glosym.c
1 #ifndef NORCSID
2 static char rcsid[] = "$Id: glosym.c,v 0.4 1994/06/24 13:27:28 ceriel Exp $";
3 #endif
4
5 #include "param.h"
6 #include "tables.h"
7 #include "types.h"
8 #include "glosym.h"
9
10 /*
11  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
12  * See the copyright notice in the ACK home directory, in the file "Copyright".
13  *
14  * Author: Hans van Staveren
15  */
16
17 extern string myalloc();
18 extern char *strcpy();
19
20 glosym_p glolist= (glosym_p) 0;
21
22 enterglo(name,romp) string name; word *romp; {
23         register glosym_p gp;
24         register i;
25
26         gp = (glosym_p) myalloc(sizeof *gp);
27         gp->gl_next = glolist;
28         gp->gl_name = (string) myalloc(strlen(name)+1);
29         strcpy(gp->gl_name,name);
30         for (i=0;i<=MAXROM;i++)
31                 gp->gl_rom[i] = romp[i];
32         glolist = gp;
33 }
34
35 glosym_p lookglo(name) string name; {
36         register glosym_p gp;
37
38         for (gp=glolist;gp != (glosym_p) 0; gp=gp->gl_next)
39                 if (strcmp(gp->gl_name,name)==0)
40                         return(gp);
41         return((glosym_p) 0);
42 }