Skip to content
Snippets Groups Projects
Commit 5dd2ef64 authored by wlott's avatar wlott
Browse files

Search the CMUCLLIB search path for the core file instead of always

assuming that /usr/misc/.cmucl/lib is going to hold it.
parent c0c1a60b
No related branches found
No related tags found
No related merge requests found
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/ldb.c,v 1.13 1991/05/24 17:52:21 wlott Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/ldb.c,v 1.14 1991/09/04 15:35:16 wlott Exp $ */
/* Lisp kernel core debugger */ /* Lisp kernel core debugger */
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/file.h> #include <sys/file.h>
#include <sys/param.h>
#include <sys/stat.h>
#include "ldb.h" #include "ldb.h"
#include "lisp.h" #include "lisp.h"
...@@ -69,8 +71,36 @@ char *envp[]; ...@@ -69,8 +71,36 @@ char *envp[];
} }
} }
if (core == NULL) /* Note: the /usr/misc/.cmucl/lib/ default path is also wired into */
core = "/usr/misc/.cmucl/lib/lisp.core"; /* the lisp code in .../code/save.lisp. */
if (core == NULL) {
extern char *getenv();
char *lib = getenv("CMUCLLIB");
if (lib == NULL)
core = "/usr/misc/.cmucl/lib/lisp.core";
else {
static char buf[MAXPATHLEN];
char *dst;
struct stat statbuf;
do {
dst = buf;
while (*lib != '\0' && *lib != ':')
*dst++ = *lib++;
if (dst != buf && dst[-1] != '/')
*dst++ = '/';
strcpy(dst, "lisp.core");
if (stat(buf, &statbuf) == 0) {
core = buf;
break;
}
} while (*lib++ == ':');
if (core == NULL)
core = "/usr/misc/.cmucl/lib/lisp.core";
}
}
arch_init(); arch_init();
os_init(); os_init();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment