Skip to content
Snippets Groups Projects
Select Git revision
  • 402860f31ffb5ace60e64ccabb76d27c64a33ee0
  • master default protected
  • 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
41 results

getopt1.c

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    • Niels Möller's avatar
      65f4dcd4
      Moved files here. · 65f4dcd4
      Niels Möller authored
      Linked into the directories that need them by ./.bootstrap.
      
      Rev: misc/getopt.c:1.1
      Rev: misc/getopt.h:1.1
      Rev: misc/getopt1.c:1.1
      65f4dcd4
      History
      Moved files here.
      Niels Möller authored
      Linked into the directories that need them by ./.bootstrap.
      
      Rev: misc/getopt.c:1.1
      Rev: misc/getopt.h:1.1
      Rev: misc/getopt1.c:1.1
    block_alloc_h.h 2.50 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: block_alloc_h.h,v 1.25 2008/05/01 21:44:32 mast Exp $
    */
    
    #undef BLOCK_ALLOC
    #undef PTR_HASH_ALLOC
    #undef PTR_HASH_ALLOC_FIXED
    #undef BLOCK_ALLOC_FILL_PAGES
    #undef PTR_HASH_ALLOC_FILL_PAGES
    #undef PTR_HASH_ALLOC_FIXED_FILL_PAGES
    
    #ifndef PIKE_HASH_T
    #define PIKE_HASH_T	size_t
    #endif /* !PIKE_HASH_T */
    
    #ifdef BLOCK_ALLOC_USED
    #error "block_alloc.h must be included after all uses of block_alloc_h.h"
    #endif /* BLOCK_ALLOC_USED */
    
    #define BLOCK_ALLOC(DATA,SIZE)						\
    struct DATA *PIKE_CONCAT(alloc_,DATA)(void);				\
    void PIKE_CONCAT3(new_,DATA,_context)(void);				\
    void PIKE_CONCAT3(really_free_,DATA,_unlocked)(struct DATA *d);		\
    void PIKE_CONCAT(really_free_,DATA)(struct DATA *d);			\
    void PIKE_CONCAT3(free_all_,DATA,_blocks)(void);			\
    void PIKE_CONCAT3(count_memory_in_,DATA,s)(size_t *num, size_t *size);	\
    void PIKE_CONCAT3(init_,DATA,_blocks)(void)
    
    
    #define PTR_HASH_ALLOC(DATA,BSIZE)				\
    BLOCK_ALLOC(DATA,BSIZE);					\
    extern struct DATA **PIKE_CONCAT(DATA,_hash_table);		\
    extern size_t PIKE_CONCAT(DATA,_hash_table_size);		\
    struct DATA *PIKE_CONCAT(find_,DATA)(void *ptr);		\
    struct DATA *PIKE_CONCAT3(make_,DATA,_unlocked)			\
    		(void *ptr, PIKE_HASH_T hval);			\
    struct DATA *PIKE_CONCAT(make_,DATA)(void *ptr);		\
    struct DATA *PIKE_CONCAT(get_,DATA)(void *ptr);			\
    int PIKE_CONCAT3(check_,DATA,_semaphore)(void *ptr);		\
    void PIKE_CONCAT(move_,DATA)(struct DATA *block, void *new_ptr); \
    int PIKE_CONCAT(remove_,DATA)(void *ptr);			\
    void PIKE_CONCAT3(low_init_,DATA,_hash)(size_t);		\
    void PIKE_CONCAT3(init_,DATA,_hash)(void);			\
    void PIKE_CONCAT3(exit_,DATA,_hash)(void)
    
    #define PTR_HASH_ALLOC_FIXED(DATA,BSIZE)			\
    PTR_HASH_ALLOC(DATA,BSIZE)
    
    #define BLOCK_ALLOC_FILL_PAGES(DATA,PAGES) BLOCK_ALLOC(DATA, n/a)
    #define PTR_HASH_ALLOC_FILL_PAGES(DATA,PAGES) PTR_HASH_ALLOC(DATA, n/a)
    #define PTR_HASH_ALLOC_FIXED_FILL_PAGES(DATA,PAGES) PTR_HASH_ALLOC_FIXED(DATA, n/a)
    
    #define PTR_HASH_LOOP(DATA,HVAL,PTR)					\
      for ((HVAL) = (PIKE_HASH_T)PIKE_CONCAT(DATA,_hash_table_size); (HVAL)-- > 0;)	\
        for ((PTR) = PIKE_CONCAT(DATA,_hash_table)[HVAL];			\
    	 (PTR); (PTR) = (PTR)->BLOCK_ALLOC_NEXT)
    
    /* The name of a member in the BLOCK_ALLOC struct big enough to
     * contain a void * (used for the free list). */
    #define BLOCK_ALLOC_NEXT next
    
    /* The name of a void * member in the PTR_HASH_ALLOC struct containing
     * the key. */
    #define PTR_HASH_ALLOC_DATA data