Moved default language paths into ~/share/int and bumped to version 0.91.4

This commit is contained in:
Michiel Broek
2007-02-17 12:14:16 +00:00
parent b3fbe17070
commit 3701ac8eef
37 changed files with 386 additions and 308 deletions

View File

@@ -384,7 +384,7 @@ FILE *OpenMacro(const char *filename, int Language, int htmlmode)
while (fread(&lang, langhdr.recsize, 1, pLang) == 1) {
if ((lang.LangKey[0] == Language) && (lang.Available)) {
snprintf(temp, PATH_MAX -1, "%s/%s", lang.MacroPath, filename);
snprintf(temp, PATH_MAX -1, "%s/share/int/macro/%s/%s", getenv("MBSE_ROOT"), lang.lc, filename);
break;
}
}
@@ -403,7 +403,7 @@ FILE *OpenMacro(const char *filename, int Language, int htmlmode)
*/
if (fi == NULL) {
Syslog('-', "Macro file \"%s\" for language %c not found, trying default", filename, Language);
snprintf(temp, PATH_MAX -1, "%s/%s", CFG.bbs_macros, filename);
snprintf(temp, PATH_MAX -1, "%s/share/int/macro/%s/%s", getenv("MBSE_ROOT"), CFG.deflang, filename);
fi = fopen(temp,"r");
}

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Global variables for MBSE BBS
*
*****************************************************************************
* Copyright (C) 1997-2006
* Copyright (C) 1997-2007
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -108,6 +108,6 @@ struct tm *l_date; /* Structure for Date */
time_t ltime;
time_t Time_Now;
char current_language[10]; /* Current language of the user */
#endif

View File

@@ -4,7 +4,7 @@
* Purpose ...............: MBSE BBS main library header
*
*****************************************************************************
* Copyright (C) 1997-2006
* Copyright (C) 1997-2007
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -963,14 +963,14 @@ struct sysconfig {
/* FileNames */
char error_log[15]; /* Name of Error Log */
char default_menu[15]; /* Default Menu */
char current_language[15]; /* Default Language */
char xcurrent_language[15]; /* Default Language */
char chat_log[15]; /* Chat Logfile */
char welcome_logo[15]; /* Welcome Logofile */
/* Paths */
char rnewspath[65]; /* Path to rnews */
char bbs_menus[65]; /* Default Menus */
char bbs_txtfiles[65]; /* Default Textfiles */
char xbbs_menus[65];
char xbbs_txtfiles[65];
char nntpnode[65]; /* NNTP server */
char msgs_path[65]; /* Path to *.msg area */
char alists_path[65]; /* Area lists storage */
@@ -1088,7 +1088,7 @@ struct sysconfig {
char xCallScript[51];
/* Mail Options */
char xquotestr[11]; /* Quote String */
char deflang[11]; /* Default language */
int xMaxTimeBalance; /* Obsolete Time Bank Door */
int xMaxTimeWithdraw;
@@ -1238,7 +1238,7 @@ struct sysconfig {
int nntpdupes; /* NNTP dupes database size */
int newsfeed; /* Newsfeed mode */
int maxarticles; /* Default max articles */
char bbs_macros[65]; /* Default macros path */
char xbbs_macros[65];
char out_queue[65]; /* Outbound queue path */
char mgrlog[15]; /* Area/File-mgr logfile */
@@ -1412,13 +1412,14 @@ struct languagehdr {
struct language {
char Name[30]; /* Name of Language */
char LangKey[2]; /* Language Key */
char MenuPath[81]; /* Path of menu directory */
char TextPath[81]; /* Path of text files */
char xMenuPath[81]; /* Path of menu directory */
char xTextPath[81]; /* Path of text files */
unsigned Available : 1; /* Availability of Language*/
unsigned Deleted : 1; /* Language is deleted */
char Filename[81]; /* Path of language file */
char xFilename[81]; /* Path of language file */
securityrec Security; /* Security level */
char MacroPath[81]; /* Path to the macro files */
char xMacroPath[81]; /* Path to the macro files */
char lc[10]; /* ISO language code */
};