1
1

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

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Этот коммит содержится в:
Sergei Trofimovich 2009-07-15 21:02:50 +03:00 коммит произвёл Slava Zanko
родитель 16811ed607
Коммит 3a7de274e0
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

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

Просмотреть файл

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