From c2ffbbece7eb57bd53aaf07ed0318dd79bbb0b7a Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 25 Feb 2000 04:28:14 +0000 Subject: Added e_xml_get_integer_prop_by_name. 2000-02-24 Christopher James Lahey * e-util/e-xml-utils.c, e-util/e-xml-utils.h: Added e_xml_get_integer_prop_by_name. * e-util/Makefile.am: Added e-util.c. * e-util/e-util.h: Added e-util.c functions. * e-util/e-util.c: New file for compare functions from mail: 2000-02-24 Christopher James Lahey * message-list.c: Changed to match new e_table_simple interface. svn path=/trunk/; revision=1931 --- e-util/e-xml-utils.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'e-util/e-xml-utils.c') diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c index 7c6356dbef..e6f361392b 100644 --- a/e-util/e-xml-utils.c +++ b/e-util/e-xml-utils.c @@ -34,3 +34,13 @@ xmlNode *e_xml_get_child_by_name(xmlNode *parent, xmlChar *child_name) } return NULL; } + +int +e_xml_get_integer_prop_by_name(xmlNode *parent, xmlChar *prop_name) +{ + xmlChar *prop = xmlGetProp(parent, prop_name); + if (prop) + return atoi(prop); + else + return 0; +} -- cgit v1.2.3