glib.h the #define for g_strescape interfered with the compilation of the

* glib.h
* gstrfuncs.c: the #define for g_strescape interfered with the
compilation of the function, so just remove the function and
note that it's deprecated in the header

-Yosh
This commit is contained in:
Manish Singh
1999-08-01 00:54:14 +00:00
parent 1146c6fbb3
commit 4877766d0e
12 changed files with 66 additions and 90 deletions

View File

@@ -1188,9 +1188,9 @@ g_strecpy (gchar *dest,
if ((*p < ' ') || (*p >= 0177))
{
*q++ = '\\';
*q++ = '0' + (((*p) >> 6)&07);
*q++ = '0' + (((*p) >> 3)&07);
*q++ = '0' + ((*p)&07);
*q++ = '0' + (((*p) >> 6) & 07);
*q++ = '0' + (((*p) >> 3) & 07);
*q++ = '0' + ((*p) & 07);
}
else
*q++ = *p;
@@ -1203,43 +1203,6 @@ g_strecpy (gchar *dest,
return dest;
}
gchar*
g_strescape (gchar *string)
{
gchar *q;
gchar *escaped;
guint escapes_needed = 0;
gchar *p = string;
g_message ("g_strescape() is deprecated");
g_return_val_if_fail (string != NULL, NULL);
while (*p != '\000')
{
escapes_needed += (*p == '\\' || *p == '"');
p++;
}
if (!escapes_needed)
return g_strdup (string);
escaped = g_new (gchar, strlen (string) + escapes_needed + 1);
p = string;
q = escaped;
while (*p != '\000')
{
if (*p == '\\' || *p == '"')
*q++ = '\\';
*q++ = *p++;
}
*q = '\000';
return escaped;
}
/* blame Elliot for these next five routines */
gchar*
g_strchug (gchar *string)