[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Remove the 'svn_' prefix from a static function.

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2006-07-06 13:10:03 CEST

Hi,

    When browsing through the merge-tracking code, I noticed a static
function with a 'svn_' prefix. If my understanding is correct, static
funtions should not. Pl. find attached a patch that fixes this.

[[[
Remove the 'svn_' prefix from a static function.

(In branches/merge-tracking)

* subversion/libsvn_subr/mergeinfo.c:
   (svn_combine_ranges): Rename to combine_ranges.
   (parse_revlist, svn_rangelist_merge, rangelist_intersect_or_remove): Use
    combine_ranges() instead of svn_combine_ranges().
]]]

Regards,
Madan.

Index: subversion/libsvn_subr/mergeinfo.c
===================================================================
--- subversion/libsvn_subr/mergeinfo.c (revision 20444)
+++ subversion/libsvn_subr/mergeinfo.c (working copy)
@@ -36,7 +36,7 @@
    OUTPUT.
    If they could be combined, return TRUE. If they could not, return FALSE */
 static svn_boolean_t
-svn_combine_ranges(svn_merge_range_t **output, svn_merge_range_t *in1,
+combine_ranges(svn_merge_range_t **output, svn_merge_range_t *in1,
                    svn_merge_range_t *in2)
 {
   if (in1->start == in2->start)
@@ -168,7 +168,7 @@
       /* XXX: Watch empty revision list problem */
       if (*curr == '\n' || curr == end)
         {
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange, mrange))
+ if (!lastrange || !combine_ranges(&lastrange, lastrange, mrange))
             {
               APR_ARRAY_PUSH(revlist, svn_merge_range_t *) = mrange;
               lastrange = mrange;
@@ -178,7 +178,7 @@
         }
       else if (*curr == ',')
         {
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange, mrange))
+ if (!lastrange || !combine_ranges(&lastrange, lastrange, mrange))
             {
               APR_ARRAY_PUSH(revlist, svn_merge_range_t *) = mrange;
               lastrange = mrange;
@@ -278,7 +278,7 @@
       res = svn_sort_compare_ranges(&elt1, &elt2);
       if (res == 0)
         {
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange, elt1))
+ if (!lastrange || !combine_ranges(&lastrange, lastrange, elt1))
             {
               newrange = svn_range_dup(elt1, pool);
               APR_ARRAY_PUSH(*output, svn_merge_range_t *) = newrange;
@@ -290,7 +290,7 @@
         }
       else if (res < 0)
         {
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange, elt1))
+ if (!lastrange || !combine_ranges(&lastrange, lastrange, elt1))
             {
               newrange = svn_range_dup(elt1, pool);
               APR_ARRAY_PUSH(*output, svn_merge_range_t *) = newrange;
@@ -301,7 +301,7 @@
         }
       else
         {
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange, elt2))
+ if (!lastrange || !combine_ranges(&lastrange, lastrange, elt2))
             {
               newrange = svn_range_dup(elt2, pool);
               APR_ARRAY_PUSH(*output, svn_merge_range_t *) = newrange;
@@ -320,7 +320,7 @@
     {
       svn_merge_range_t *elt = APR_ARRAY_IDX(in1, i, svn_merge_range_t *);
 
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange, elt))
+ if (!lastrange || !combine_ranges(&lastrange, lastrange, elt))
         {
           newrange = svn_range_dup(elt, pool);
           APR_ARRAY_PUSH(*output, svn_merge_range_t *) = newrange;
@@ -333,7 +333,7 @@
     {
       svn_merge_range_t *elt = APR_ARRAY_IDX(in2, j, svn_merge_range_t *);
 
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange, elt))
+ if (!lastrange || !combine_ranges(&lastrange, lastrange, elt))
         {
           newrange = svn_range_dup(elt, pool);
           APR_ARRAY_PUSH(*output, svn_merge_range_t *) = newrange;
@@ -440,7 +440,7 @@
         {
           if (!do_remove)
             {
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange,
+ if (!lastrange || !combine_ranges(&lastrange, lastrange,
                                                     elt1))
                 {
                   lastrange = svn_range_dup(elt1, pool);
@@ -465,7 +465,7 @@
                   tmp_range.start = elt1->start;
                   tmp_range.end = elt2->start - 1;
 
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange,
+ if (!lastrange || !combine_ranges(&lastrange, lastrange,
                                                         &tmp_range))
                     {
                       lastrange = svn_range_dup(&tmp_range, pool);
@@ -479,7 +479,7 @@
                   tmp_range.start = elt2->start;
                   tmp_range.end = elt1->end;
 
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange,
+ if (!lastrange || !combine_ranges(&lastrange, lastrange,
                                                         &tmp_range))
                     {
                       lastrange = svn_range_dup(&tmp_range, pool);
@@ -501,7 +501,7 @@
                   tmp_range.start = elt1->start;
                   tmp_range.end = elt2->end;
                   
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange,
+ if (!lastrange || !combine_ranges(&lastrange, lastrange,
                                                         &tmp_range))
                     {
                       lastrange = svn_range_dup(&tmp_range, pool);
@@ -527,7 +527,7 @@
             j++;
           else
             {
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange,
+ if (!lastrange || !combine_ranges(&lastrange, lastrange,
                                                     elt1))
                 {
                   if (do_remove)
@@ -548,7 +548,7 @@
      walk the whiteboard array, we have to use our copy. */
       if (i < whiteboard->nelts)
         {
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange,
+ if (!lastrange || !combine_ranges(&lastrange, lastrange,
                                                 &wboardelt))
             {
               lastrange = svn_range_dup(&wboardelt, pool);
@@ -563,7 +563,7 @@
           svn_merge_range_t *elt = APR_ARRAY_IDX(whiteboard, i,
                                                  svn_merge_range_t *);
 
- if (!lastrange || !svn_combine_ranges(&lastrange, lastrange, elt))
+ if (!lastrange || !combine_ranges(&lastrange, lastrange, elt))
             {
               lastrange = svn_range_dup(elt, pool);
               APR_ARRAY_PUSH(*output, svn_merge_range_t *) = lastrange;

Remove the 'svn_' prefix from a static function.

(In branches/merge-tracking)

* subversion/libsvn_subr/mergeinfo.c:
  (svn_combine_ranges): Rename to combine_ranges.
  (parse_revlist, svn_rangelist_merge, rangelist_intersect_or_remove): Use
   combine_ranges() instead of svn_combine_ranges().

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 6 12:40:04 2006

This is an archived mail posted to the Subversion Dev mailing list.