Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 7501) +++ trunk/scconfig/Rev.h (revision 7502) @@ -1 +1 @@ -static const int myrev = 7499; +static const int myrev = 7502; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 7501) +++ trunk/scconfig/Rev.tab (revision 7502) @@ -1,4 +1,4 @@ -7499 configure new plugin: export_spice +7502 configure new plugin: export_spice 7469 configure new plugin for non-graphical fawk sheets 7468 configure new plugin for non-graphical tEDAx sheets 7370 configure cleanup: get rid of local "inline" defs Index: trunk/scconfig/plugins.h =================================================================== --- trunk/scconfig/plugins.h (revision 7501) +++ trunk/scconfig/plugins.h (revision 7502) @@ -35,6 +35,7 @@ plugin_def("export_spice", "export SPICE netlist", sbuildin, 1) plugin_def("export_svg", "export sheets to svg", sbuildin, 1) plugin_def("export_tedax", "export tEDAx netlist", sbuildin, 1) +plugin_def("lib_netlist_exp", "netlist export helper", sbuildin, 1) plugin_header("\nIO plugins (file formats):\n") plugin_def("io_altium", "altium schematics", sbuildin, 1) @@ -54,7 +55,9 @@ plugin_dep("export_lpr", "export_ps") plugin_dep("export_png", "lib_exp_pixmap") plugin_dep("export_ps", "lib_exp_text") +plugin_dep("export_spice", "lib_netlist_exp") plugin_dep("export_svg", "lib_exp_text") +plugin_dep("export_tedax", "lib_netlist_exp") plugin_dep("gui", "lib_hid_common") plugin_dep("io_altium", "lib_alien") plugin_dep("io_geda", "lib_alien") Index: trunk/src/plugins/export_spice/export_spice.pup =================================================================== --- trunk/src/plugins/export_spice/export_spice.pup (revision 7501) +++ trunk/src/plugins/export_spice/export_spice.pup (revision 7502) @@ -5,5 +5,6 @@ $fmt-native no $fmt-feature-e spice $package (core) +dep lib_netlist_exp default buildin autoload 1 Index: trunk/src/plugins/export_tedax/export_tedax.pup =================================================================== --- trunk/src/plugins/export_tedax/export_tedax.pup (revision 7501) +++ trunk/src/plugins/export_tedax/export_tedax.pup (revision 7502) @@ -5,5 +5,6 @@ $fmt-native no $fmt-feature-e tEDAx netlist $package (core) +dep lib_netlist_exp default buildin autoload 1 Index: trunk/src/plugins/lib_netlist_exp/Makefile =================================================================== --- trunk/src/plugins/lib_netlist_exp/Makefile (nonexistent) +++ trunk/src/plugins/lib_netlist_exp/Makefile (revision 7502) @@ -0,0 +1,2 @@ +all: + cd ../../sch-rnd && make mod_lib_netlist_exp Index: trunk/src/plugins/lib_netlist_exp/Plug.tmpasm =================================================================== --- trunk/src/plugins/lib_netlist_exp/Plug.tmpasm (nonexistent) +++ trunk/src/plugins/lib_netlist_exp/Plug.tmpasm (revision 7502) @@ -0,0 +1,10 @@ +put /local/rnd/mod {lib_netlist_exp} +put /local/rnd/mod/OBJS [@ + $(PLUGDIR)/lib_netlist_exp/lib_netlist_exp.o +@] + +switch /local/module/lib_netlist_exp/controls + case {buildin} include /local/csch/tmpasm/buildin; end; + case {plugin} include /local/csch/tmpasm/plugin; end; + case {disable} include /local/csch/tmpasm/disable; end; +end Index: trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.c =================================================================== --- trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.c (nonexistent) +++ trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.c (revision 7502) @@ -0,0 +1,54 @@ +/* + * COPYRIGHT + * + * cschem - modular/flexible schematics editor - netlist export helpers + * Copyright (C) 2023 Tibor 'Igor2' Palinkas + * + * (Supported by NLnet NGI0 Entrust in 2023) + * + * 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/sch-rnd + * contact lead developer: http://www.repo.hu/projects/sch-rnd/contact.html + * mailing list: http://www.repo.hu/projects/sch-rnd/contact.html + */ + +/* Maintain a cache of parsed comp/net/conn objects and compile abstract + model from them */ + +#include + +#include +#include + +#include "lib_netlist_exp.h" + + +/*** plugin ***/ + +int pplg_check_ver_lib_netlist_exp(int ver_needed) { return 0; } + +void pplg_uninit_lib_netlist_exp(void) +{ +} + +int pplg_init_lib_netlist_exp(void) +{ + RND_API_CHK_VER; + + return 0; +} + Index: trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.h =================================================================== --- trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.h (nonexistent) +++ trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.h (revision 7502) @@ -0,0 +1 @@ +int dummy; Index: trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.pup =================================================================== --- trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.pup (nonexistent) +++ trunk/src/plugins/lib_netlist_exp/lib_netlist_exp.pup (revision 7502) @@ -0,0 +1,7 @@ +$class export +$short netlist export helper +$long Helper functions for exporting netlists +$state works +$package (core) +default buildin +autoload 1 Index: trunk/src/plugins/plugins_ALL.tmpasm =================================================================== --- trunk/src/plugins/plugins_ALL.tmpasm (revision 7501) +++ trunk/src/plugins/plugins_ALL.tmpasm (revision 7502) @@ -19,6 +19,7 @@ include {../src/plugins/io_ngrp_tedax/Plug.tmpasm} include {../src/plugins/io_tinycad/Plug.tmpasm} include {../src/plugins/lib_alien/Plug.tmpasm} +include {../src/plugins/lib_netlist_exp/Plug.tmpasm} include {../src/plugins/lib_ngrp/Plug.tmpasm} include {../src/plugins/place/Plug.tmpasm} include {../src/plugins/propedit/Plug.tmpasm}