I arrived at these docstrings by reverse-engineering the implementation
and some guesses.  Could someone confirm my understanding?

[[[
* subversion/libsvn_ra_neon/util.c
  (multistatus_elements, multistatus_nesting_table, validate_element):
    Add docstrings.
]]]

[[[
Index: subversion/libsvn_ra_neon/util.c
===================================================================
--- subversion/libsvn_ra_neon/util.c    (revision 987515)
+++ subversion/libsvn_ra_neon/util.c    (working copy)
@@ -82,6 +82,7 @@
  * for our custom error parser - could use the ne_basic.h interfaces.
  */
 
+/* List of XML elements expected in 207 Multi-Status responses. */
 static const svn_ra_neon__xml_elm_t multistatus_elements[] =
   { { "DAV:", "multistatus", ELEM_multistatus, 0 },
     { "DAV:", "response", ELEM_response, 0 },
@@ -99,6 +100,14 @@
   };
 
 
+/* Sparse matrix listing the permitted child elements of each element.
+
+   The permitted direct children of the element named in the first column are
+   the elements named in the remainder of the row.
+
+   There may be any number of rows, and any number of columns in each row; any
+   non-positive value (such as SVN_RA_NEON__XML_INVALID) serves as a sentinel.
+ */
 static const int multistatus_nesting_table[][5] =
   { { ELEM_root, ELEM_multistatus, SVN_RA_NEON__XML_INVALID },
     { ELEM_multistatus, ELEM_response, ELEM_responsedescription,
@@ -115,6 +124,9 @@
   };
 
 
+/* PARENT and CHILD are enum values of ELEM_* type.
+   Return a positive integer if CHILD is a valid direct child of PARENT,
+   and a negative integer otherwise. */
 static int
 validate_element(int parent, int child)
 {
]]]

Reply via email to