Author: stefan2
Date: Sat May 18 22:38:05 2013
New Revision: 1484193

URL: http://svn.apache.org/r1484193
Log:
On the fsfs-format7 branch: remove obsolete function

* subversion/libsvn_fs_fs/tree.c
  (escape_newline): drop

Modified:
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c?rev=1484193&r1=1484192&r2=1484193&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/tree.c Sat May 18 
22:38:05 2013
@@ -2206,53 +2206,6 @@ fs_dir_optimal_order(apr_array_header_t 
   return SVN_NO_ERROR;
 }
 
-/* Return a copy of PATH, allocated from POOL, for which newlines
-   have been escaped using the form \NNN (where NNN is the
-   octal representation of the byte's ordinal value).  */
-static const char *
-escape_newline(const char *path, apr_pool_t *pool)
-{
-  svn_stringbuf_t *retstr;
-  apr_size_t i, copied = 0;
-  int c;
-
-  /* At least one control character:
-      strlen - 1 (control) + \ + N + N + N + null . */
-  retstr = svn_stringbuf_create_ensure(strlen(path) + 4, pool);
-  for (i = 0; path[i]; i++)
-    {
-      c = (unsigned char)path[i];
-      if (c != '\n')
-        continue;
-
-      /* First things first, copy all the good stuff that we haven't
-         yet copied into our output buffer. */
-      if (i - copied)
-        svn_stringbuf_appendbytes(retstr, path + copied,
-                                  i - copied);
-
-      /* Make sure buffer is big enough for '\' 'N' 'N' 'N' (and NUL) */
-      svn_stringbuf_ensure(retstr, retstr->len + 4);
-      /*### The backslash separator doesn't work too great with Windows,
-         but it's what we'll use for consistency with invalid utf8
-         formatting (until someone has a better idea) */
-      apr_snprintf(retstr->data + retstr->len, 5, "\\%03o", (unsigned char)c);
-      retstr->len += 4;
-
-      /* Finally, update our copy counter. */
-      copied = i + 1;
-    }
-
-  /* Anything left to copy? */
-  if (i - copied)
-    svn_stringbuf_appendbytes(retstr, path + copied, i - copied);
-
-  /* retstr is null-terminated either by apr_snprintf or the svn_stringbuf
-     functions. */
-
-  return retstr->data;
-}
-
 /* Raise an error if PATH contains a newline because FSFS cannot handle
  * such paths. See issue #4340. */
 static svn_error_t *


Reply via email to