[asterisk-commits] eliel: branch 1.6.2 r194648 - in /branches/1.6.2: ./ doc/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 15 08:42:46 CDT 2009


Author: eliel
Date: Fri May 15 08:42:39 2009
New Revision: 194648

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=194648
Log:
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
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/doc/appdocsxml.dtd
    branches/1.6.2/main/xmldoc.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/doc/appdocsxml.dtd
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/doc/appdocsxml.dtd?view=diff&rev=194648&r1=194647&r2=194648
==============================================================================
--- branches/1.6.2/doc/appdocsxml.dtd (original)
+++ branches/1.6.2/doc/appdocsxml.dtd Fri May 15 08:42:39 2009
@@ -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)*>

Modified: branches/1.6.2/main/xmldoc.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/main/xmldoc.c?view=diff&rev=194648&r1=194647&r2=194648
==============================================================================
--- branches/1.6.2/main/xmldoc.c (original)
+++ branches/1.6.2/main/xmldoc.c Fri May 15 08:42:39 2009
@@ -58,6 +58,7 @@
 };
 
 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 @@
 {
 	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 @@
 		} else if ((xmldoc_parse_specialtags(node, (ret ? tabs : " - "), "\n", buffer))) {
 			ret = 1;
 		}
-	}
+
+		xmldoc_parse_enumlist(node, optiontabs, buffer);
+	}
+
+	ast_free(optiontabs);
+
 	return ret;
 }
 




More information about the asterisk-commits mailing list