* added mystpcpy to ikarus-main.c to be used in place of stpcpy;
This commit is contained in:
parent
d6eeb0ab7a
commit
74343ba442
BIN
bin/ikarus
BIN
bin/ikarus
Binary file not shown.
|
@ -82,6 +82,16 @@ int global_exe(char* x){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static char* mystpcpy(char* x, char* y){
|
||||||
|
while(*y){
|
||||||
|
*x = *y;
|
||||||
|
x++; y++;
|
||||||
|
}
|
||||||
|
*x = 0;
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char** argv){
|
int main(int argc, char** argv){
|
||||||
char buff[FILENAME_MAX];
|
char buff[FILENAME_MAX];
|
||||||
char* boot_file = get_option("-b", argc, argv);
|
char* boot_file = get_option("-b", argc, argv);
|
||||||
|
@ -98,10 +108,10 @@ int main(int argc, char** argv){
|
||||||
while(*path){
|
while(*path){
|
||||||
int len = copy_fst_path(buff, path);
|
int len = copy_fst_path(buff, path);
|
||||||
char* x = buff + len;
|
char* x = buff + len;
|
||||||
x = stpcpy(x, "/");
|
x = mystpcpy(x, "/");
|
||||||
x = stpcpy(x, argv[0]);
|
x = mystpcpy(x, argv[0]);
|
||||||
if(file_exists(buff)){
|
if(file_exists(buff)){
|
||||||
x = stpcpy(x, ".boot");
|
x = mystpcpy(x, ".boot");
|
||||||
boot_file = buff;
|
boot_file = buff;
|
||||||
path = "";
|
path = "";
|
||||||
}
|
}
|
||||||
|
@ -117,8 +127,8 @@ int main(int argc, char** argv){
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char* x = buff;
|
char* x = buff;
|
||||||
x = stpcpy(x, argv[0]);
|
x = mystpcpy(x, argv[0]);
|
||||||
x = stpcpy(x, ".boot");
|
x = mystpcpy(x, ".boot");
|
||||||
boot_file = buff;
|
boot_file = buff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue