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,
void RegisterHeaderHandler(const char *Name, long Len, Header_Evaluator F){}
pthread_key_t MyConKey;
-#ifdef ENABLE_NLS
-
#ifdef HAVE_USELOCALE
int localeoffset = 1;
-#else
-int localeoffset = 0;
#endif
-#endif
/*
* Delete an entry from /etc/inittab
*/
char levels[SIZ];
char state[SIZ];
char prog[SIZ];
- int rv;
inittab = strdup("");
if (inittab == NULL) return;
fclose(fp);
fp = fopen("/etc/inittab", "w");
if (fp != NULL) {
- rv = fwrite(inittab, strlen(inittab), 1, fp);
+ fwrite(inittab, strlen(inittab), 1, fp);
fclose(fp);
kill(1, SIGHUP); /* Tell init to re-read /etc/inittab */
}
char dialog_result[PATH_MAX];
char setupmsg[SIZ];
FILE *fp;
- int rv;
strcpy(setupmsg, "");
prompt,
str,
dialog_result);
- rv = system(buf);
+ system(buf);
fp = fopen(dialog_result, "r");
if (fp != NULL) {
if (fgets(str, sizeof buf, fp)){
FILE *fp;
int i = 0;
int offs = 0;
- int rv;
-
nLocales = 0;
while (!IsEmptyStr(AvailLang[nLocales]))
ChrPtr(Buf),
0L,
dialog_result);
- rv = system(buf);
+ system(buf);
fp = fopen(dialog_result, "r");
if (fp != NULL) {
char *str = &buf[0];
void important_message(char *title, char *msgtext)
{
char buf[SIZ];
- int rv;
switch (setup_type) {
sprintf(buf, "exec %s --msgbox '%s' 19 72",
getenv("CTDL_DIALOG"),
msgtext);
- rv = system(buf);
+ system(buf);
break;
}
}
*/
void install_init_scripts(void)
{
-#ifdef ENABLE_NLS
+#ifdef HAVE_USELOCALE
int localechoice;
#endif
char question[1024];
struct stat etcinitd;
FILE *fp;
char *initfile = "/etc/init.d/webcit";
- int rv;
fp = fopen(initfile, "r");
if (fp != NULL) {
return;
-#ifdef ENABLE_NLS
-
+#ifdef HAVE_USELOCALE
localechoice = GetLocalePrefs();
-
#endif
/* Defaults */
sprintf(http_port, "2000");
fprintf(fp, "CTDL_HOSTNAME=%s\n", hostname);
fprintf(fp, "CTDL_PORTNAME=%s\n", portname);
-#ifdef ENABLE_NLS
-
- if (localechoice == 0) {
#ifdef HAVE_USELOCALE
- fprintf(fp, "unset LANG\n");
-#else
- fprintf(fp, "export WEBCIT_LANG=c\n");
-#endif
- }
- else {
+ if (localechoice == 0) {
fprintf(fp, "export WEBCIT_LANG=%s\n", AvailLang[localechoice - localeoffset]);
-
}
#else
fprintf(fp, "# your system doesn't support locales\n");
#endif
+
+
+
+
+
fprintf(fp, "\n"
"\n"
"case \"$1\" in\n"
chmod(initfile, 0755);
/* Set up the run levels. */
- rv = system("/bin/rm -f /etc/rc?.d/[SK]??webcit 2>/dev/null");
+ system("/bin/rm -f /etc/rc?.d/[SK]??webcit 2>/dev/null");
snprintf(command, sizeof(command), "for x in 2 3 4 5 ; do [ -d /etc/rc$x.d ] && ln -s %s /etc/rc$x.d/S84webcit ; done 2>/dev/null", initfile);
- rv = system(command);
+ system(command);
snprintf(command, sizeof(command), "for x in 0 6 S; do [ -d /etc/rc$x.d ] && ln -s %s /etc/rc$x.d/K15webcit ; done 2>/dev/null", initfile);
- rv = system(command);
+ system(command);
}
int a;
char aaa[256];
int info_only = 0;
- int rv;
strcpy(suggested_url, "http://<your_host_name>:<port>/");
install_init_scripts();
if (!access("/etc/init.d/webcit", X_OK)) {
- rv = system("/etc/init.d/webcit stop");
- rv = system("/etc/init.d/webcit start");
+ system("/etc/init.d/webcit stop");
+ system("/etc/init.d/webcit start");
}
sprintf(aaa,