Skip to content
Snippets Groups Projects
Select Git revision
1 result Searching

base16.h

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    • Niels Möller's avatar
      4fd20960
      * New name mangling, to reduce the risk of link collisions. All · 4fd20960
      Niels Möller authored
      functions (except memxor) now use a nettle_ or _nettle prefix when
      seen by the linker. For most functions, the header file that declares
      a function also use #define to provide a shorter more readable name
      without the prefix.
      
      Rev: src/nettle/aes-internal.h:1.9
      Rev: src/nettle/aes.h:1.6
      Rev: src/nettle/arcfour.h:1.4
      Rev: src/nettle/base16.h:1.2
      Rev: src/nettle/base64.h:1.12
      Rev: src/nettle/blowfish.h:1.8
      Rev: src/nettle/cast128.h:1.4
      Rev: src/nettle/cbc.h:1.4
      Rev: src/nettle/des.h:1.8
      Rev: src/nettle/dsa.h:1.7
      Rev: src/nettle/hmac.h:1.5
      Rev: src/nettle/knuth-lfib.h:1.2
      Rev: src/nettle/md5-compat.h:1.2
      Rev: src/nettle/md5.h:1.6
      Rev: src/nettle/pgp.h:1.2
      Rev: src/nettle/pkcs1.h:1.2
      Rev: src/nettle/rsa-compat.h:1.3
      Rev: src/nettle/rsa.h:1.22
      Rev: src/nettle/serpent.h:1.6
      Rev: src/nettle/sexp.h:1.15
      Rev: src/nettle/sha.h:1.3
      Rev: src/nettle/twofish.h:1.5
      Rev: src/nettle/yarrow.h:1.10
      4fd20960
      History
      * New name mangling, to reduce the risk of link collisions. All
      Niels Möller authored
      functions (except memxor) now use a nettle_ or _nettle prefix when
      seen by the linker. For most functions, the header file that declares
      a function also use #define to provide a shorter more readable name
      without the prefix.
      
      Rev: src/nettle/aes-internal.h:1.9
      Rev: src/nettle/aes.h:1.6
      Rev: src/nettle/arcfour.h:1.4
      Rev: src/nettle/base16.h:1.2
      Rev: src/nettle/base64.h:1.12
      Rev: src/nettle/blowfish.h:1.8
      Rev: src/nettle/cast128.h:1.4
      Rev: src/nettle/cbc.h:1.4
      Rev: src/nettle/des.h:1.8
      Rev: src/nettle/dsa.h:1.7
      Rev: src/nettle/hmac.h:1.5
      Rev: src/nettle/knuth-lfib.h:1.2
      Rev: src/nettle/md5-compat.h:1.2
      Rev: src/nettle/md5.h:1.6
      Rev: src/nettle/pgp.h:1.2
      Rev: src/nettle/pkcs1.h:1.2
      Rev: src/nettle/rsa-compat.h:1.3
      Rev: src/nettle/rsa.h:1.22
      Rev: src/nettle/serpent.h:1.6
      Rev: src/nettle/sexp.h:1.15
      Rev: src/nettle/sha.h:1.3
      Rev: src/nettle/twofish.h:1.5
      Rev: src/nettle/yarrow.h:1.10
    mapping.h 6.14 KiB
    /*\
    ||| This file a part of Pike, and is copyright by Fredrik Hubinette
    ||| Pike is distributed as GPL (General Public License)
    ||| See the files COPYING and DISCLAIMER for more information.
    \*/
    
    /*
     * $Id: mapping.h,v 1.34 2000/12/16 05:45:44 marcus Exp $
     */
    #ifndef MAPPING_H
    #define MAPPING_H
    
    #include "las.h"
    #include "block_alloc_h.h"
    
    #define MAPPING_FLAG_WEAK 1
    
    struct keypair
    {
      struct keypair *next;
      unsigned INT32 hval;
      struct svalue ind, val;
    };
    
    struct mapping_data
    {
      INT32 refs;
      INT32 valrefs; /* lock values too */
      INT32 hardlinks;
      INT32 size, hashsize;
      INT32 num_keypairs;
      TYPE_FIELD ind_types, val_types;
      INT16 flags;
      struct keypair *free_list;
      struct keypair *hash[1 /* hashsize */ ];
      /* struct keypair data_block[ hashsize * AVG_LINK_LENGTH ] */
    };
    
    #undef MAPPING_SIZE_DEBUG
    /* This debug doesn't work with weak mappings in the gc. */
    
    struct mapping
    {
      INT32 refs;
    #ifdef PIKE_SECURITY
      struct object *prot;
    #endif
    #ifdef MAPPING_SIZE_DEBUG
      INT32 debug_size;
    #endif
      struct mapping_data *data;
      struct mapping *next, *prev;
    };
    
    
    extern struct mapping *first_mapping;
    extern struct mapping *gc_internal_mapping;
    
    #define map_delete(m,key) map_delete_no_free(m, key, 0)
    #define m_sizeof(m) ((m)->data->size)
    #define m_ind_types(m) ((m)->data->ind_types)
    #define m_val_types(m) ((m)->data->val_types)
    #define mapping_get_flags(m) ((m)->data->flags)
    
    
    #define NEW_MAPPING_LOOP(md) \
      for((e=0) DO_IF_DMALLOC( ?0:(debug_malloc_touch(md)) ) ;e<md->hashsize;e++) for(k=md->hash[e];k;k=k->next)
    
    /* WARNING: this should not be used */
    #define MAPPING_LOOP(m) \