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

[PATCH] Renaming svn_eol_* functions to svn_eol__*.

From: Edmund Wong <ed_at_kdtc.net>
Date: Sat, 29 Aug 2009 12:39:07 +0800

Since the svn_eol_* functions are in the private
headers, Arfrever pointed out that they should be
renamed to s/svn_eol_/&_/g.

Log:

[[[

* subversion/libsvn_subr/eol.c,
   subversion/libsvn_diff/diff_file.c,
   subversion/tests/libsvn_subr/eol-test.c,
   subversion/libsvn_client/patch.c,
   subversion/include/private/svn_eol_private.h:
   (svn_eol_find_eol_start, svn_eol_detect_eol,
    svn_eol_detect_file_eol): Renamed from ...

* subversion/libsvn_subr/eol.c,
   subversion/libsvn_diff/diff_file.c,
   subversion/tests/libsvn_subr/eol-test.c,
   subversion/libsvn_client/patch.c,
   subversion/include/private/svn_eol_private.h:
   (svn_eol__find_eol_start, svn_eol__detect_eol,
    svn_eol__detect_file_eol): ... to.

Patch by: Edmund Wong ed <at> kdtc.net
Suggested by: arfrever

]]]

]]]

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2388443

Index: subversion/libsvn_diff/diff_file.c
===================================================================
--- subversion/libsvn_diff/diff_file.c (revision 38987)
+++ subversion/libsvn_diff/diff_file.c (working copy)
@@ -296,7 +296,7 @@
 
   while (1)
     {
- eol = svn_eol_find_eol_start(curp, endp - curp);
+ eol = svn_eol__find_eol_start(curp, endp - curp);
       if (eol)
         {
           had_cr = (*eol == '\r');
@@ -826,7 +826,7 @@
                 }
             }
 
- eol = svn_eol_find_eol_start(curp, length);
+ eol = svn_eol__find_eol_start(curp, length);
 
           if (eol != NULL)
             {
@@ -1427,7 +1427,7 @@
   if (curp == endp)
     return SVN_NO_ERROR;
 
- eol = svn_eol_find_eol_start(curp, endp - curp);
+ eol = svn_eol__find_eol_start(curp, endp - curp);
   if (!eol)
     eol = endp;
   else
@@ -1725,7 +1725,7 @@
   /* Check what eol marker we should use for conflict markers.
      We use the eol marker of the modified file and fall back on the
      platform's eol marker if that file doesn't contain any newlines. */
- eol = svn_eol_detect_eol(baton.buffer[1], baton.endp[1]);
+ eol = svn_eol__detect_eol(baton.buffer[1], baton.endp[1]);
   if (! eol)
     eol = APR_EOL_STR;
   baton.marker_eol = eol;
Index: subversion/libsvn_subr/eol.c
===================================================================
--- subversion/libsvn_subr/eol.c (revision 38987)
+++ subversion/libsvn_subr/eol.c (working copy)
@@ -30,7 +30,7 @@
 #include "private/svn_eol_private.h"
 
 char *
-svn_eol_find_eol_start(char *buf, apr_size_t len)
+svn_eol__find_eol_start(char *buf, apr_size_t len)
 {
   for (; len > 0; ++buf, --len)
     {
@@ -41,12 +41,12 @@
 }
 
 const char *
-svn_eol_detect_eol(char *buf, char *endp)
+svn_eol__detect_eol(char *buf, char *endp)
 {
   const char *eol;
   
   SVN_ERR_ASSERT_NO_RETURN(buf <= endp);
- eol = svn_eol_find_eol_start(buf, endp - buf);
+ eol = svn_eol__find_eol_start(buf, endp - buf);
   if (eol)
     {
       if (*eol == '\n')
@@ -63,7 +63,7 @@
 }
 
 svn_error_t *
-svn_eol_detect_file_eol(const char **eol, apr_file_t *file, apr_pool_t *pool)
+svn_eol__detect_file_eol(const char **eol, apr_file_t *file, apr_pool_t *pool)
 {
   char buf[512];
   apr_size_t nbytes;
@@ -108,7 +108,7 @@
       /* Try to detect the EOL style of the file by searching the
        * current chunk. */
       SVN_ERR_ASSERT(nbytes <= sizeof(buf));
- *eol = svn_eol_detect_eol(buf, buf + nbytes);
+ *eol = svn_eol__detect_eol(buf, buf + nbytes);
     }
   while (*eol == NULL);
 
Index: subversion/tests/libsvn_subr/eol-test.c
===================================================================
--- subversion/tests/libsvn_subr/eol-test.c (revision 38987)
+++ subversion/tests/libsvn_subr/eol-test.c (working copy)
@@ -66,7 +66,7 @@
       pos = 0;
       SVN_ERR(svn_io_file_seek(file, APR_SET, &pos, pool));
 
- SVN_ERR(svn_eol_detect_file_eol(&eol, file, pool));
+ SVN_ERR(svn_eol__detect_file_eol(&eol, file, pool));
       if (eol && expected_eol[i])
         SVN_ERR_ASSERT(strcmp(eol, expected_eol[i]) == 0);
       else
Index: subversion/include/private/svn_eol_private.h
===================================================================
--- subversion/include/private/svn_eol_private.h (revision 38987)
+++ subversion/include/private/svn_eol_private.h (working copy)
@@ -46,7 +46,7 @@
  * @since New in 1.7
  */
 char *
-svn_eol_find_eol_start(char *buf, apr_size_t len);
+svn_eol__find_eol_start(char *buf, apr_size_t len);
 
 /* Return the first eol marker found in [@a buf, @a endp) as a
  * NUL-terminated string, or NULL if no eol marker is found.
@@ -61,7 +61,7 @@
  * @since New in 1.7
  */
 const char *
-svn_eol_detect_eol(char *buf, char *endp);
+svn_eol__detect_eol(char *buf, char *endp);
 
 /* Detect the EOL marker used in @a file and return it in @a *eol.
  * If it cannot be detected, set @a *eol to NULL.
@@ -77,7 +77,7 @@
  *
  * @since New in 1.7 */
 svn_error_t *
-svn_eol_detect_file_eol(const char **eol, apr_file_t *file, apr_pool_t *pool);
+svn_eol__detect_file_eol(const char **eol, apr_file_t *file, apr_pool_t *pool);
 
 #ifdef __cplusplus
 }
Index: subversion/libsvn_client/patch.c
===================================================================
--- subversion/libsvn_client/patch.c (revision 38987)
+++ subversion/libsvn_client/patch.c (working copy)
@@ -2079,7 +2079,7 @@
       SVN_ERR(svn_io_file_open(&new_target->file, new_target->abs_path,
                                APR_READ | APR_BINARY | APR_BUFFERED,
                                APR_OS_DEFAULT, result_pool));
- SVN_ERR(svn_eol_detect_file_eol(&new_target->eol_str, new_target->file,
+ SVN_ERR(svn_eol__detect_file_eol(&new_target->eol_str, new_target->file,
                                         scratch_pool));
       new_target->stream = svn_stream_from_aprfile2(new_target->file, FALSE,
                                                     result_pool);
@@ -2841,7 +2841,7 @@
   SVN_ERR(svn_io_file_open(&patch_file, patch_path,
                            APR_READ | APR_BINARY, 0, pool));
 
- SVN_ERR(svn_eol_detect_file_eol(&patch_eol_str, patch_file, pool));
+ SVN_ERR(svn_eol__detect_file_eol(&patch_eol_str, patch_file, pool));
   if (patch_eol_str == NULL)
     {
       /* If we can't figure out the EOL scheme, just assume native.
Received on 2009-08-29 06:44:53 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.