uthash.h in uthash-1.5.rar


is a C language uthash the hash table to support a variety of structural types o...Original Link
    Sponsored links

			
/*
Copyright (c) 2003-2009, Troy D. Hanson     http://uthash.sourceforge.net
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <string.h> /* memcmp,strlen */
#include <stddef.h> /* ptrdiff_t */

#ifndef UTHASH_H
#define UTHASH_H 

#define UTHASH_VERSION 1.5

/* C++ requires extra stringent casting */
#if defined __cplusplus
#define TYPEOF(x) (typeof(x))
#else
#define TYPEOF(x)
#endif


#define uthash_fatal(msg) exit(-1)        /* fatal error (out of memory,etc) */
#define uthash_bkt_malloc(sz) malloc(sz)  /* malloc fcn for UT_hash_bucket's */
#define uthash_bkt_free(ptr) free(ptr)    /* free fcn for UT_hash_bucket's   */
#define uthash_tbl_malloc(sz) malloc(sz)  /* malloc fcn for UT_hash_table    */
#define uthash_tbl_free(ptr) free(ptr)    /* free fcn for UT_hash_table      */

#define uthash_noexpand_fyi(tbl)          /* can be defined to log noexpand  */
#define uthash_expand_fyi(tbl)            /* can be defined to log expands   */

/* initial number of buckets */
#define HASH_INITIAL_NUM_BUCKETS 32      /*			

			...
			...
			... to be continued.

  This is a preview. To get the complete source file, 
  please click here to download the whole source code package.

			
			


Project Files

    Sponsored links
NameSizeDate
 ChangeLog.html11.58 kB19-02-09 19:47
 banner.png20.00 kB20-07-08 13:29
 banner.svg18.14 kB20-07-08 13:29
 grad_blue.png290.00 B05-06-06 14:31
 grad_blue.svg3.02 kB05-06-06 14:31
 rss.png689.00 B13-02-09 16:52
 uthash-mini.png8.44 kB13-02-09 17:14
 uthash.png21.01 kB13-02-09 17:14
 index.html3.21 kB19-02-09 19:47
 license.html2.19 kB13-02-09 16:52
 styles.css1.80 kB13-02-09 16:52
 tdh-quirks.css613.00 B13-02-09 16:52
 tdh.css4.53 kB13-02-09 16:52
 toc.css673.00 B01-10-06 11:58
 userguide.html60.85 kB19-02-09 19:47
 userguide.pdf249.72 kB19-02-09 19:47
 Makefile678.00 B13-02-09 16:52
 NOTES1.88 kB13-02-09 16:52
 userguide.pdf249.72 kB19-02-09 19:47
 ChangeLog.txt3.52 kB19-02-09 19:47
 donate.txt435.00 B20-07-08 17:13
 sflogo.txt434.00 B15-07-08 13:40
 toc.txt2.42 kB25-07-08 13:43
 topnav.txt540.00 B13-02-09 16:52
 userguide.txt44.11 kB19-02-09 18:19
 LICENSE1.11 kB13-02-09 16:52
 README805.00 B19-02-09 18:19
 uthash.h38.66 kB19-02-09 18:19
 do_tests367.00 B12-08-08 11:41
 do_tests.cygwin437.00 B12-08-08 11:41
 do_tests.mingw293.00 B28-07-08 05:57
 emit_keys.c984.00 B17-02-09 14:51
 example.c2.97 kB09-09-08 18:21
 keystat.c4.75 kB18-02-09 21:18
 keystats1.07 kB21-07-08 04:19
 Makefile1.41 kB19-02-09 18:41
 README2.55 kB09-09-08 18:21
 simkeys.pl791.00 B24-01-07 12:25
 test1.ans176.00 B05-06-06 14:31
 test1.c671.00 B17-02-09 14:51
 test10.ans131.00 B14-07-08 05:14
 test10.c1.28 kB17-02-09 14:51
 test11.ans346.00 B20-11-06 15:03
 test11.c1.13 kB17-02-09 14:51
 test11.dat346.00 B05-06-06 14:31
 test12.ans344.00 B05-06-06 14:31
 test12.c976.00 B17-02-09 14:51
 test13.ans120.00 B05-06-06 14:31
 test13.c1,003.00 B17-02-09 14:51
 test14.ans113.00 B14-07-08 05:14
 test14.c1.09 kB17-02-09 14:51
 test14.dat8.00 kB05-06-06 14:31
 test15.ans16.00 B05-06-06 14:31
 test15.c743.00 B17-02-09 14:51
 test16.ans35.00 B27-06-06 15:20
 test16.c1.44 kB18-02-09 21:18
 test17.ans2.54 kB22-11-06 11:25
 test17.c1.53 kB17-02-09 14:51
 test18.ans316.00 B18-07-08 13:12
 test18.c842.00 B17-02-09 14:51
 test19.ans11.73 kB20-07-08 17:11
 test19.c1.31 kB17-02-09 14:51
 test2.ans133.00 B05-06-06 14:31
 test2.c777.00 B17-02-09 14:51
 test20.ans6.00 B22-07-08 10:41
 test20.c760.00 B17-02-09 14:51
 test21.ans13.00 B22-07-08 10:41
 test21.c497.00 B17-02-09 14:51
 test22.ans7.00 B24-07-08 11:34
 test22.c1.67 kB18-02-09 21:18
 test23.ans79.00 B24-07-08 11:34
 test23.c980.00 B17-02-09 14:51
 test24.ans23.00 B09-09-08 18:21
 test24.c589.00 B17-02-09 14:51
 test3.ans88.00 B05-06-06 14:31
 test3.c939.00 B17-02-09 14:51
 test4.ans176.00 B05-06-06 14:31
 test4.c774.00 B17-02-09 14:51
 test5.ans133.00 B05-06-06 14:31
 test5.c912.00 B17-02-09 14:51
 test6.ans56.00 B05-06-06 14:31
 test6.c1.59 kB17-02-09 14:51
 test7.ans182.00 B14-07-08 05:14
 test7.c1.77 kB17-02-09 14:51
 test8.ans361.00 B05-06-06 14:31
 test8.c906.00 B17-02-09 14:51
 test9.ans11.59 kB14-07-08 05:14
 test9.c1.61 kB17-02-09 14:51
 do_tests422.00 B17-02-09 14:04
 Makefile631.00 B19-02-09 18:41
 README120.00 B19-02-09 18:19
 test1.c2.84 kB17-02-09 14:04
 test2.c1.49 kB19-02-09 18:19
 <img>0.00 B11-04-09 21:25
 <html>0.00 B11-04-09 21:25
 <pdf>0.00 B11-04-09 21:25
 <txt>0.00 B11-04-09 21:25
 <threads>0.00 B11-04-09 21:25
 <doc>0.00 B11-04-09 21:25
 <src>0.00 B11-04-09 21:25
 <tests>0.00 B11-04-09 21:25
 <uthash-1.5>0.00 B11-04-09 21:25
 <uthash-1.5>0.00 B11-04-09 21:25
...

Related Items

    Sponsored links