ack/lang/m2/m2mm/lib.c

57 lines
936 B
C
Raw Normal View History

1987-09-24 13:01:27 +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".
*
* Author: Ceriel J.H. Jacobs
*/
/* L I B R A R Y */
/* $Header$ */
#include <em_path.h>
1988-09-06 11:28:16 +00:00
#include <alloc.h>
#include "main.h"
1987-09-24 13:01:27 +00:00
static char lib_dir[128] = EM_DIR;
1988-09-06 11:28:16 +00:00
static struct liblist {
int libno;
struct liblist *libnext;
} *lblist;
int
1987-09-24 13:01:27 +00:00
is_library_dir(d)
char *d;
{
/* Check if directory d is a directory containing
"system" definition modules. Return 1 if it is, 0 otherwise.
*/
1988-09-06 11:28:16 +00:00
register struct liblist *p = lblist;
while (p) {
if (! strcmp(DEFPATH[p->libno], d)) return 1;
p = p->libnext;
}
return 0;
1987-09-24 13:01:27 +00:00
}
init_lib()
{
extern char *strcat();
strcat(lib_dir, "/lib/m2");
1988-09-06 11:28:16 +00:00
AddLibDir(lib_dir);
}
set_libdir(n)
{
register struct liblist *p =
(struct liblist *) Malloc(sizeof(struct liblist));
p->libnext = lblist;
p->libno = n;
lblist = p;
1987-09-24 13:01:27 +00:00
}