diff options
author | Manish Singh <yosh@src.gnome.org> | 1999-08-01 00:54:14 +0000 |
---|---|---|
committer | Manish Singh <yosh@src.gnome.org> | 1999-08-01 00:54:14 +0000 |
commit | 4877766d0efcf6ab78300a4beab8fab5e9749fa5 (patch) | |
tree | 1319c564c11730460cce238f28c0247e1a698e85 /gstrfuncs.c | |
parent | 1146c6fbb37bb85f8c49f572cfae9469339f89ff (diff) | |
download | glib-4877766d0efcf6ab78300a4beab8fab5e9749fa5.tar.gz |
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
Diffstat (limited to 'gstrfuncs.c')
-rw-r--r-- | gstrfuncs.c | 43 |
1 files changed, 3 insertions, 40 deletions
diff --git a/gstrfuncs.c b/gstrfuncs.c index 1ed8a2df1..b71fd3f0f 100644 --- a/gstrfuncs.c +++ b/gstrfuncs.c @@ -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) |