diff options
author | sanine <sanine.not@pm.me> | 2023-02-04 00:27:55 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2023-02-04 00:27:55 -0600 |
commit | 0bb180e4ddeebf6d219a38b862ce3e8238f99c54 (patch) | |
tree | 9556fd77d16cdcee69ff0c9c0765c408ee88ae19 /src/xml/xml.h | |
parent | 6292c2bce712dcca01ded960dc5f93528da2b9ce (diff) |
add kai_tag_attr_to_dup()
Diffstat (limited to 'src/xml/xml.h')
-rw-r--r-- | src/xml/xml.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/xml/xml.h b/src/xml/xml.h index ac956aa..4766e2c 100644 --- a/src/xml/xml.h +++ b/src/xml/xml.h @@ -14,12 +14,15 @@ struct kai_tag_t * kai_parse_string(const char *str); char * kai_tag_get_attr(struct kai_tag_t *t, const char *attr); -/* find an attribute and convert to long. if not found, return "base" instead. - * if flag is not NULL, then it is set to 0 when taking the value from an - * attribute and 1 when taking the value from "base" +/* find an attribute and convert to long. + * if not found, return "base" instead. */ long kai_tag_attr_to_long( - struct kai_tag_t *t, const char *attr, - long base, int *flag); + struct kai_tag_t *t, const char *attr, long base); + +/* find an attribute and return a duplicate of the value string, or NULL + * if not found. + */ +char *kai_tag_attr_to_dup(struct kai_tag_t *t, const char *attr); #endif |