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., 59 Temple Place, Suite 330, Boston, MA 02111 USA
37 #include <libgeda/libgeda.h>
39 #include "../include/globals.h"
40 #include "../include/i_vars.h"
41 #include "../include/prototype.h"
43 #ifdef HAVE_LIBDMALLOC
47 SCM
g_rc_gnetlist_version(SCM version
)
49 SCM_ASSERT (scm_is_string (version
), version
,
50 SCM_ARG1
, "gnetlist-version");
52 if (strcmp (SCM_STRING_CHARS (version
), PACKAGE_DATE_VERSION
) != 0) {
54 "You are running gEDA/gaf version [%s%s.%s],\n",
55 PREPEND_VERSION_STRING
, PACKAGE_DOTTED_VERSION
,
56 PACKAGE_DATE_VERSION
);
58 "but you have a version [%s] gnetlistrc file:\n[%s]\n",
59 SCM_STRING_CHARS (version
), rc_filename
);
61 "Please be sure that you have the latest rc file.\n");
69 SCM
g_rc_net_naming_priority(SCM mode
)
71 static const vstbl_entry mode_table
[] = {
72 {NETATTRIB_ATTRIBUTE
, "netattrib"},
73 {NETNAME_ATTRIBUTE
, "netname"}
76 RETURN_G_RC_MODE("net-naming-priority", default_net_naming_priority
,
80 SCM
g_rc_hierarchy_traversal(SCM mode
)
82 static const vstbl_entry mode_table
[] = {
87 RETURN_G_RC_MODE("hierarchy-traversal", default_hierarchy_traversal
,
91 SCM
g_rc_hierarchy_uref_mangle(SCM mode
)
93 static const vstbl_entry mode_table
[] = {
98 RETURN_G_RC_MODE("hierarchy-uref-mangle",
99 default_hierarchy_uref_mangle
, 2);
102 SCM
g_rc_hierarchy_netname_mangle(SCM mode
)
104 static const vstbl_entry mode_table
[] = {
109 RETURN_G_RC_MODE("hierarchy-netname-mangle",
110 default_hierarchy_netname_mangle
, 2);
113 SCM
g_rc_hierarchy_netattrib_mangle(SCM mode
)
115 static const vstbl_entry mode_table
[] = {
120 RETURN_G_RC_MODE("hierarchy-netattrib-mangle",
121 default_hierarchy_netattrib_mangle
, 2);
124 SCM
g_rc_hierarchy_netname_separator(SCM name
)
126 SCM_ASSERT (scm_is_string (name
), name
,
127 SCM_ARG1
, "hierarchy-netname-separator");
129 g_free(default_hierarchy_netname_separator
);
131 default_hierarchy_netname_separator
= g_strdup (SCM_STRING_CHARS (name
));
136 SCM
g_rc_hierarchy_netattrib_separator(SCM name
)
138 SCM_ASSERT (scm_is_string (name
), name
,
139 SCM_ARG1
, "hierarchy-netattrib-separator");
141 g_free(default_hierarchy_netattrib_separator
);
143 default_hierarchy_netattrib_separator
= g_strdup (SCM_STRING_CHARS (name
));
148 SCM
g_rc_hierarchy_uref_separator(SCM name
)
150 SCM_ASSERT (scm_is_string (name
), name
,
151 SCM_ARG1
, "hierarchy-uref-separator");
153 g_free(default_hierarchy_uref_separator
);
155 default_hierarchy_uref_separator
= g_strdup (SCM_STRING_CHARS (name
));
160 SCM
g_rc_hierarchy_netattrib_order(SCM mode
)
162 static const vstbl_entry mode_table
[] = {
163 {PREPEND
, "prepend"},
167 RETURN_G_RC_MODE("hierarchy-netattrib-order",
168 default_hierarchy_netattrib_order
, 2);
171 SCM
g_rc_hierarchy_netname_order(SCM mode
)
173 static const vstbl_entry mode_table
[] = {
174 {PREPEND
, "prepend"},
178 RETURN_G_RC_MODE("hierarchy-netname-order",
179 default_hierarchy_netname_order
, 2);
182 SCM
g_rc_hierarchy_uref_order(SCM mode
)
184 static const vstbl_entry mode_table
[] = {
185 {PREPEND
, "prepend"},
189 RETURN_G_RC_MODE("hierarchy-uref-order",
190 default_hierarchy_uref_order
, 2);
193 SCM
g_rc_unnamed_netname(SCM name
)
195 SCM_ASSERT (scm_is_string (name
), name
,
196 SCM_ARG1
, "unamed-netname");
198 g_free(default_unnamed_netname
);
200 default_unnamed_netname
= g_strdup (SCM_STRING_CHARS (name
));
205 SCM
g_rc_unnamed_busname(SCM name
)
207 SCM_ASSERT (scm_is_string (name
), name
,
208 SCM_ARG1
, "unamed-busname");
210 g_free(default_unnamed_busname
);
212 default_unnamed_busname
= g_strdup (SCM_STRING_CHARS (name
));
218 /*************************** GUILE end done *********************************/