tUse a signed rather than unsigned type for lengths, since we compare them to -… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 95844be552580cd9254ce2086d57e9706e4d90f2 | |
parent 16161c65c04a7e3f60efcd3a8f03e3a3e8ceac4c | |
Author: Ben Webb <[email protected]> | |
Date: Sat, 19 Oct 2002 20:47:11 +0000 | |
Use a signed rather than unsigned type for lengths, since we compare them to | |
-1... | |
Diffstat: | |
M src/convert.c | 6 +++--- | |
M src/convert.h | 4 ++-- | |
2 files changed, 5 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/src/convert.c b/src/convert.c | |
t@@ -94,7 +94,7 @@ gboolean Conv_Needed(Converter *conv) | |
} | |
static gchar *do_convert(const gchar *from_codeset, const gchar *to_codeset, | |
- const gchar *from_str, size_t from_len) | |
+ const gchar *from_str, int from_len) | |
{ | |
#ifdef HAVE_GLIB2 | |
gchar *to_str; | |
t@@ -132,12 +132,12 @@ static gchar *do_convert(const gchar *from_codeset, cons… | |
#endif | |
} | |
-gchar *Conv_ToExternal(Converter *conv, const gchar *int_str, size_t len) | |
+gchar *Conv_ToExternal(Converter *conv, const gchar *int_str, int len) | |
{ | |
return do_convert(int_codeset, conv->ext_codeset, int_str, len); | |
} | |
-gchar *Conv_ToInternal(Converter *conv, const gchar *ext_str, size_t len) | |
+gchar *Conv_ToInternal(Converter *conv, const gchar *ext_str, int len) | |
{ | |
return do_convert(conv->ext_codeset, int_codeset, ext_str, len); | |
} | |
diff --git a/src/convert.h b/src/convert.h | |
t@@ -38,8 +38,8 @@ void Conv_SetInternalCodeset(const gchar *codeset); | |
Converter *Conv_New(void); | |
void Conv_SetCodeset(Converter *conv, const gchar *codeset); | |
gboolean Conv_Needed(Converter *conv); | |
-gchar *Conv_ToExternal(Converter *conv, const gchar *int_str, size_t len); | |
-gchar *Conv_ToInternal(Converter *conv, const gchar *ext_str, size_t len); | |
+gchar *Conv_ToExternal(Converter *conv, const gchar *int_str, int len); | |
+gchar *Conv_ToInternal(Converter *conv, const gchar *ext_str, int len); | |
void Conv_Free(Converter *conv); | |
#endif /* __DP_CONVERT_H__ */ |