subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1356419 - in /subversion/trunk/subversion: libsvn_subr/io.c tests/libsvn_subr/io-test.c
Date Mon, 02 Jul 2012 19:13:56 GMT
Author: rhuijben
Date: Mon Jul  2 19:13:55 2012
New Revision: 1356419

URL: http://svn.apache.org/viewvc?rev=1356419&view=rev
Log:
* subversion/libsvn_subr/io.c
* subversion/tests/libsvn_subr/io-test.c
  Remove whitespace and eol, added by recent patches.

Modified:
    subversion/trunk/subversion/libsvn_subr/io.c
    subversion/trunk/subversion/tests/libsvn_subr/io-test.c

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1356419&r1=1356418&r2=1356419&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Mon Jul  2 19:13:55 2012
@@ -185,7 +185,7 @@ try_utf8_from_internal_style(const char 
   /* Special case. */
   if (path == NULL)
     return "(NULL)";
-  
+
   /* (try to) convert PATH to UTF-8. If that fails, continue with the plain
    * PATH because it is the best we have. It may actually be UTF-8 already.
    */
@@ -1332,7 +1332,7 @@ svn_io_filesizes_three_different_p(svn_b
 
   /* Stat all three files */
   status1 = apr_stat(&finfo1, file1_apr, APR_FINFO_MIN, scratch_pool);
-  status2 = apr_stat(&finfo2, file2_apr, APR_FINFO_MIN, scratch_pool);  
+  status2 = apr_stat(&finfo2, file2_apr, APR_FINFO_MIN, scratch_pool);
   status3 = apr_stat(&finfo3, file3_apr, APR_FINFO_MIN, scratch_pool);
 
   /* If we got an error stat'ing a file, it could be because the
@@ -2031,7 +2031,7 @@ svn_io_unlock_open_file(apr_file_t *lock
   if (apr_err)
     return svn_error_wrap_apr(apr_err, _("Can't unlock file '%s'"),
                               try_utf8_from_internal_style(fname, pool));
-  
+
 /* On Windows and OS/2 file locks are automatically released when
    the file handle closes */
 #if !defined(WIN32) && !defined(__OS2__)
@@ -4126,7 +4126,7 @@ contents_three_identical_p(svn_boolean_t
   svn_error_t *err;
   apr_size_t bytes_read1, bytes_read2, bytes_read3;
   char *buf1 = apr_palloc(scratch_pool, SVN__STREAM_CHUNK_SIZE);
-  char *buf2 = apr_palloc(scratch_pool, SVN__STREAM_CHUNK_SIZE);  
+  char *buf2 = apr_palloc(scratch_pool, SVN__STREAM_CHUNK_SIZE);
   char *buf3 = apr_palloc(scratch_pool, SVN__STREAM_CHUNK_SIZE);
   apr_file_t *file1_h;
   apr_file_t *file2_h;
@@ -4150,22 +4150,22 @@ contents_three_identical_p(svn_boolean_t
   err = svn_io_file_open(&file3_h, file3, APR_READ, APR_OS_DEFAULT,
                          scratch_pool);
 
-  if (err)    
+  if (err)
       return svn_error_trace(
                svn_error_compose_create(
                     err,
-                    svn_error_compose_create(svn_io_file_close(file1_h, 
+                    svn_error_compose_create(svn_io_file_close(file1_h,
                                                           scratch_pool),
-                                             svn_io_file_close(file2_h, 
+                                             svn_io_file_close(file2_h,
                                                           scratch_pool))));
 
   /* assume TRUE, until disproved below */
-  *identical_p12 = *identical_p23 = *identical_p13 = TRUE;  
+  *identical_p12 = *identical_p23 = *identical_p13 = TRUE;
   /* We need to read as long as no error occurs, and as long as one of the
    * flags could still change due to a read operation */
-  while (!err 
-        && ((*identical_p12 && !eof1 && !eof2) 
-            || (*identical_p23 && !eof2 && !eof3) 
+  while (!err
+        && ((*identical_p12 && !eof1 && !eof2)
+            || (*identical_p23 && !eof2 && !eof3)
             || (*identical_p13 && !eof1 && !eof3)))
     {
       read_1 = read_2 = read_3 = FALSE;
@@ -4205,16 +4205,16 @@ contents_three_identical_p(svn_boolean_t
       /* If the files are still marked identical, and at least one of them
        * is not at the end of file, we check whether they differ, and set
        * their flag to false then. */
-      if (*identical_p12 
+      if (*identical_p12
           && (read_1 || read_2)
-          && ((eof1 != eof2) 
+          && ((eof1 != eof2)
               || (bytes_read1 != bytes_read2)
               || memcmp(buf1, buf2, bytes_read1)))
         {
           *identical_p12 = FALSE;
         }
 
-      if (*identical_p23 
+      if (*identical_p23
           && (read_2 || read_3)
           && ((eof2 != eof3)
               || (bytes_read2 != bytes_read3)
@@ -4223,10 +4223,10 @@ contents_three_identical_p(svn_boolean_t
           *identical_p23 = FALSE;
         }
 
-      if (*identical_p13 
+      if (*identical_p13
           && (read_1 || read_3)
-          && ((eof1 != eof3) 
-              || (bytes_read1 != bytes_read3) 
+          && ((eof1 != eof3)
+              || (bytes_read1 != bytes_read3)
               || memcmp(buf1, buf3, bytes_read3)))
         {
           *identical_p13 = FALSE;
@@ -4282,11 +4282,11 @@ svn_io_files_contents_three_same_p(svn_b
 {
   svn_boolean_t diff_size12, diff_size23, diff_size13;
 
-  SVN_ERR(svn_io_filesizes_three_different_p(&diff_size12, 
-                                             &diff_size23, 
-                                             &diff_size13, 
-                                             file1, 
-                                             file2, 
+  SVN_ERR(svn_io_filesizes_three_different_p(&diff_size12,
+                                             &diff_size23,
+                                             &diff_size13,
+                                             file1,
+                                             file2,
                                              file3,
                                              scratch_pool));
 
@@ -4295,25 +4295,25 @@ svn_io_files_contents_three_same_p(svn_b
       *same12 = *same23 = *same13 = FALSE;
     }
   else if (diff_size12 && diff_size23)
-    { 
-      *same12 = *same23 = FALSE;     
+    {
+      *same12 = *same23 = FALSE;
       SVN_ERR(contents_identical_p(same13, file1, file3, scratch_pool));
     }
   else if (diff_size23 && diff_size13)
-    { 
-      *same23 = *same13 = FALSE;     
+    {
+      *same23 = *same13 = FALSE;
       SVN_ERR(contents_identical_p(same12, file1, file2, scratch_pool));
     }
   else if (diff_size12 && diff_size13)
-    { 
-      *same12 = *same13 = FALSE;     
+    {
+      *same12 = *same13 = FALSE;
       SVN_ERR(contents_identical_p(same23, file2, file3, scratch_pool));
     }
   else
     {
       SVN_ERR_ASSERT(!diff_size12 && !diff_size23 && !diff_size13);
-      SVN_ERR(contents_three_identical_p(same12, same23, same13, 
-                                         file1, file2, file3, 
+      SVN_ERR(contents_three_identical_p(same12, same23, same13,
+                                         file1, file2, file3,
                                          scratch_pool));
     }
 

Modified: subversion/trunk/subversion/tests/libsvn_subr/io-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/io-test.c?rev=1356419&r1=1356418&r2=1356419&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/io-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/io-test.c Mon Jul  2 19:13:55 2012
@@ -64,7 +64,7 @@ struct test_file_definition_t
     char* created_path;
   };
 
-struct test_file_definition_t test_file_definitions[] = 
+struct test_file_definition_t test_file_definitions[] =
   {
     {"empty",                 "",      0},
     {"single_a",              "a",     1},
@@ -118,8 +118,8 @@ struct test_file_definition_t test_file_
 /* Function to prepare a single test file */
 
 static svn_error_t *
-create_test_file(struct test_file_definition_t* definition, 
-                 apr_pool_t *pool, 
+create_test_file(struct test_file_definition_t* definition,
+                 apr_pool_t *pool,
                  apr_pool_t *scratch_pool)
 {
   apr_status_t status = 0;
@@ -134,17 +134,17 @@ create_test_file(struct test_file_defini
     SVN_ERR_ASSERT(strlen(definition->data) >= 5);
 
 
-  definition->created_path = svn_dirent_join(TEST_DIR, 
-                                  definition->name, 
+  definition->created_path = svn_dirent_join(TEST_DIR,
+                                  definition->name,
                                   pool);
-  
-  SVN_ERR(svn_io_file_open(&file_h, 
+
+  SVN_ERR(svn_io_file_open(&file_h,
                            definition->created_path,
                            (APR_WRITE | APR_CREATE | APR_EXCL | APR_BUFFERED),
                            APR_OS_DEFAULT,
-                           scratch_pool));  
+                           scratch_pool));
 
-  for (i=1; i <= definition->size; i += 1) 
+  for (i=1; i <= definition->size; i += 1)
     {
       char c;
       if (i == 1)
@@ -163,12 +163,12 @@ create_test_file(struct test_file_defini
       if (status)
         break;
     }
-  
+
   if (status)
     err = svn_error_wrap_apr(status, "Can't write to file '%s'",
                               definition->name);
 
-  return svn_error_compose_create(err, 
+  return svn_error_compose_create(err,
                         svn_io_file_close(file_h, scratch_pool));
 }
 
@@ -192,15 +192,15 @@ create_comparison_candidates(apr_pool_t 
     SVN_ERR(svn_io_remove_dir2(TEST_DIR, TRUE, NULL, NULL, scratch_pool));
   else if (kind != svn_node_none)
     return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-                             "There is already a file named '%s'", 
+                             "There is already a file named '%s'",
                              TEST_DIR);
 
   SVN_ERR(svn_io_dir_make(TEST_DIR, APR_OS_DEFAULT, scratch_pool));
 
   svn_test_add_dir_cleanup(TEST_DIR);
 
-  for (candidate = test_file_definitions; 
-       candidate->name != NULL; 
+  for (candidate = test_file_definitions;
+       candidate->name != NULL;
        candidate += 1)
     {
       svn_pool_clear(iterpool);
@@ -289,12 +289,12 @@ test_two_file_content_comparison(apr_poo
                                                  inner->created_path,
                                                  outer->created_path,
                                                  iterpool);
-          
+
           if (cmp_err)
             {
               err = svn_error_compose_create(err, cmp_err);
             }
-          else 
+          else
             {
               if (expected != actual)
                   err = svn_error_compose_create(err,
@@ -325,7 +325,7 @@ test_three_file_size_comparison(apr_pool
   SVN_ERR(create_comparison_candidates(scratch_pool));
 
   for (outer = test_file_definitions; outer->name != NULL; outer += 1)
-    {    
+    {
       for (middle = outer; middle->name != NULL; middle += 1)
         {
           for (inner = middle; inner->name != NULL; inner += 1)
@@ -340,7 +340,7 @@ test_three_file_size_comparison(apr_pool
                                 &actual23,
                                 &actual13,
                                 inner->created_path,
-                                middle->created_path,                                
+                                middle->created_path,
                                 outer->created_path,
                                 iterpool);
 
@@ -348,7 +348,7 @@ test_three_file_size_comparison(apr_pool
                 {
                   err = svn_error_compose_create(err, cmp_err);
                 }
-              else 
+              else
                 {
                   if (expected12 != actual12)
                       err = svn_error_compose_create(err,
@@ -356,7 +356,7 @@ test_three_file_size_comparison(apr_pool
                                      "size comparison problem: '%s' and '%s'",
                                      inner->created_path,
                                      middle->created_path));
-                  
+
                   if (expected23 != actual23)
                       err = svn_error_compose_create(err,
                           svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
@@ -395,7 +395,7 @@ test_three_file_content_comparison(apr_p
   SVN_ERR(create_comparison_candidates(scratch_pool));
 
   for (outer = test_file_definitions; outer->name != NULL; outer += 1)
-    {    
+    {
       for (middle = outer; middle->name != NULL; middle += 1)
         {
           for (inner = middle; inner->name != NULL; inner += 1)
@@ -421,7 +421,7 @@ test_three_file_content_comparison(apr_p
                 {
                   err = svn_error_compose_create(err, cmp_err);
                 }
-              else 
+              else
                 {
                   if (expected12 != actual12)
                       err = svn_error_compose_create(err,
@@ -429,7 +429,7 @@ test_three_file_content_comparison(apr_p
                                      "size comparison problem: '%s' and '%s'",
                                      inner->created_path,
                                      middle->created_path));
-                  
+
                   if (expected23 != actual23)
                       err = svn_error_compose_create(err,
                           svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
@@ -461,7 +461,7 @@ struct svn_test_descriptor_t test_funcs[
     SVN_TEST_PASS2(test_two_file_size_comparison,
                    "two file size comparison"),
     SVN_TEST_PASS2(test_two_file_content_comparison,
-                   "two file content comparison"),                   
+                   "two file content comparison"),
     SVN_TEST_PASS2(test_three_file_size_comparison,
                    "three file size comparison"),
     SVN_TEST_PASS2(test_three_file_content_comparison,



Mime
View raw message