Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 32894) +++ trunk/src/plug_io.c (revision 32895) @@ -460,6 +460,23 @@ return res; } +int pcb_write_padstack(FILE *f, pcb_pstk_proto_t *proto, const char *fmt) +{ + int res = -1/*, newfmt = 0*/; + pcb_plug_io_t *p = pcb_io_find_writer(PCB_IOT_PADSTACK, fmt); + + if ((p != NULL) && (p->write_padstack != NULL)) { + res = p->write_padstack(p, f, proto); + /*newfmt = 1;*/ + } + +/* if ((res == 0) && (newfmt)) + PCB->Data->loader = p;*/ + + pcb_plug_io_err(&PCB->hidlib, res, "write padstack", NULL); + return res; +} + int pcb_write_footprint_data(FILE *f, pcb_data_t *e, const char *fmt, long subc_idx) { int res, newfmt = 0; Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 32894) +++ trunk/src/plug_io.h (revision 32895) @@ -188,6 +188,7 @@ int pcb_write_pcb_file(const char *Filename, rnd_bool thePcb, const char *fmt, rnd_bool emergency, rnd_bool subc_only, long subc_idx, int askovr); void pcb_set_design_dir(const char *fn); int pcb_load_buffer(rnd_hidlib_t *hidlib, pcb_buffer_t *buff, const char *fn, const char *fmt); +int pcb_write_padstack(FILE *f, pcb_pstk_proto_t *proto, const char *fmt); /* Find the plugin that offers the highest write prio for the format */ pcb_plug_io_t *pcb_io_find_writer(pcb_plug_iot_t typ, const char *fmt);