Index: trunk/src/plug_import.c =================================================================== --- trunk/src/plug_import.c (revision 29483) +++ trunk/src/plug_import.c (revision 29484) @@ -88,7 +88,18 @@ #undef cb_append } +pcb_plug_import_t *pcb_lookup_importer(const char *name) +{ + pcb_plug_import_t *p; + for(p = pcb_plug_import_chain; p != NULL; p = p->next) + if (strcmp(p->name, name) == 0) + return p; + + return NULL; +} + + int pcb_import(pcb_hidlib_t *hidlib, char *filename, unsigned int aspect) { pcb_plug_import_t *plug; Index: trunk/src/plug_import.h =================================================================== --- trunk/src/plug_import.h (revision 29483) +++ trunk/src/plug_import.h (revision 29484) @@ -64,6 +64,10 @@ void pcb_import_uninit(void); +/* Return an importer by it's ->name, or return NULL if not found; + slow linear search */ +pcb_plug_import_t *pcb_lookup_importer(const char *name); + /********** hook wrappers **********/ int pcb_import(pcb_hidlib_t *hidlib, char *filename, unsigned int aspect); int pcb_import_netlist(pcb_hidlib_t *, char *);