Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
[citadel.git] / webcit / setup.c
index d4267aec932b913400500e7361a8e1660ff4605b..cfb215eb73f8a275349fdf5dfa229d380174d105 100644 (file)
@@ -1,10 +1,7 @@
 /*
- * $Id$
- *
  * WebCit setup utility
  * 
  * (This is basically just an install wizard.  It's not required.)
- *
  */
 
 #include "sysdep.h"
@@ -21,17 +18,19 @@ char setup_directory[SIZ];
 int using_web_installer = 0;
 char suggested_url[SIZ];
 
-/* some copies... */
-int lprintf(int loglevel, const char *format, ...){return 0;}
+/* some copies... 
+int syslog(int loglevel, const char *format, ...){return 0;} */
+void wc_printf(const char *format,...){}
+
 void RegisterNS(const char *NSName, long len, 
                int nMinArgs, 
                int nMaxArgs, 
                WCHandlerFunc HandlerFunc,
+               WCPreevalFunc PreEvalFunc,
                int ContextRequired){}
+void RegisterHeaderHandler(const char *Name, long Len, Header_Evaluator F){}
 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];
@@ -262,6 +262,9 @@ int GetLocalePrefs(void)
        int i = 0;
        int offs = 0;
 
+       nLocales = 0; 
+       while (!IsEmptyStr(AvailLang[nLocales]))
+               nLocales++;
 
        Buf = NewStrBuf();
 
@@ -270,7 +273,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]);
 
        }
@@ -659,6 +662,7 @@ int main(int argc, char *argv[])
        int a;
        char aaa[256];
        int info_only = 0;
+
        strcpy(suggested_url, "http://<your_host_name>:<port>/");
 
        /* set an invalid setup type */