1 /* gEDA - GPL Electronic Design Automation
2 * gnetlist - gEDA Netlist
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2020 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
35 #include <libgeda/libgeda.h>
37 #include "../include/globals.h"
38 #include "../include/prototype.h"
49 static struct gsubr_t gnetlist_funcs
[] = {
50 { "quit", 0, 0, 0, g_quit
},
51 { "exit", 0, 0, 0, g_quit
},
53 /* gnetlistrc functions */
54 { "gnetlist-version", 1, 0, 0, g_rc_gnetlist_version
},
56 { "net-naming-priority", 1, 0, 0, g_rc_net_naming_priority
},
57 { "hierarchy-traversal", 1, 0, 0, g_rc_hierarchy_traversal
},
58 { "hierarchy-uref-mangle", 1, 0, 0, g_rc_hierarchy_uref_mangle
},
59 { "hierarchy-netname-mangle", 1, 0, 0, g_rc_hierarchy_netname_mangle
},
60 { "hierarchy-netattrib-mangle", 1, 0, 0, g_rc_hierarchy_netattrib_mangle
},
61 { "hierarchy-uref-separator", 1, 0, 0, g_rc_hierarchy_uref_separator
},
62 { "hierarchy-netname-separator", 1, 0, 0, g_rc_hierarchy_netname_separator
},
63 { "hierarchy-netattrib-separator", 1, 0, 0, g_rc_hierarchy_netattrib_separator
},
64 { "hierarchy-netattrib-order", 1, 0, 0, g_rc_hierarchy_netattrib_order
},
65 { "hierarchy-netname-order", 1, 0, 0, g_rc_hierarchy_netname_order
},
66 { "hierarchy-uref-order", 1, 0, 0, g_rc_hierarchy_uref_order
},
67 { "unnamed-netname", 1, 0, 0, g_rc_unnamed_netname
},
68 { "unnamed-busname", 1, 0, 0, g_rc_unnamed_busname
},
70 /* netlist functions */
71 { "gnetlist:get-packages", 1, 0, 0, g_get_packages
},
72 { "gnetlist:get-non-unique-packages", 1, 0, 0, g_get_non_unique_packages
},
73 { "gnetlist:get-pins", 1, 0, 0, g_get_pins
},
74 { "gnetlist:get-all-nets", 1, 0, 0, g_get_all_nets
},
75 { "gnetlist:get-all-unique-nets", 1, 0, 0, g_get_all_unique_nets
},
76 { "gnetlist:get-all-connections", 1, 0, 0, g_get_all_connections
},
77 { "gnetlist:get-nets", 2, 0, 0, g_get_nets
},
78 { "gnetlist:get-pins-nets", 1, 0, 0, g_get_pins_nets
},
80 { "gnetlist:get-all-package-attributes", 2, 0, 0, g_get_all_package_attributes
},
81 { "gnetlist:get-toplevel-attribute", 1, 0, 0, g_get_toplevel_attribute
},
82 /* { "gnetlist:set-netlist-mode", 1, 0, 0, g_set_netlist_mode }, no longer needed */
83 { "gnetlist:get-renamed-nets", 1, 0, 0, g_get_renamed_nets
},
84 { "gnetlist:get-attribute-by-pinseq", 3, 0, 0, g_get_attribute_by_pinseq
},
85 { "gnetlist:get-attribute-by-pinnumber", 3, 0, 0, g_get_attribute_by_pinnumber
},
86 { "gnetlist:vams-get-package-attributes", 1, 0, 0, vams_get_package_attributes
},
88 { "gnetlist:graphical-objs-in-net-with-attrib-get-attrib",
89 3, 0, 0, g_graphical_objs_in_net_with_attrib_get_attrib
},
92 { "gnetlist:get-backend-arguments", 0, 0, 0, g_get_backend_arguments
},
93 { "gnetlist:get-input-files", 0, 0, 0, g_get_input_files
},
94 { "gnetlist:get-verbosity", 0, 0, 0, g_get_verbosity
},
95 { NULL
, 0, 0, 0, NULL
} };
98 void g_register_funcs(void)
100 struct gsubr_t
*tmp
= gnetlist_funcs
;
102 while (tmp
->name
!= NULL
) {
103 scm_c_define_gsubr (tmp
->name
, tmp
->req
, tmp
->opt
, tmp
->rst
, tmp
->fnc
);