Modified the test on attribute string in libgeda
o_complex_is_eligible_attribute() to use o_attrib_get_name_value().
---
libgeda/src/o_complex_basic.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 0b8bddb..a4fb831 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -233,7 +233,6 @@ int o_complex_is_eligible_attribute (TOPLEVEL *toplevel,
OBJECT *object,
char *name = NULL;
char *padded_name = NULL;
int promotableAttribute = FALSE;
- char *ptr;
g_return_val_if_fail(object != NULL, FALSE);
@@ -243,8 +242,7 @@ int o_complex_is_eligible_attribute (TOPLEVEL *toplevel,
OBJECT *object,
}
/* Make sure text item is an attribute */
- ptr = strchr(object->text->string, '=');
- if (!ptr || ptr[1] == '\0' || ptr[1] == ' ')
+ if (!o_attrib_get_name_value (object->text->string, NULL, NULL))
{
return FALSE; /* not an attribute */
}
--
1.5.6
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev