diff plugins/perl/perl-common.c @ 11170:0e9e2b923d09

[gaim-migrate @ 13271] Fixed some bugs and made some additions to the XSUBS. Added some of my test scripts which are incomplete, but mostly functional. GaimPluginPrefs and GaimGtkPluginPrefs--using evals to do the Gtk widgets with gtk2-perl--work. Plugin actions can now be added, but only one for now. committer: Tailor Script <tailor@pidgin.im>
author John H. Kelm <johnkelm@gmail.com>
date Fri, 29 Jul 2005 13:38:00 +0000
parents 92cbf9713795
children b284c703d398
line wrap: on
line diff
--- a/plugins/perl/perl-common.c	Fri Jul 29 05:05:52 2005 +0000
+++ b/plugins/perl/perl-common.c	Fri Jul 29 13:38:00 2005 +0000
@@ -7,6 +7,23 @@
 
 static GHashTable *object_stashes = NULL;
 
+void gaim_perl_normalize_script_name(char *name)
+{
+        char *c;
+
+        c = strrchr(name, '.');
+
+        if (c != NULL)
+                *c = '\0';
+
+        for (c = name; *c != '\0'; c++)
+        {
+                if (*c != '_' && !g_ascii_isalnum(*c))
+                        *c = '_';
+        }
+}
+
+
 static int
 magic_free_object(pTHX_ SV *sv, MAGIC *mg)
 {