Index: import_sch.c =================================================================== --- import_sch.c (revision 29485) +++ import_sch.c (revision 29486) @@ -43,6 +43,9 @@ static fgw_error_t pcb_act_ImportSch(fgw_arg_t *res, int argc, fgw_arg_t *argv) { if (argc == 1) { + const char **a = NULL; + int len, n; + pcb_conf_listitem_t *ci; const char *imp_name = conf_import_sch.plugins.import_sch.import_fmt; pcb_plug_import_t *p; @@ -53,7 +56,19 @@ return 0; } p = pcb_lookup_importer(imp_name); + if (p == NULL) { + pcb_message(PCB_MSG_ERROR, "import_sch2: can not find importer called '%s'\nIs the corresponding plugin compiled?\n", imp_name); + PCB_ACT_IRES(1); + return 0; + } + + len = pcb_conflist_length(&conf_import_sch.plugins.import_sch.args); + a = malloc((len+1) * sizeof(char *)); + for(n = 0, ci = pcb_conflist_first(&conf_import_sch.plugins.import_sch.args); ci != NULL; ci = pcb_conflist_next(ci), n++) + a[n] = ci->val.string[0]; pcb_message(PCB_MSG_ERROR, "import_sch2: reimport with %s -> %p\n", imp_name, p); + p->import(p, IMPORT_ASPECT_NETLIST, a, len); + free(a); } pcb_message(PCB_MSG_ERROR, "import_sch2: not yet implemented\n"); PCB_ACT_IRES(0); Index: import_sch_conf.h =================================================================== --- import_sch_conf.h (revision 29485) +++ import_sch_conf.h (revision 29486) @@ -7,6 +7,7 @@ const struct { const struct { CFT_STRING import_fmt; /* name of the input format */ + CFT_LIST args; /* import_fmt arguments, typically file names */ CFT_BOOLEAN verbose; /* verbose logging of the import code */ /* obsolete: temporary compatibility with import_sch for the transition period */