cleaned up mangling of properties and names in ladspa by using g_strcanon added g_strcanon to gobject2gtk.[ch], not t...

Original commit message from CVS:
* cleaned up mangling of properties and names in ladspa by using g_strcanon
* added g_strcanon to gobject2gtk.[ch], not tested though
This commit is contained in:
Andy Wingo 2001-11-23 04:20:54 +00:00
parent ec3cd024d3
commit 680fdd6ce7
2 changed files with 27 additions and 0 deletions

View file

@ -23,7 +23,26 @@ g_slist_delete_link (GSList *list, GSList *llink)
return temp;
}
// string helper functions not in glib 1.2
gchar*
g_strcanon (gchar *string,
const gchar *valid_chars,
gchar substitutor)
{
register gchar *c;
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (valid_chars != NULL, NULL);
for (c = string; *c; c++)
{
if (!strchr (valid_chars, *c))
*c = substitutor;
}
return string;
}
// GObject dummy implementation
static void

View file

@ -21,6 +21,14 @@ GSList *g_slist_delete_link (GSList *list, GSList *llink);
#define g_string_append_printf g_string_printfa
// string helper functions not in glib 1.2
#define G_CSET_A_2_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz"
#define G_CSET_DIGITS "0123456789"
gchar* g_strcanon (gchar *string, const gchar *valid_chars,
gchar substitutor);
// GObject
typedef struct _GObject GObject;