Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 34632) +++ trunk/scconfig/Rev.h (revision 34633) @@ -1 +1 @@ -static const int myrev = 34521; +static const int myrev = 34633; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 34632) +++ trunk/scconfig/Rev.tab (revision 34633) @@ -1,3 +1,4 @@ +34633 configure io_pads: PADS_ASCII write code 34521 configure export_lpr: configurable default scales 34509 configure librnd: moving box-box intersection code to librnd 34375 configure librnd: make sure the local .so symlinks are updated on make all so they don't point to old version .so's Index: trunk/src_plugins/io_pads/Plug.tmpasm =================================================================== --- trunk/src_plugins/io_pads/Plug.tmpasm (revision 34632) +++ trunk/src_plugins/io_pads/Plug.tmpasm (revision 34633) @@ -1,6 +1,7 @@ put /local/pcb/mod {io_pads} put /local/pcb/mod/OBJS [@ $(PLUGDIR)/io_pads/io_pads.o + $(PLUGDIR)/io_pads/write.o $(PLUGDIR)/io_pads/read.o $(PLUGDIR)/io_pads/delay_create.o @] Index: trunk/src_plugins/io_pads/io_pads.c =================================================================== --- trunk/src_plugins/io_pads/io_pads.c (revision 34632) +++ trunk/src_plugins/io_pads/io_pads.c (revision 34633) @@ -36,6 +36,7 @@ #include "plug_io.h" #include "read.h" +#include "write.h" static pcb_plug_io_t io_pads; static const char *pads_cookie = "PADS IO"; @@ -75,7 +76,8 @@ io_pads.map_footprint = io_pads_map_footprint;*/ io_pads.parse_font = NULL; io_pads.write_buffer = NULL; - io_pads.write_pcb = NULL; + io_pads.write_pcb = io_pads_write_pcb_2005; + io_pads.save_preference_prio = 93; io_pads.default_fmt = "pads"; io_pads.description = "pads board"; io_pads.save_preference_prio = 91; Index: trunk/src_plugins/io_pads/write.c =================================================================== --- trunk/src_plugins/io_pads/write.c (nonexistent) +++ trunk/src_plugins/io_pads/write.c (revision 34633) @@ -0,0 +1,54 @@ +/* + * COPYRIGHT + * + * pcb-rnd, interactive printed circuit board design + * + * PADS IO plugin - write: convert pcb-rnd data model to PADS ASCII + * pcb-rnd Copyright (C) 2021 Tibor 'Igor2' Palinkas + * (Supported by NLnet NGI0 PET Fund in 2020 and 2021) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Contact: + * Project page: http://repo.hu/projects/pcb-rnd + * lead developer: http://repo.hu/projects/pcb-rnd/contact.html + * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") + */ + +#include "config.h" + +#include + +#include "board.h" + +typedef struct { + FILE *f; + int ver; +} write_ctx_t; + +static int io_pads_write_pcb(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, rnd_bool emergency, int ver) +{ + write_ctx_t wctx; + + wctx.f = f; + wctx.ver = ver; + return -1; +} + +int io_pads_write_pcb_2005(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, rnd_bool emergency) +{ + return io_pads_write_pcb(ctx, f, old_filename, new_filename, emergency, 2005); +} + Index: trunk/src_plugins/io_pads/write.h =================================================================== --- trunk/src_plugins/io_pads/write.h (nonexistent) +++ trunk/src_plugins/io_pads/write.h (revision 34633) @@ -0,0 +1 @@ +int io_pads_write_pcb_2005(pcb_plug_io_t *ctx, FILE *f, const char *old_filename, const char *new_filename, rnd_bool emergency);