ack/mach/proto/ncg/glosym.c

42 lines
857 B
C
Raw Permalink Normal View History

1985-01-08 15:34:54 +00:00
#ifndef NORCSID
1994-06-24 14:02:31 +00:00
static char rcsid[] = "$Id$";
1985-01-08 15:34:54 +00:00
#endif
#include <stdlib.h>
#include <string.h>
1985-01-08 15:34:54 +00:00
#include "param.h"
#include "tables.h"
#include "types.h"
#include "glosym.h"
/*
1987-03-10 01:26:51 +00:00
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
1985-01-08 15:34:54 +00:00
*
* Author: Hans van Staveren
*/
static glosym_p glolist= (glosym_p) 0;
1985-01-08 15:34:54 +00:00
void enterglo(string name, word *romp) {
glosym_p gp;
int i;
1985-01-08 15:34:54 +00:00
gp = (glosym_p) myalloc(sizeof *gp);
gp->gl_next = glolist;
gp->gl_name = (string) myalloc(strlen(name)+1);
strcpy(gp->gl_name,name);
for (i=0;i<=MAXROM;i++)
gp->gl_rom[i] = romp[i];
glolist = gp;
}
glosym_p lookglo(string name) {
glosym_p gp;
1985-01-08 15:34:54 +00:00
for (gp=glolist;gp != (glosym_p) 0; gp=gp->gl_next)
if (strcmp(gp->gl_name,name)==0)
return(gp);
return((glosym_p) 0);
}