FreeBSD/contrib/subversion/subversion/libsvn_repos/dump.c
/* Hash iterator that uniquifies all keys into a single hash table,
   optionally normalizing them first. */
Hash iterator that uniquifies all keys into a single hash table,
optionally normalizing them first.
Hash iterator that uniquifies all keys into a single hash table optionally normalizing them first .
static svn_error_t *
extract_mergeinfo_paths(void *baton, const void *key, apr_ssize_t klen,
                         void *val, apr_pool_t *iterpool)
{
  struct extract_mergeinfo_paths_baton *const xb = baton;
  if (xb->normalize)
    {
      const char *normkey;
      SVN_ERR(svn_utf__normalize(&normkey, key, klen, &xb->buffer));
      svn_hash_sets(xb->result,
                    apr_pstrdup(xb->buffer.pool, normkey),
                    normalized_unique);
    }
  else
    apr_hash_set(xb->result,
                 apr_pmemdup(xb->buffer.pool, key, klen + 1), klen,
                 normalized_unique);
  return SVN_NO_ERROR;
}
static svn_error_t * extract_mergeinfo_paths ( void * baton , const void * key , apr_ssize_t klen , void * val , apr_pool_t * iterpool ) { struct extract_mergeinfo_paths_baton * const xb = baton ; if ( xb -> normalize ) { const char * normkey ; SVN_ERR ( svn_utf__normalize ( & normkey , key , klen , & xb -> buffer ) ) ; svn_hash_sets ( xb -> result , apr_pstrdup ( xb -> buffer . pool , normkey ) , normalized_unique ) ; } else apr_hash_set ( xb -> result , apr_pmemdup ( xb -> buffer . pool , key , klen + 1 ) , klen , normalized_unique ) ; return SVN_NO_ERROR ; }
Hash iterator that uniquifies all keys into a single hash table,
optionally normalizing them first.
Hash iterator that uniquifies all keys into a single hash table optionally normalizing them first .