int sz, rc, i, j;
struct stat config_st, libdir_st;
FILE *f;
- char *config_path, *home, *config;
+ char *config_path, *config_glob, *home, *config;
glob_t globbuf;
gvplugin_library_t *library;
gvplugin_api_t *apis;
char *dot_graphviz = "/.graphviz";
char *libdir = GVLIBDIR;
+ char *plugin_glob = "/libgvplugin*.so.0";
#define SZ_CONFIG 1000
return;
}
- rc = glob("/home/ellson/FIX/Linux.x86_64/lib/graphviz/libgvplugin*.so",
- GLOB_NOSORT, NULL, &globbuf);
+ config_glob = malloc(strlen(libdir) + strlen(plugin_glob) + 1);
+ strcpy(config_glob, libdir);
+ strcat(config_glob, plugin_glob);
+
+ rc = glob(config_glob, GLOB_NOSORT, NULL, &globbuf);
if (rc == 0) {
for (j = 0; j < globbuf.gl_pathc; j++) {
}
}
globfree(&globbuf);
-
+ free(config_glob);
fclose(f);
return; /* all plugins have been installed */
}
s = strrchr(path, '/');
sym = malloc(strlen(s) + strlen(suffix) + 1);
strcpy(sym, s+4); /* strip leading "/lib" */
- s = strchr(sym, '.'); /* strip trailing ".so" */
+ s = strchr(sym, '.'); /* strip trailing ".so.0" */
strcpy(s,"_LTX_library"); /* append "_LTX_library" */
ptr = lt_dlsym (hndl, sym);