}
FreeStrBuf(&Key);
}
+ FreeStrBuf(&ReadBuf);
}
}
{
size_t nchars;
Buf = (StrBuf*) Value;
+ if (Buf == NULL)
+ continue;
nchars = StrLength(Buf);
if (nchars > 80){
int n = 0;
if (n == 0)
serv_printf("%s|%s", Key, ChrPtr(SubBuf));
else
- serv_printf(" %s", Key, ChrPtr(SubBuf));
+ serv_printf(" %s", ChrPtr(SubBuf));
offset += nchars;
+ nchars = StrLength(Buf) - offset;
n++;
}
get_preference("signature", &Signature);
ebuf = NewStrBuf();
StrBufEUid_unescapize(ebuf, Signature);
- escputs(ChrPtr(ebuf));
+ escputs((char*)ChrPtr(ebuf));///TODO
FreeStrBuf(&ebuf);
wprintf("</textarea>"
"</div>"
wprintf(_("Default character set for email headers:"));
wprintf("</td><td>");
wprintf("<input type=\"text\" NAME=\"default_header_charset\" MAXLENGTH=\"32\" VALUE=\"");
- escputs(ChrPtr(Buf));
+ escputs((char*)ChrPtr(Buf)); // here shouldn't be bad chars, so...
wprintf("\">");
wprintf("</td></tr>");
void set_preferences(void)
{
long fmt;
- StrBuf *ebuf;
+ StrBuf *buf, *encBuf;
int *time_format_cache;
time_format_cache = &(WC->time_format_cache);
set_preference("default_header_charset", NewStrBufPlain(bstr("default_header_charset"), -1), 0);
set_preference("emptyfloors", NewStrBufPlain(bstr("emptyfloors"), -1), 0);
- ebuf = NewStrBufPlain(bstr("signature"), -1);
- /////TODOeuid_escapize(ebuf);
- set_preference("signature", ebuf, 1);
+ buf = NewStrBufPlain(bstr("signature"), -1);
+ encBuf = NewStrBuf();
+ StrBufEUid_escapize(encBuf, buf);
+ set_preference("signature", encBuf, 1);
display_main_menu();
}
+void
+InitModule_PREFERENCES
+(void)
+{
+ WebcitAddUrlHandler(HKEY("display_preferences"), display_preferences, 0);
+ WebcitAddUrlHandler(HKEY("set_preferences"), set_preferences, 0);
+}
/*@}*/