From: glenlow Date: Tue, 26 May 2009 04:30:20 +0000 (+0000) Subject: carefully reapplied r1.83 without clobbering changes X-Git-Tag: LAST_LIBGRAPH~32^2~2016 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39c02c39b50f83a2d59d04a2791678a4420a81fd;p=graphviz carefully reapplied r1.83 without clobbering changes --- diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index ba3f127c4..4eeffdb8c 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -33,6 +33,10 @@ #include "const.h" +#ifndef HAVE_STRCASECMP +extern int strcasecmp(const char *s1, const char *s2); +#endif + /* * Define an apis array of name strings using an enumerated api_t as index. * The enumerated type is defined gvplugin.h. The apis array is @@ -293,17 +297,18 @@ gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, const char *str) continue; /* types empty or mismatched */ if (dep && reqdep && strcmp(dep, reqdep)) continue; /* dependencies not empty, but mismatched */ - if (! reqpkg) - break; /* found with no packagename constraints */ - if (strcmp(reqpkg, (*pnext)->package->name) == 0) - break; /* found with required matching packagname */ + if (! reqpkg || strcmp(reqpkg, (*pnext)->package->name) == 0) + { + /* found with no packagename constraints, or with required matching packagname */ + + if (dep && (apidep != api)) /* load dependency if needed, continue if can't find */ + if (! (gvplugin_load(gvc, apidep, dep))) + continue; + break; + } } rv = *pnext; - if (dep && (apidep != api)) /* load dependency if needed */ - if (! (gvplugin_load(gvc, apidep, dep))) - rv = NULL; - if (rv && rv->typeptr == NULL) { library = gvplugin_library_load(gvc, rv->package->path); if (library) {