FreeBSD/contrib/subversion/subversion/libsvn_fs_x/noderevs.c
/* Given the ID, return the index+1 into IDS that contains a binary_id
 * for it.  Returns 0 for NULL IDs.  We use DICT to detect duplicates.
 */
Given the ID, return the index+1 into IDS that contains a binary_id
for it.  Returns 0 for NULL IDs.  We use DICT to detect duplicates.
Given the ID return the index + 1 into IDS that contains a binary_id for it . Returns 0 for NULL IDs . We use DICT to detect duplicates .
static int
store_id(apr_array_header_t *ids,
         apr_hash_t *dict,
         const svn_fs_x__id_t *id)
{
  int idx;
  void *idx_void;
  if (!svn_fs_x__id_used(id))
    return 0;
  idx_void = apr_hash_get(dict, &id, sizeof(id));
  idx = (int)(apr_uintptr_t)idx_void;
  if (idx == 0)
    {
      APR_ARRAY_PUSH(ids, svn_fs_x__id_t) = *id;
      idx = ids->nelts;
      apr_hash_set(dict, ids->elts + (idx-1) * ids->elt_size,
                   ids->elt_size, (void*)(apr_uintptr_t)idx);
    }
  return idx;
}
static int store_id ( apr_array_header_t * ids , apr_hash_t * dict , const svn_fs_x__id_t * id ) { int idx ; void * idx_void ; if ( ! svn_fs_x__id_used ( id ) ) return 0 ; idx_void = apr_hash_get ( dict , & id , sizeof ( id ) ) ; idx = ( int ) ( apr_uintptr_t ) idx_void ; if ( idx == 0 ) { APR_ARRAY_PUSH ( ids , svn_fs_x__id_t ) = * id ; idx = ids -> nelts ; apr_hash_set ( dict , ids -> elts + ( idx - 1 ) * ids -> elt_size , ids -> elt_size , ( void * ) ( apr_uintptr_t ) idx ) ; } return idx ; }
Given the ID, return the index+1 into IDS that contains a binary_id
 for it.
Given the ID return the index + 1 into IDS that contains a binary_id for it .