Index: trunk/src/hid_init.c =================================================================== --- trunk/src/hid_init.c (revision 4985) +++ trunk/src/hid_init.c (revision 4986) @@ -78,7 +78,7 @@ } else uninit = NULL; - plugin_register(basename, path, so, 1, uninit); + pcb_plugin_register(basename, path, so, 1, uninit); free(symname); } else Index: trunk/src/main.c =================================================================== --- trunk/src/main.c (revision 4985) +++ trunk/src/main.c (revision 4986) @@ -228,7 +228,7 @@ free(PCB); PCB = NULL; - plugins_uninit(); + pcb_plugins_uninit(); pcb_hid_uninit(); pcb_events_uninit(); @@ -383,7 +383,7 @@ buildin_init(); pcb_hid_init(); - plugins_init(); + pcb_plugins_init(); /* Export pcb from command line if requested. */ Index: trunk/src/plug_footprint.c =================================================================== --- trunk/src/plug_footprint.c (revision 4985) +++ trunk/src/plug_footprint.c (revision 4986) @@ -105,7 +105,7 @@ FILE *pcb_fp_fopen(const char *path, const char *name, pcb_fp_fopen_ctx_t *fctx) { FILE *res = NULL; - HOOK_CALL(pcb_plug_fp_t, plug_fp_chain, fopen, res, != NULL, (self, path, name, fctx)); + PCB_HOOK_CALL(pcb_plug_fp_t, plug_fp_chain, fopen, res, != NULL, (self, path, name, fctx)); return res; } @@ -352,7 +352,7 @@ /* Next read in any footprints in the top level dir */ res = -1; - HOOK_CALL(pcb_plug_fp_t, plug_fp_chain, load_dir, res, >= 0, (self, toppath)); + PCB_HOOK_CALL(pcb_plug_fp_t, plug_fp_chain, load_dir, res, >= 0, (self, toppath)); if (res >= 0) n_footprints += res; else Index: trunk/src/plug_import.c =================================================================== --- trunk/src/plug_import.c (revision 4985) +++ trunk/src/plug_import.c (revision 4986) @@ -64,7 +64,7 @@ } \ } while(0) - HOOK_CALL_ALL(pcb_plug_import_t, plug_import_chain, fmt_support_prio, cb_append, (self, aspects, f, filename)); + PCB_HOOK_CALL_ALL(pcb_plug_import_t, plug_import_chain, fmt_support_prio, cb_append, (self, aspects, f, filename)); if (len == 0) return NULL; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 4985) +++ trunk/src/plug_io.c (revision 4986) @@ -131,7 +131,7 @@ } } else /* try all parsers until we find one that works */ - HOOK_CALL_DO(pcb_plug_io_t, plug_io_chain, parse_pcb, res, == 0, (self, Ptr, Filename, load_settings), if (Ptr->Data->loader == NULL) Ptr->Data->loader = self); + PCB_HOOK_CALL_DO(pcb_plug_io_t, plug_io_chain, parse_pcb, res, == 0, (self, Ptr, Filename, load_settings), if (Ptr->Data->loader == NULL) Ptr->Data->loader = self); if ((res == 0) && (load_settings)) conf_load_project(NULL, Filename); @@ -148,7 +148,7 @@ int res = -1; Ptr->loader = NULL; - HOOK_CALL_DO(pcb_plug_io_t, plug_io_chain, parse_element, res, == 0, (self, Ptr, name), Ptr->loader = self); + PCB_HOOK_CALL_DO(pcb_plug_io_t, plug_io_chain, parse_element, res, == 0, (self, Ptr, name), Ptr->loader = self); plug_io_err(res, "load element", name); return res; @@ -157,7 +157,7 @@ int pcb_parse_font(pcb_font_t *Ptr, char *Filename) { int res = -1; - HOOK_CALL(pcb_plug_io_t, plug_io_chain, parse_font, res, == 0, (self, Ptr, Filename)); + PCB_HOOK_CALL(pcb_plug_io_t, plug_io_chain, parse_font, res, == 0, (self, Ptr, Filename)); plug_io_err(res, "load font", Filename); return res; @@ -188,7 +188,7 @@ } \ } while(0) - HOOK_CALL_ALL(pcb_plug_io_t, plug_io_chain, fmt_support_prio, cb_append, (self, typ, is_wr, (fmt == NULL ? self->default_fmt : fmt))); + PCB_HOOK_CALL_ALL(pcb_plug_io_t, plug_io_chain, fmt_support_prio, cb_append, (self, typ, is_wr, (fmt == NULL ? self->default_fmt : fmt))); if (len > 0) qsort(available, len, sizeof(available[0]), find_prio_cmp); Index: trunk/src/plugins.c =================================================================== --- trunk/src/plugins.c (revision 4985) +++ trunk/src/plugins.c (revision 4986) @@ -44,7 +44,7 @@ return NULL; } -void plugin_register(const char *name, const char *path, void *handle, int dynamic_loaded, void (*uninit)(void)) +void pcb_plugin_register(const char *name, const char *path, void *handle, int dynamic_loaded, void (*uninit)(void)) { pcb_plugin_info_t *i = malloc(sizeof(pcb_plugin_info_t)); @@ -58,12 +58,12 @@ plugins = i; } -void plugins_init(void) +void pcb_plugins_init(void) { } -void plugins_uninit(void) +void pcb_plugins_uninit(void) { pcb_plugin_info_t *i, *next; for(i = plugins; i != NULL; i = next) { Index: trunk/src/plugins.h =================================================================== --- trunk/src/plugins.h (revision 4985) +++ trunk/src/plugins.h (revision 4986) @@ -42,13 +42,13 @@ extern pcb_plugin_info_t *plugins; /* Init the plugin system */ -void plugins_init(void); +void pcb_plugins_init(void); /* Uninit each plugin then uninit the plugin system */ -void plugins_uninit(void); +void pcb_plugins_uninit(void); /* Register a new plugin (or buildin) */ -void plugin_register(const char *name, const char *path, void *handle, int dynamic, pcb_uninit_t uninit); +void pcb_plugin_register(const char *name, const char *path, void *handle, int dynamic, pcb_uninit_t uninit); /* Find a plugin by name */ pcb_plugin_info_t *plugin_find(const char *name); @@ -57,7 +57,7 @@ HOOK_REGISTER with an api struct. The core should run the plugins using HOOK_CALL */ -#define HOOK_CALL_DO(chain_type, chain, func, res, accept, funcargs, do_on_success) \ +#define PCB_HOOK_CALL_DO(chain_type, chain, func, res, accept, funcargs, do_on_success) \ do { \ chain_type *self; \ for(self = (chain); self != NULL; self = self->next) { \ @@ -71,10 +71,10 @@ } \ } while(0) -#define HOOK_CALL(chain_type, chain, func, res, accept, funcargs) \ - HOOK_CALL_DO(chain_type, chain, func, res, accept, funcargs, (void)0) +#define PCB_HOOK_CALL(chain_type, chain, func, res, accept, funcargs) \ + PCB_HOOK_CALL_DO(chain_type, chain, func, res, accept, funcargs, (void)0) -#define HOOK_CALL_ALL(chain_type, chain, func, cb, funcargs) \ +#define PCB_HOOK_CALL_ALL(chain_type, chain, func, cb, funcargs) \ do { \ chain_type *self; \ for(self = (chain); self != NULL; self = self->next) { \ @@ -86,7 +86,7 @@ } \ } while(0) -#define HOOK_REGISTER(chain_type, chain, hstruct) \ +#define PCB_HOOK_REGISTER(chain_type, chain, hstruct) \ do { \ (hstruct)->next = chain; \ chain = (hstruct); \ @@ -93,7 +93,7 @@ } while(0) -#define HOOK_UNREGISTER(chain_type, chain, hstruct) \ +#define PCB_HOOK_UNREGISTER(chain_type, chain, hstruct) \ do { \ chain_type *__n__, *__prev__ = NULL, *__h__ = (hstruct); \ for(__n__ = chain; __n__ != NULL; __n__ = __n__->next) { \