diff --git a/src/strescape.c b/src/strescape.c index d19ed91d0..d23010d7a 100644 --- a/src/strescape.c +++ b/src/strescape.c @@ -46,7 +46,7 @@ static const char ESCAPE_GLOB_CHARS[] = "$*\\"; /*** public functions ****************************************************************************/ char * -strutils_escape (const char *src, int src_len, const char *escaped_chars, +strutils_escape (const char *src, gsize src_len, const char *escaped_chars, gboolean escape_non_printable) { GString *ret; @@ -60,7 +60,7 @@ strutils_escape (const char *src, int src_len, const char *escaped_chars, ret = g_string_new (""); - if (src_len == -1) + if (src_len == (gsize)-1) src_len = strlen (src); for (curr_index = 0; curr_index < src_len; curr_index++) { @@ -96,7 +96,7 @@ strutils_escape (const char *src, int src_len, const char *escaped_chars, /* --------------------------------------------------------------------------------------------- */ char * -strutils_unescape (const char *src, int src_len, const char *unescaped_chars, +strutils_unescape (const char *src, gsize src_len, const char *unescaped_chars, gboolean unescape_non_printable) { GString *ret; @@ -110,7 +110,7 @@ strutils_unescape (const char *src, int src_len, const char *unescaped_chars, ret = g_string_new (""); - if (src_len == -1) + if (src_len == (gsize)-1) src_len = strlen (src); for (curr_index = 0; curr_index < src_len-1; curr_index++) { diff --git a/src/strescape.h b/src/strescape.h index 2fbd2f1db..5d69461f7 100644 --- a/src/strescape.h +++ b/src/strescape.h @@ -15,8 +15,8 @@ /*** declarations of public functions ************************************************************/ -char *strutils_escape (const char *, int, const char *, gboolean); -char *strutils_unescape (const char *, int, const char *, gboolean); +char *strutils_escape (const char *, gsize, const char *, gboolean); +char *strutils_unescape (const char *, gsize, const char *, gboolean); char *strutils_shell_unescape (const char *); char *strutils_shell_escape (const char *);