Index: trunk/src_plugins/io_eagle/io_eagle.c =================================================================== --- trunk/src_plugins/io_eagle/io_eagle.c (revision 35737) +++ trunk/src_plugins/io_eagle/io_eagle.c (revision 35738) @@ -73,9 +73,9 @@ io_eagle_xml.fmt_support_prio = io_eagle_fmt; io_eagle_xml.test_parse = io_eagle_test_parse_xml; io_eagle_xml.parse_pcb = io_eagle_read_pcb_xml; -/* io_eagle_xml.parse_footprint = NULL; - io_eagle_xml.map_footprint = NULL; - io_eagle_xml.parse_font = NULL; + io_eagle_xml.parse_footprint = io_eagle_parse_footprint_xml; + io_eagle_xml.map_footprint = io_eagle_map_footprint_xml; +/* io_eagle_xml.parse_font = NULL; io_eagle_xml.write_buffer = io_eagle_write_buffer; io_eagle_xml.write_pcb = io_eagle_write_pcb;*/ io_eagle_xml.default_fmt = "eagle"; Index: trunk/src_plugins/io_eagle/read.c =================================================================== --- trunk/src_plugins/io_eagle/read.c (revision 35737) +++ trunk/src_plugins/io_eagle/read.c (revision 35738) @@ -1938,3 +1938,36 @@ return pp_res; } + + +pcb_plug_fp_map_t *io_eagle_map_footprint_xml(pcb_plug_io_t *ctx, FILE *f, const char *fn, pcb_plug_fp_map_t *head, int need_tags) +{ + int res; + read_state_t st = {0}; + + if (!io_eagle_test_parse_xml(ctx, PCB_IOT_FOOTPRINT, fn, f)) + return NULL; + + rewind(f); + + /* have not read design rules section yet but need this for rectangle parsing */ + st.ms_width = RND_MIL_TO_COORD(10); /* default minimum feature width */ + st.parser.calls = &trparse_xml_calls; + + rnd_trace("eagle xml map fp: %s\n", fn); + + if (st.parser.calls->load(&st.parser, fn) != 0) + return NULL; + + + st_uninit(&st); + return head; +} + +/* res = eagle_foreach_dispatch(&st, st.parser.calls->children(&st.parser, st.parser.root), disp, NULL, 0);*/ + +int io_eagle_parse_footprint_xml(pcb_plug_io_t *ctx, pcb_data_t *data, const char *filename, const char *subfpname) +{ + rnd_trace("eagle xml parse fp: %s\n", filename); + return -1; +} Index: trunk/src_plugins/io_eagle/read.h =================================================================== --- trunk/src_plugins/io_eagle/read.h (revision 35737) +++ trunk/src_plugins/io_eagle/read.h (revision 35738) @@ -4,6 +4,8 @@ int io_eagle_test_parse_xml(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); int io_eagle_read_pcb_xml(pcb_plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, rnd_conf_role_t settings_dest); +pcb_plug_fp_map_t *io_eagle_map_footprint_xml(pcb_plug_io_t *ctx, FILE *f, const char *fn, pcb_plug_fp_map_t *head, int need_tags); +int io_eagle_parse_footprint_xml(pcb_plug_io_t *ctx, pcb_data_t *data, const char *filename, const char *subfpname); int io_eagle_test_parse_bin(pcb_plug_io_t *ctx, pcb_plug_iot_t typ, const char *Filename, FILE *f); int io_eagle_read_pcb_bin(pcb_plug_io_t *ctx, pcb_board_t *pcb, const char *Filename, rnd_conf_role_t settings_dest);