1 /* gEDA - GPL Electronic Design Automation
2 * gnetlist - gEDA Netlist
3 * Copyright (C) 1998-2007 Ales Hvezda
4 * Copyright (C) 1998-2007 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., 59 Temple Place, Suite 330, Boston, MA 02111 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
},
73 /* netlist functions */
74 { "gnetlist:get-packages", 1, 0, 0, g_get_packages
},
75 { "gnetlist:get-non-unique-packages", 1, 0, 0, g_get_non_unique_packages
},
76 { "gnetlist:get-pins", 1, 0, 0, g_get_pins
},
77 { "gnetlist:get-all-nets", 1, 0, 0, g_get_all_nets
},
78 { "gnetlist:get-all-unique-nets", 1, 0, 0, g_get_all_unique_nets
},
79 { "gnetlist:get-all-connections", 1, 0, 0, g_get_all_connections
},
80 { "gnetlist:get-nets", 2, 0, 0, g_get_nets
},
81 { "gnetlist:get-pins-nets", 1, 0, 0, g_get_pins_nets
},
83 { "gnetlist:get-package-attribute", 2, 0, 0, g_get_package_attribute
},
84 { "gnetlist:get-toplevel-attribute", 1, 0, 0, g_get_toplevel_attribute
},
85 /* { "gnetlist:set-netlist-mode", 1, 0, 0, g_set_netlist_mode }, no longer needed */
86 { "gnetlist:get-renamed-nets", 1, 0, 0, g_get_renamed_nets
},
87 { "gnetlist:get-attribute-by-pinseq", 3, 0, 0, g_get_attribute_by_pinseq
},
88 { "gnetlist:get-attribute-by-pinnumber", 3, 0, 0, g_get_attribute_by_pinnumber
},
89 { "gnetlist:vams-get-package-attributes", 1, 0, 0, vams_get_package_attributes
},
90 { "gnetlist:get-slots", 1, 0, 0, g_get_slots
},
91 { "gnetlist:get-unique-slots", 1, 0, 0, g_get_unique_slots
},
93 { "gnetlist:graphical-objs-in-net-with-attrib-get-attrib",
94 3, 0, 0, g_graphical_objs_in_net_with_attrib_get_attrib
},
97 { "gnetlist:get-calling-flags", 0, 0, 0, g_get_calling_flags
},
98 /* SDB -- 8.22.2004 */
99 { "gnetlist:get-command-line", 0, 0, 0, g_get_command_line
},
100 { NULL
, 0, 0, 0, NULL
} };
103 void g_register_funcs(void)
105 struct gsubr_t
*tmp
= gnetlist_funcs
;
107 while (tmp
->name
!= NULL
) {
108 scm_c_define_gsubr (tmp
->name
, tmp
->req
, tmp
->opt
, tmp
->rst
, tmp
->fnc
);