mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-09 22:59:20 +00:00
Merged revisions 194635 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r194635 | eliel | 2009-05-15 09:23:37 -0400 (Fri, 15 May 2009) | 16 lines Allow to specify an enumlist inside an enum. It was not possible to use an enumlist inside an enum: <enumlist> <enum name="aa"> <enumlist> ... </enumlist> </enum> </enumlist> Now we will be able to insert as many levels as we want. (closes issue #15112) Reported by: lmadsen ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@194648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
<!ATTLIST option hasparams CDATA "">
|
||||
|
||||
<!ELEMENT enumlist (enum+)>
|
||||
<!ELEMENT enum (para|note|warning|parameter)*>
|
||||
<!ELEMENT enum (para|note|warning|parameter|enumlist)*>
|
||||
<!ATTLIST enum name CDATA "">
|
||||
|
||||
<!ELEMENT argument (para|note|warning|variablelist|argument)*>
|
||||
|
||||
@@ -58,6 +58,7 @@ struct documentation_tree {
|
||||
};
|
||||
|
||||
static char *xmldoc_get_syntax_cmd(struct ast_xml_node *fixnode, const char *name, int printname);
|
||||
static int xmldoc_parse_enumlist(struct ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer);
|
||||
|
||||
/*!
|
||||
* \brief Container of documentation trees
|
||||
@@ -1398,6 +1399,9 @@ static int xmldoc_parse_enum(struct ast_xml_node *fixnode, const char *tabs, str
|
||||
{
|
||||
struct ast_xml_node *node = fixnode;
|
||||
int ret = 0;
|
||||
char *optiontabs;
|
||||
|
||||
ast_asprintf(&optiontabs, "%s ", tabs);
|
||||
|
||||
for (node = ast_xml_node_get_children(node); node; node = ast_xml_node_get_next(node)) {
|
||||
if ((xmldoc_parse_para(node, (ret ? tabs : " - "), "\n", buffer))) {
|
||||
@@ -1405,7 +1409,12 @@ static int xmldoc_parse_enum(struct ast_xml_node *fixnode, const char *tabs, str
|
||||
} else if ((xmldoc_parse_specialtags(node, (ret ? tabs : " - "), "\n", buffer))) {
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
xmldoc_parse_enumlist(node, optiontabs, buffer);
|
||||
}
|
||||
|
||||
ast_free(optiontabs);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user