mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 10:45:13 +01:00
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:
parent
1146c6fbb3
commit
4877766d0e
@ -1,3 +1,10 @@
|
|||||||
|
Sat Jul 31 17:52:03 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Sat Jul 31 17:52:03 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Sat Jul 31 17:52:03 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Sat Jul 31 17:52:03 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Sat Jul 31 17:52:03 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Sat Jul 31 17:52:03 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Sat Jul 31 17:52:03 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
Sat Jul 31 17:52:03 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
1999-08-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
* gstrfuncs.c (g_strccpy, g_strecpy): New functions.
|
||||||
|
7
glib.h
7
glib.h
@ -1528,11 +1528,8 @@ gchar* g_strecpy (gchar *dest,
|
|||||||
const gchar *source,
|
const gchar *source,
|
||||||
const gchar *exceptions);
|
const gchar *exceptions);
|
||||||
|
|
||||||
/* deprecated function */
|
/* deprecated function (used to be a real function) */
|
||||||
gchar* g_strescape (gchar *string);
|
#define g_strescape(src) g_strecpy (g_new (char, strlen (src)*4+1), (src), NULL)
|
||||||
|
|
||||||
/* Define a macro for it */
|
|
||||||
#define g_strescape(src) g_strecpy (g_malloc (strlen (src)*4+1), src, NULL)
|
|
||||||
|
|
||||||
gpointer g_memdup (gconstpointer mem,
|
gpointer g_memdup (gconstpointer mem,
|
||||||
guint byte_size);
|
guint byte_size);
|
||||||
|
@ -1528,11 +1528,8 @@ gchar* g_strecpy (gchar *dest,
|
|||||||
const gchar *source,
|
const gchar *source,
|
||||||
const gchar *exceptions);
|
const gchar *exceptions);
|
||||||
|
|
||||||
/* deprecated function */
|
/* deprecated function (used to be a real function) */
|
||||||
gchar* g_strescape (gchar *string);
|
#define g_strescape(src) g_strecpy (g_new (char, strlen (src)*4+1), (src), NULL)
|
||||||
|
|
||||||
/* Define a macro for it */
|
|
||||||
#define g_strescape(src) g_strecpy (g_malloc (strlen (src)*4+1), src, NULL)
|
|
||||||
|
|
||||||
gpointer g_memdup (gconstpointer mem,
|
gpointer g_memdup (gconstpointer mem,
|
||||||
guint byte_size);
|
guint byte_size);
|
||||||
|
@ -1188,9 +1188,9 @@ g_strecpy (gchar *dest,
|
|||||||
if ((*p < ' ') || (*p >= 0177))
|
if ((*p < ' ') || (*p >= 0177))
|
||||||
{
|
{
|
||||||
*q++ = '\\';
|
*q++ = '\\';
|
||||||
*q++ = '0' + (((*p) >> 6)&07);
|
*q++ = '0' + (((*p) >> 6) & 07);
|
||||||
*q++ = '0' + (((*p) >> 3)&07);
|
*q++ = '0' + (((*p) >> 3) & 07);
|
||||||
*q++ = '0' + ((*p)&07);
|
*q++ = '0' + ((*p) & 07);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*q++ = *p;
|
*q++ = *p;
|
||||||
@ -1203,43 +1203,6 @@ g_strecpy (gchar *dest,
|
|||||||
return 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 */
|
/* blame Elliot for these next five routines */
|
||||||
gchar*
|
gchar*
|
||||||
g_strchug (gchar *string)
|
g_strchug (gchar *string)
|
||||||
|
43
gstrfuncs.c
43
gstrfuncs.c
@ -1188,9 +1188,9 @@ g_strecpy (gchar *dest,
|
|||||||
if ((*p < ' ') || (*p >= 0177))
|
if ((*p < ' ') || (*p >= 0177))
|
||||||
{
|
{
|
||||||
*q++ = '\\';
|
*q++ = '\\';
|
||||||
*q++ = '0' + (((*p) >> 6)&07);
|
*q++ = '0' + (((*p) >> 6) & 07);
|
||||||
*q++ = '0' + (((*p) >> 3)&07);
|
*q++ = '0' + (((*p) >> 3) & 07);
|
||||||
*q++ = '0' + ((*p)&07);
|
*q++ = '0' + ((*p) & 07);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*q++ = *p;
|
*q++ = *p;
|
||||||
@ -1203,43 +1203,6 @@ g_strecpy (gchar *dest,
|
|||||||
return 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 */
|
/* blame Elliot for these next five routines */
|
||||||
gchar*
|
gchar*
|
||||||
g_strchug (gchar *string)
|
g_strchug (gchar *string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user