src/strescape.{c,h}: sanitized fn proto to keep in sync with rest of code

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
This commit is contained in:
Sergei Trofimovich 2009-07-15 21:02:50 +03:00 committed by Slava Zanko
parent 16811ed607
commit 3a7de274e0
2 changed files with 6 additions and 6 deletions

View File

@ -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++) {

View File

@ -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 *);