subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject svn commit: r927536 - in /subversion/trunk/subversion: include/private/svn_skel.h libsvn_subr/skel.c
Date Thu, 25 Mar 2010 18:47:23 GMT
Author: gstein
Date: Thu Mar 25 18:47:22 2010
New Revision: 927536

URL: http://svn.apache.org/viewvc?rev=927536&view=rev
Log:
Add a new function to append a skel to a (list-)skel.

* subversion/include/private/svn_skel.h:
  (svn_skel__append): new declaration

* subversion/libsvn_subr/skel.c:
  (svn_skel__append): ensure we're looking at a list skel, and then hook
    the new skel into it.

Modified:
    subversion/trunk/subversion/include/private/svn_skel.h
    subversion/trunk/subversion/libsvn_subr/skel.c

Modified: subversion/trunk/subversion/include/private/svn_skel.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_skel.h?rev=927536&r1=927535&r2=927536&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_skel.h (original)
+++ subversion/trunk/subversion/include/private/svn_skel.h Thu Mar 25 18:47:22 2010
@@ -138,6 +138,10 @@ svn_skel_t *svn_skel__make_empty_list(ap
 void svn_skel__prepend(svn_skel_t *skel, svn_skel_t *list);
 
 
+/* Append SKEL to LIST.  */
+void svn_skel__append(svn_skel_t *list, const svn_skel_t *skel);
+
+
 /* Create an atom skel whose contents are the string representation
    of the integer VALUE, allocated in RESULT_POOL, and then prepend
    it to SKEL.  */

Modified: subversion/trunk/subversion/libsvn_subr/skel.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/skel.c?rev=927536&r1=927535&r2=927536&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/skel.c (original)
+++ subversion/trunk/subversion/libsvn_subr/skel.c Thu Mar 25 18:47:22 2010
@@ -609,6 +609,24 @@ void svn_skel__prepend_str(const char *v
   svn_skel__prepend(atom, skel);
 }
 
+
+void svn_skel__append(svn_skel_t *list, const svn_skel_t *skel)
+{
+  SVN_ERR_ASSERT_NO_RETURN(list != NULL && !list->is_atom);
+
+  if (list->children == NULL)
+    {
+      list->children = skel;
+    }
+  else
+    {
+      list = list->children;
+      while (list->next != NULL)
+        list = list->next;
+      list->next = skel;
+    }
+}
+
 
 /* Examining skels.  */
 



Mime
View raw message