src/module.c

changeset 3565
66a8f8dcaacc
parent 3563
ea2789c8077c
child 3572
d07e14aa6f26
equal deleted inserted replaced
3564:7ce331b1c753 3565:66a8f8dcaacc
87 gchar *path; 87 gchar *path;
88 struct gaim_plugin_description *plugdes; 88 struct gaim_plugin_description *plugdes;
89 struct gaim_plugin *plug; 89 struct gaim_plugin *plug;
90 char userspace[128]; 90 char userspace[128];
91 char *probedirs[] = {LIBDIR, &userspace, 0}; 91 char *probedirs[] = {LIBDIR, &userspace, 0};
92 int l;
92 #if GAIM_PLUGINS 93 #if GAIM_PLUGINS
93 char *(*gaim_plugin_init)(GModule *); 94 char *(*gaim_plugin_init)(GModule *);
94 char *(*cfunc)(); 95 char *(*cfunc)();
95 int l;
96 struct gaim_plugin_description *(*desc)(); 96 struct gaim_plugin_description *(*desc)();
97 GModule *handle; 97 GModule *handle;
98 #endif 98 #endif
99 99
100 g_snprintf(userspace, sizeof(userspace), "%s" G_DIR_SEPARATOR_S ".gaim", g_get_home_dir()); 100 g_snprintf(userspace, sizeof(userspace), "%s" G_DIR_SEPARATOR_S ".gaim", g_get_home_dir());
165 if (!g_module_supported()) 165 if (!g_module_supported())
166 return NULL; 166 return NULL;
167 if (!filename || !strlen(filename)) 167 if (!filename || !strlen(filename))
168 return NULL; 168 return NULL;
169 169
170 #ifdef USE_PERL
170 if (is_so_file(filename, ".pl")) { 171 if (is_so_file(filename, ".pl")) {
171 return perl_load_file(filename); 172 return perl_load_file(filename);
172 } 173 }
174 #endif
173 175
174 while (filename && p) { 176 while (filename && p) {
175 plug = (struct gaim_plugin *)p->data; 177 plug = (struct gaim_plugin *)p->data;
176 if (!strcmp(filename, plug->path)) 178 if (!strcmp(filename, plug->path))
177 break; 179 break;

mercurial