The routine findpath did not work. It used the same static buffer for
several calls. Now it uses alloc.
This commit is contained in:
parent
94e069fde1
commit
a33d4cdbba
1 changed files with 10 additions and 5 deletions
|
@ -59,11 +59,16 @@ string
|
||||||
libpath(s) string s; {
|
libpath(s) string s; {
|
||||||
/* Must deliver a full pathname to the library file "s" */
|
/* Must deliver a full pathname to the library file "s" */
|
||||||
|
|
||||||
static char buf[100];
|
register string p;
|
||||||
|
register length;
|
||||||
|
p_mem alloc();
|
||||||
string strcpy(), strcat();
|
string strcpy(), strcat();
|
||||||
|
static string subdir = "/lib/LLgen/";
|
||||||
|
|
||||||
strcpy(buf,EM_DIR);
|
length = strlen(EM_DIR) + strlen(subdir) + strlen(s) + 1;
|
||||||
strcat(buf,"/lib/LLgen/");
|
p = (string) alloc((unsigned) length);
|
||||||
strcat(buf,s);
|
strcpy(p,EM_DIR);
|
||||||
return buf;
|
strcat(p,subdir);
|
||||||
|
strcat(p,s);
|
||||||
|
return p;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue