summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-11 05:44:06 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-11 05:44:06 +0000
commit3c9be46f96e2ce6bdca9d268f7d477704259fe95 (patch)
tree0065ec92556a1fa460d4a466a5cd0e0b43d0fa88 /src
parent42de9db2762a63f69321fc4e89ea81e16a5a206a (diff)
downloadiconv-3c9be46f96e2ce6bdca9d268f7d477704259fe95.tar.gz
iconv-3c9be46f96e2ce6bdca9d268f7d477704259fe95.tar.bz2
Make module initialisation work sensibly on all platforms.
Use UNICODE_DIR on non-RO as the path to the Unicode resource. Fix a bunch of logging statements that didn't use %zd for size_t. svn path=/trunk/iconv/; revision=5681
Diffstat (limited to 'src')
-rw-r--r--src/iconv.c5
-rw-r--r--src/internal.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/iconv.c b/src/iconv.c
index aa18fa5..0f7469a 100644
--- a/src/iconv.c
+++ b/src/iconv.c
@@ -274,7 +274,8 @@ size_t iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf,
LOG(("done"));
- LOG(("read: %d, ibl: %d, obl: %d", read, *inbytesleft, *outbytesleft));
+ LOG(("read: %d, ibl: %zd, obl: %zd",
+ read, *inbytesleft, *outbytesleft));
/* 2 */
if (read == *inbytesleft) {
@@ -354,7 +355,7 @@ int character_callback(void *handle, UCS4 c)
e = (struct encoding_context*)handle;
- LOG(("outbuf: %p, free: %d", *e->outbuf, *e->outbytesleft));
+ LOG(("outbuf: %p, free: %zd", *e->outbuf, *e->outbytesleft));
LOG(("writing: %d", c));
if (e->out) {
diff --git a/src/internal.h b/src/internal.h
index d19bd09..9d27882 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -8,6 +8,7 @@
#ifndef DEBUG
#define LOG(x)
#else
+#include <stdio.h>
#define LOG(x) (printf(__FILE__ " %s %i: ", __func__, __LINE__), printf x, fputc('\n', stdout))
#endif