FreeBSD/contrib/subversion/subversion/libsvn_fs_x/low_level.c
/* If PATH has been escaped, return the un-escaped version of it, allocated
 * from RESULT_POOL. Otherwise, return PATH directly. */
If PATH has been escaped, return the un-escaped version of it, allocated
from RESULT_POOL. Otherwise, return PATH directly.
If PATH has been escaped return the un - escaped version of it allocated from RESULT_POOL . Otherwise return PATH directly .
static const char *
auto_unescape_path(const char *path,
                   apr_pool_t *result_pool)
{
  const char esc = '\x1b';
  if (strchr(path, esc))
    {
      apr_size_t len = strlen(path);
      apr_size_t i;
      svn_stringbuf_t *unescaped = svn_stringbuf_create_ensure(len,
                                                               result_pool);
      for (i = 0; i < len; ++i)
        if (path[i] == esc)
          svn_stringbuf_appendbyte(unescaped, path[++i] + 1 - 'A');
        else
          svn_stringbuf_appendbyte(unescaped, path[i]);
      return unescaped->data;
    }
   return path;
}
static const char * auto_unescape_path ( const char * path , apr_pool_t * result_pool ) { const char esc = ' \x1b ' ; if ( strchr ( path , esc ) ) { apr_size_t len = strlen ( path ) ; apr_size_t i ; svn_stringbuf_t * unescaped = svn_stringbuf_create_ensure ( len , result_pool ) ; for ( i = 0 ; i < len ; ++ i ) if ( path [ i ] == esc ) svn_stringbuf_appendbyte ( unescaped , path [ ++ i ] + 1 - ' ' ) ; else svn_stringbuf_appendbyte ( unescaped , path [ i ] ) ; return unescaped -> data ; } return path ; }
If PATH has been escaped, return the un-escaped version of it, allocated
 from RESULT_POOL.
If PATH has been escaped return the un - escaped version of it allocated from RESULT_POOL .