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,
30 #include <libgeda/libgeda.h>
32 #include "../include/globals.h"
33 #include "../include/prototype.h"
36 vams_get_attribs_list (OBJECT
*object
)
43 char* found_name
= NULL
;
47 /* search outside the symbol (attached attributes only) */
48 a_iter
= o_current
->attribs
;
49 while(a_iter
!= NULL
) {
50 a_current
= a_iter
->data
;
51 if (a_current
->text
&& a_current
->text
->string
) {
52 val
= o_attrib_get_name_value (a_current
, &found_name
, NULL
);
55 list
= scm_cons (scm_from_utf8_string (found_name
), list
);
60 a_iter
= g_list_next (a_iter
);
67 vams_get_package_attributes(SCM scm_uref
)
72 SCM_ASSERT(scm_is_string (scm_uref
), scm_uref
, SCM_ARG1
,
73 "gnetlist:vams-get-package-attributes");
75 uref
= scm_to_utf8_string (scm_uref
);
77 /* here is where you make it multi page aware */
78 nl_current
= netlist_head
;
80 /* search for the first instance */
81 /* through the entire list */
82 while(nl_current
!= NULL
) {
84 if (nl_current
->component_uref
&&
85 strcmp(nl_current
->component_uref
, uref
) == 0) {
87 return vams_get_attribs_list (nl_current
->object_ptr
);
89 nl_current
= nl_current
->next
;