29 #define DISABLE_DEBUGLOG
32 #include "plugindescr_p.h"
34 #include <gwenhywfar/buffer.h>
35 #include <gwenhywfar/debug.h>
36 #include <gwenhywfar/directory.h>
37 #include <gwenhywfar/i18n.h>
39 #include <sys/types.h>
58 GWEN_PLUGIN_DESCRIPTION *pd;
79 pd->langDomain=strdup(p);
91 pd->version=strdup(p);
97 pd->shortDescr=strdup(p);
100 pd->longDescr=strdup(p);
108 assert(pd->refCount);
109 if (pd->refCount==1) {
116 free(pd->shortDescr);
119 free(pd->langDomain);
134 assert(pd->refCount);
152 if (s) np->fileName=strdup(s);
155 if (s) np->path=strdup(s);
157 if (s) np->name=strdup(s);
159 if (s) np->type=strdup(s);
161 if (s) np->langDomain=strdup(s);
163 if (s) np->shortDescr=strdup(s);
165 if (s) np->author=strdup(s);
167 if (s) np->version=strdup(s);
169 if (s) np->longDescr=strdup(s);
170 np->isActive=pd->isActive;
181 __attribute__((unused))
void *user_data) {
189 GWEN_PluginDescription_List2_ForEach
193 GWEN_PluginDescription_List2_free(pdl);
209 if (s) pd->path=strdup(s);
310 if (fmt && strcasecmp(fmt, s)==0) {
382 if (s) pd->fileName=strdup(s);
397 GWEN_PLUGIN_DESCRIPTION_LIST2 *pl;
399 pl=GWEN_PluginDescription_List2_new();
402 if (GWEN_PluginDescription_List2_GetSize(pl)==0) {
403 GWEN_PluginDescription_List2_free(pl);
427 GWEN_PLUGIN_DESCRIPTION_LIST2 *pdl){
431 unsigned int pathLen;
444 "Path \"%s\" is not available",
454 if (strcmp(nbuffer,
".") &&
455 strcmp(nbuffer,
"..")) {
458 nlen=strlen(nbuffer);
460 if (strcasecmp(nbuffer+nlen-4,
".xml")==0) {
474 if (!S_ISDIR(st.st_mode)) {
526 else if (strcasecmp(ft, type)!=0){
542 GWEN_PluginDescription_List2_PushBack(pdl, pd);
547 "Ignoring file \"%s\" (bad/missing type)",
553 "File \"%s\" does not contain a plugin "