* add way to have tokens do their custom parse-time preevaluation; this involves...
[citadel.git] / webcit / setup.c
index d4267aec932b913400500e7361a8e1660ff4605b..f0bf85fd898302c55f4e79036e5e3ee12a395659 100644 (file)
@@ -27,11 +27,10 @@ void RegisterNS(const char *NSName, long len,
                int nMinArgs, 
                int nMaxArgs, 
                WCHandlerFunc HandlerFunc,
+               WCPreevalFunc PreEvalFunc,
                int ContextRequired){}
 pthread_key_t MyConKey;
 
-#include "wc_gettext.h"
-
 #ifdef ENABLE_NLS
 
 #ifdef HAVE_USELOCALE 
@@ -252,9 +251,10 @@ void set_value(char *prompt, char str[])
 }
 
 
-
+extern const char *AvailLang[];
 int GetLocalePrefs(void)
 {
+       int nLocales;
        StrBuf *Buf;
        char buf[SIZ];
        char dialog_result[PATH_MAX];
@@ -263,6 +263,10 @@ int GetLocalePrefs(void)
        int offs = 0;
 
 
+       nLocales = 0; 
+       while (!IsEmptyStr(AvailLang[nLocales]))
+               nLocales++;
+
        Buf = NewStrBuf();
 
        StrBufAppendBufPlain(Buf, HKEY("Select the locale webcit should use : \n"), 0);
@@ -270,7 +274,7 @@ int GetLocalePrefs(void)
        StrBufAppendBufPlain(Buf, HKEY(" 0 Let the user select it at the login prompt (default)\n"), 0);
        offs ++;
 #endif
-       for (i = 0; i < NUM_LANGS; i++) {
+       for (i = 0; i < nLocales; i++) {
                StrBufAppendPrintf(Buf, " %ld: %s\n", i + offs, AvailLang[i]);
 
        }