diff -up inadyn-mt.v.02.18.14/src/lang.c.xx inadyn-mt.v.02.18.14/src/lang.c
--- inadyn-mt.v.02.18.14/src/lang.c.xx 2010-05-11 18:39:05.238914650 +0200
+++ inadyn-mt.v.02.18.14/src/lang.c 2010-05-11 18:40:44.384788369 +0200
@@ -456,10 +456,12 @@ static RC_TYPE parser_utf_8_read_option(
}
static char *searchedLangFile(FILE *pLOG_FILE,char **dest,char *langFileName)
-{
-
-
- return searchedProgFile(pLOG_FILE,dest,"inadyn-mt","lang",3,langFileName);
+{
+ char *res = searchedProgFile(pLOG_FILE,dest,"inadyn-mt","lang",3,langFileName);
+ if (!res)
+ return searchedProgFile(pLOG_FILE,dest,"inadyn-mt", "lang",3,"en.lng");
+ else
+ return res;
}
char *lang_code(char *szCode,char *szLocale)
diff -up inadyn-mt.v.02.18.14/src/path.c.xx inadyn-mt.v.02.18.14/src/path.c
--- inadyn-mt.v.02.18.14/src/path.c.xx 2010-02-13 21:42:46.000000000 +0100
+++ inadyn-mt.v.02.18.14/src/path.c 2010-05-11 18:38:07.797788437 +0200
@@ -603,7 +603,6 @@ char *get_file(char *path,char *fileName
a_path=safe_malloc(strlen(path)+strlen(fileName)+1);
-
if (!(is_file(strcat(strcpy(a_path,path),fileName)))) {
@@ -640,7 +639,7 @@ char *progMetaFile(FILE *pLOG_FILE,char
return NULL;
-
+
dir=safe_malloc(strlen(in_dir)+strlen(path)+strlen(fileName)+2); /*add 1 for dir separater*/
strcpy(dir,in_dir);
@@ -703,7 +702,6 @@ char *progMetaFile(FILE *pLOG_FILE,char
#else
-
fp=utf_fopen(dir,"r");
@@ -796,12 +794,13 @@ char *searchedProgFile(FILE *pLOG_FILE,c
if (!(progMetaFile(pLOG_FILE,dest,normed_path,path_len,langFileName,ancestor_path(&a_path,root,cwd),cwd))) {
+
free(a_path); a_path=NULL;
- prefixed_path=safe_malloc(strlen("/usr/local/etc/")+strlen(root)+strlen(normed_path)+2);
+ prefixed_path=safe_malloc(strlen("/etc/")+strlen(root)+strlen(normed_path)+2);
- strcat(strcat(strcat(strcpy(prefixed_path,"/usr/local/etc/"),root),"/"),normed_path);
+ strcat(strcat(strcat(strcpy(prefixed_path,"/etc/"),root),"/"),normed_path);
/*
TODO: should search relative to where executing from (/bin, /usr/local/bin, should map to
/etc, /usr/local/etc respectively
@@ -810,9 +809,9 @@ char *searchedProgFile(FILE *pLOG_FILE,c
if (!(*dest=get_file(prefixed_path,langFileName))) {
- prefixed_path=safe_realloc(prefixed_path,strlen("/etc/")+strlen(root)+strlen(normed_path)+2);
+ prefixed_path=safe_realloc(prefixed_path,strlen("/usr/share/")+strlen(root)+strlen(normed_path)+2);
- strcat(strcat(strcat(strcpy(prefixed_path,"/etc/"),root),"/"),normed_path);
+ strcat(strcat(strcat(strcpy(prefixed_path,"/usr/share/"),root),"/"),normed_path);
*dest=get_file(prefixed_path,langFileName);