nugs
This commit is contained in:
parent
c281d73aef
commit
76fb202d7e
24
os/sysbits.c
24
os/sysbits.c
@ -1244,16 +1244,10 @@ const char *Yap_findFile(const char *isource, const char *idef,
|
|||||||
const char *eroot;
|
const char *eroot;
|
||||||
|
|
||||||
if (ftype == YAP_SAVED_STATE || ftype == YAP_OBJ) {
|
if (ftype == YAP_SAVED_STATE || ftype == YAP_OBJ) {
|
||||||
eroot = getenv("YAPLIBDIR");
|
root = getenv("YAPLIBDIR");
|
||||||
} else if (ftype == YAP_BOOT_PL) {
|
} else if (ftype == YAP_BOOT_PL) {
|
||||||
eroot = getenv("YAPSHAREDIR"
|
root = getenv("YAPSHAREDIR"
|
||||||
"/pl");
|
"/pl");
|
||||||
if (eroot == NULL) {
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
strncpy(root, eroot, YAP_FILENAME_MAX);
|
|
||||||
strncat(root, "/pl", YAP_FILENAME_MAX);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (isource && isource[0])
|
if (isource && isource[0])
|
||||||
strcpy(source, isource);
|
strcpy(source, isource);
|
||||||
@ -1273,11 +1267,9 @@ const char *Yap_findFile(const char *isource, const char *idef,
|
|||||||
strcpy(source, idef);
|
strcpy(source, idef);
|
||||||
else
|
else
|
||||||
source[0] = 0;
|
source[0] = 0;
|
||||||
if (ftype == YAP_PL) {
|
if (ftype == YAP_PL || ftype == YAP_BOOT_PL) {
|
||||||
strcpy(root,YAP_SHAREDIR);
|
strcpy(root,YAP_SHAREDIR);
|
||||||
} else if (ftype == YAP_BOOT_PL) {
|
strcat(root,"/pl");
|
||||||
strcpy(root, YAP_SHAREDIR);
|
|
||||||
strcat(root,"/pl");
|
|
||||||
} else {
|
} else {
|
||||||
strcpy(root,YAP_LIBDIR);
|
strcpy(root,YAP_LIBDIR);
|
||||||
}
|
}
|
||||||
@ -1310,12 +1302,12 @@ const char *Yap_findFile(const char *isource, const char *idef,
|
|||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
strcpy(root, "../../../files/Yap/pl");
|
strcpy(root, "../../../files/Yap/pl");
|
||||||
#else
|
#else
|
||||||
root = "../../share/Yap/pl";
|
root = "../share/Yap/pl";
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
strcpy(root, (ftype == YAP_SAVED_STATE || ftype == YAP_OBJ
|
strcpy(root, (ftype == YAP_SAVED_STATE || ftype == YAP_OBJ
|
||||||
? "../../lib/Yap"
|
? "../lib/Yap"
|
||||||
: "../../share/Yap"));
|
: "../share/Yap"));
|
||||||
}
|
}
|
||||||
if (strcmp(root, iroot)==0) {
|
if (strcmp(root, iroot)==0) {
|
||||||
done = true;
|
done = true;
|
||||||
|
Reference in New Issue
Block a user