Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • siv-mode
  • delete-des-compat
  • delete-rsa_blind
  • aes-struct-layout
  • master-updates
  • release-3.4-fixes
  • struct-layout
  • attribute-deprecated
  • rename-data-symbols
  • x86_64-sha_ni-sha256
  • ecc-params-tweak
  • delete-old-aes
  • cmac-support
  • x86_64-sha_ni-sha1
  • gcm-ctr-opt
  • ctr-opt
  • skein
  • api-opaque-fix
  • curve448
  • nettle_3.4.1_release_20181204
  • nettle_3.4.1rc1
  • nettle_3.4_release_20171119
  • nettle_3.4rc2
  • nettle_3.4rc1
  • nettle_3.3_release_20161001
  • nettle_3.2_release_20160128
  • nettle_3.1.1_release_20150424
  • nettle_3.1_release_20150407
  • nettle_3.1rc3
  • nettle_3.1rc2
  • nettle_3.1rc1
  • nettle_3.0_release_20140607
  • nettle_2.7.1_release_20130528
  • nettle_2.7_release_20130424
  • nettle_2.6_release_20130116
  • nettle_2.5_release_20120707
  • converted-master-branch-to-git
  • nettle_2.4_release_20110903
  • nettle_2.3_release_20110902
40 results

gcm-camellia128-meta.c

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    array.h 13.40 KiB
    /*
    || This file is part of Pike. For copyright information see COPYRIGHT.
    || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
    || for more information.
    || $Id: array.h,v 1.75 2008/05/11 14:55:53 mast Exp $
    */
    
    #ifndef ARRAY_H
    #define ARRAY_H
    
    #include "svalue.h"
    #include "dmalloc.h"
    
    /* This debug tool writes out messages whenever arrays with unfinished
     * type fields are encountered. */
    /* #define TRACE_UNFINISHED_TYPE_FIELDS */
    
    /**
     * A Pike array is represented as a 'struct array' with all the
     * needed svalues malloced in the same block.
     * 
     * @see type_field
     */
    struct array
    {
      PIKE_MEMORY_OBJECT_MEMBERS;
    
      struct array *next;	/**< we need to keep track of all arrays */
      struct array *prev;	/**< Another pointer, so we don't have to search
    			 * when freeing arrays */
      INT32 size;		/**< number of svalues in this array */
      INT32 malloced_size;	/**< number of svalues that can fit in this array */
      TYPE_FIELD type_field;/**< A bitfield with one bit for each type of
    			  * data in this array.
       Bits can be set that don't exist in the array. type_field is
       * initialized to BIT_MIXED|BIT_UNFINISHED for newly allocated
       * arrays so that they can be modified without having to update
       * this. It should be set accurately when that's done, though. */
      INT16 flags;          /**< ARRAY_* flags */
      struct svalue *item;  /**< the array of svalues */
      struct svalue real_item[1];
    };
    
    #define ARRAY_WEAK_FLAG 1
    #define ARRAY_CYCLIC 2
    #define ARRAY_LVALUE 4
    
    PMOD_EXPORT extern struct array empty_array, weak_empty_array;
    extern struct array *first_array;
    extern struct array *gc_internal_array;
    
    #if defined(DEBUG_MALLOC) && defined(PIKE_DEBUG)
    #define ITEM(X) (((struct array *)(debug_malloc_pass((X))))->item)
    #else
    #define ITEM(X) ((X)->item)
    #endif
    
    /* These are arguments for the function 'merge' which merges two sorted
     * set stored in arrays in the way you specify
     */
    #define PIKE_ARRAY_OP_A 1
    #define PIKE_ARRAY_OP_SKIP_A 2
    #define PIKE_ARRAY_OP_TAKE_A 3
    #define PIKE_ARRAY_OP_B 4
    #define PIKE_ARRAY_OP_SKIP_B 8
    #define PIKE_ARRAY_OP_TAKE_B 12
    #define PIKE_MINTERM(X,Y,Z) (((X)<<8)+((Y)<<4)+(Z))
    
    #define PIKE_ARRAY_OP_AND PIKE_MINTERM(PIKE_ARRAY_OP_SKIP_A,PIKE_ARRAY_OP_SKIP_A | PIKE_ARRAY_OP_TAKE_B,PIKE_ARRAY_OP_SKIP_B)
    #define PIKE_ARRAY_OP_AND_LEFT PIKE_MINTERM(PIKE_ARRAY_OP_SKIP_A,PIKE_ARRAY_OP_SKIP_B | PIKE_ARRAY_OP_TAKE_A,PIKE_ARRAY_OP_SKIP_B)