*
*/
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/socket.h>
-#include <limits.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <string.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <pthread.h>
-#include <signal.h>
-
-#ifdef HAVE_ICONV
-#include <iconv.h>
-#endif
-
#include "webcit.h"
#include "vcard.h"
#include "webserver.h"
buffer_length = content_length + line_length + 2;
msg = realloc(msg, buffer_length);
if (msg == NULL) {
- wprintf("<B>realloc() error! "
- "couldn't get %d bytes: %s</B><br /><br />\n",
+ wprintf("<B>");
+ wprintf(_("realloc() error! couldn't get %d bytes: %s"),
buffer_length + 1,
strerror(errno));
+ wprintf("</B><br /><br />\n");
return;
}
strcpy(&msg[content_length], buf);
#ifdef HAVE_ICONV
if ( (strcasecmp(charset, "us-ascii"))
- && (strcasecmp(charset, "UTF-8")) ) {
+ && (strcasecmp(charset, "UTF-8"))
+ && (strcasecmp(charset, ""))
+ ) {
ic = iconv_open("UTF-8", charset);
if (ic == (iconv_t)(-1) ) {
- lprintf(5, "iconv_open() failed: %s\n", strerror(errno));
+ lprintf(5, "%s:%d iconv_open() failed: %s\n",
+ __FILE__, __LINE__, strerror(errno));
}
}
if (ic != (iconv_t)(-1) ) {