1 /* gEDA - GPL Electronic Design Automation
2 * gnetlist - gEDA Netlist
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2010 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"
40 #ifdef HAVE_LIBDMALLOC
53 static struct gsubr_t gnetlist_funcs
[] = {
54 { "quit", 0, 0, 0, g_quit
},
55 { "exit", 0, 0, 0, g_quit
},
57 /* gnetlistrc functions */
58 { "gnetlist-version", 1, 0, 0, g_rc_gnetlist_version
},
60 { "net-naming-priority", 1, 0, 0, g_rc_net_naming_priority
},
61 { "hierarchy-traversal", 1, 0, 0, g_rc_hierarchy_traversal
},
62 { "hierarchy-uref-mangle", 1, 0, 0, g_rc_hierarchy_uref_mangle
},
63 { "hierarchy-netname-mangle", 1, 0, 0, g_rc_hierarchy_netname_mangle
},
64 { "hierarchy-netattrib-mangle", 1, 0, 0, g_rc_hierarchy_netattrib_mangle
},
65 { "hierarchy-uref-separator", 1, 0, 0, g_rc_hierarchy_uref_separator
},
66 { "hierarchy-netname-separator", 1, 0, 0, g_rc_hierarchy_netname_separator
},
67 { "hierarchy-netattrib-separator", 1, 0, 0, g_rc_hierarchy_netattrib_separator
},
68 { "hierarchy-netattrib-order", 1, 0, 0, g_rc_hierarchy_netattrib_order
},
69 { "hierarchy-netname-order", 1, 0, 0, g_rc_hierarchy_netname_order
},
70 { "hierarchy-uref-order", 1, 0, 0, g_rc_hierarchy_uref_order
},
71 { "unnamed-netname", 1, 0, 0, g_rc_unnamed_netname
},
72 { "unnamed-busname", 1, 0, 0, g_rc_unnamed_busname
},
74 /* netlist functions */
75 { "gnetlist:get-packages", 1, 0, 0, g_get_packages
},
76 { "gnetlist:get-non-unique-packages", 1, 0, 0, g_get_non_unique_packages
},
77 { "gnetlist:get-pins", 1, 0, 0, g_get_pins
},
78 { "gnetlist:get-all-nets", 1, 0, 0, g_get_all_nets
},
79 { "gnetlist:get-all-unique-nets", 1, 0, 0, g_get_all_unique_nets
},
80 { "gnetlist:get-all-connections", 1, 0, 0, g_get_all_connections
},
81 { "gnetlist:get-nets", 2, 0, 0, g_get_nets
},
82 { "gnetlist:get-pins-nets", 1, 0, 0, g_get_pins_nets
},
84 { "gnetlist:get-all-package-attributes", 2, 0, 0, g_get_all_package_attributes
},
85 { "gnetlist:get-toplevel-attribute", 1, 0, 0, g_get_toplevel_attribute
},
86 /* { "gnetlist:set-netlist-mode", 1, 0, 0, g_set_netlist_mode }, no longer needed */
87 { "gnetlist:get-renamed-nets", 1, 0, 0, g_get_renamed_nets
},
88 { "gnetlist:get-attribute-by-pinseq", 3, 0, 0, g_get_attribute_by_pinseq
},
89 { "gnetlist:get-attribute-by-pinnumber", 3, 0, 0, g_get_attribute_by_pinnumber
},
90 { "gnetlist:vams-get-package-attributes", 1, 0, 0, vams_get_package_attributes
},
92 { "gnetlist:graphical-objs-in-net-with-attrib-get-attrib",
93 3, 0, 0, g_graphical_objs_in_net_with_attrib_get_attrib
},
96 { "gnetlist:get-backend-arguments", 0, 0, 0, g_get_backend_arguments
},
97 { "gnetlist:get-input-files", 0, 0, 0, g_get_input_files
},
98 { NULL
, 0, 0, 0, NULL
} };
101 void g_register_funcs(void)
103 struct gsubr_t
*tmp
= gnetlist_funcs
;
105 while (tmp
->name
!= NULL
) {
106 scm_c_define_gsubr (tmp
->name
, tmp
->req
, tmp
->opt
, tmp
->rst
, tmp
->fnc
);