fix argv[0] discovery.

This commit is contained in:
Vítor Santos Costa
2013-01-13 17:55:13 +00:00
parent ec37045ca3
commit 798afc81c4
16 changed files with 89 additions and 30 deletions

View File

@@ -26,15 +26,15 @@ this code is no being maintained anymore
* YAP_FindExecutable(argv[0]) should be called on yap initialization to
* locate the executable of Yap
*/
void
Yap_FindExecutable(char *name)
char *
Yap_FindExecutable(void)
{
/* use dld_find_executable */
char *res;
if(name != NULL && (res=dld_find_executable(name))) {
strcpy(GLOBAL_Executable,res);
return GLOBAL_Executable;
} else {
strcpy(GLOBAL_Executable,"./yap");
return "yap";
}
}