Index: trunk/src_plugins/io_tedax/footprint.c =================================================================== --- trunk/src_plugins/io_tedax/footprint.c (revision 33107) +++ trunk/src_plugins/io_tedax/footprint.c (revision 33108) @@ -41,6 +41,8 @@ #include #include "data.h" #include "board.h" +#include "conf_core.h" +#include "plug_footprint.h" #include #include #include @@ -666,12 +668,17 @@ return 0; } -int tedax_fp_load(pcb_data_t *data, const char *fn, int multi, const char *blk_id, int silent) +int tedax_fp_load(pcb_data_t *data, const char *fn, int multi, const char *blk_id, int silent, int searchlib) { FILE *f; int ret = 0; + pcb_fp_fopen_ctx_t st; - f = rnd_fopen(&PCB->hidlib, fn, "r"); + + if (searchlib) + f = pcb_fp_fopen(&conf_core.rc.library_search_paths, fn, &st, NULL); + else + f = rnd_fopen(&PCB->hidlib, fn, "r"); if (f == NULL) { rnd_message(RND_MSG_ERROR, "can't open file '%s' for read\n", fn); return -1; @@ -679,7 +686,10 @@ ret = tedax_parse_fp(data, f, multi, blk_id, silent); - fclose(f); + if (searchlib) + pcb_fp_fclose(f, &st); + else + fclose(f); return ret; } Index: trunk/src_plugins/io_tedax/footprint.h =================================================================== --- trunk/src_plugins/io_tedax/footprint.h (revision 33107) +++ trunk/src_plugins/io_tedax/footprint.h (revision 33108) @@ -5,7 +5,7 @@ int tedax_fp_save(pcb_data_t *data, const char *fn, long subc_idx); int tedax_fp_fsave(pcb_data_t *data, FILE *f, long subc_idx); int tedax_fp_fsave_subc(pcb_subc_t *subc, FILE *f); -int tedax_fp_load(pcb_data_t *data, const char *fn, int multi, const char *blk_id, int silent); +int tedax_fp_load(pcb_data_t *data, const char *fn, int multi, const char *blk_id, int silent, int searchlib); /* parse a single footprint at current file pos; returns NULL on error */ pcb_subc_t *tedax_parse_1fp(pcb_data_t *data, FILE *fn, char *buff, int buff_size, char *argv[], int argv_size); Index: trunk/src_plugins/io_tedax/io_tedax.c =================================================================== --- trunk/src_plugins/io_tedax/io_tedax.c (revision 33107) +++ trunk/src_plugins/io_tedax/io_tedax.c (revision 33108) @@ -192,7 +192,7 @@ } if (rnd_strcasecmp(type, "footprint") == 0) { gen_load(footprint, fname); - RND_ACT_IRES(tedax_fp_load(PCB_PASTEBUFFER->Data, fname, 0, id, silent)); + RND_ACT_IRES(tedax_fp_load(PCB_PASTEBUFFER->Data, fname, 0, id, silent, 0)); return 0; } if (rnd_strcasecmp(type, "stackup") == 0) { @@ -253,7 +253,7 @@ static int io_tedax_parse_footprint(pcb_plug_io_t *ctx, pcb_data_t *Ptr, const char *name, const char *subfpname) { - return tedax_fp_load(Ptr, name, 0, NULL, 0); + return tedax_fp_load(Ptr, name, 0, NULL, 0, 1); } int io_tedax_fp_write_subcs_head(pcb_plug_io_t *ctx, void **udata, FILE *f, int lib, long num_subcs) @@ -299,7 +299,7 @@ Ptr->is_footprint = 1; - res = tedax_fp_load(Ptr->Data, Filename, 0, NULL, 0); + res = tedax_fp_load(Ptr->Data, Filename, 0, NULL, 0, 0); if (res == 0) { pcb_subc_t *sc = Ptr->Data->subc.lst.first;