~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to src/hash.h

  • Committer: Bazaar Package Importer
  • Author(s): Noèl Köthe
  • Date: 2005-06-26 16:46:25 UTC
  • mfrom: (1.1.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050626164625-jjcde8hyztx7xq7o
Tags: 1.10-2
* wget-fix_error--save-headers patch from upstream
  (closes: Bug#314728)
* don't pattern-match server redirects patch from upstream
  (closes: Bug#163243)
* correct de.po typos
  (closes: Bug#313883)
* wget-E_html_behind_file_counting fix problem with adding the
  numbers after the html extension
* updated Standards-Version: to 3.6.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#ifndef HASH_H
31
31
#define HASH_H
32
32
 
33
 
/* From XEmacs, and hence from Dragon book. */
34
 
 
35
 
#define GOOD_HASH 65599 /* prime number just over 2^16; Dragon book, p. 435 */
36
 
#define HASH2(a,b)               (GOOD_HASH * (a)                     + (b))
37
 
#define HASH3(a,b,c)             (GOOD_HASH * HASH2 (a,b)             + (c))
38
 
#define HASH4(a,b,c,d)           (GOOD_HASH * HASH3 (a,b,c)           + (d))
39
 
#define HASH5(a,b,c,d,e)         (GOOD_HASH * HASH4 (a,b,c,d)         + (e))
40
 
#define HASH6(a,b,c,d,e,f)       (GOOD_HASH * HASH5 (a,b,c,d,e)       + (f))
41
 
#define HASH7(a,b,c,d,e,f,g)     (GOOD_HASH * HASH6 (a,b,c,d,e,f)     + (g))
42
 
#define HASH8(a,b,c,d,e,f,g,h)   (GOOD_HASH * HASH7 (a,b,c,d,e,f,g)   + (h))
43
 
#define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i))
44
 
 
45
33
struct hash_table;
46
34
 
47
35
struct hash_table *hash_table_new PARAMS ((int,
64
52
                             void *));
65
53
int hash_table_count PARAMS ((const struct hash_table *));
66
54
 
67
 
unsigned long string_hash PARAMS ((const void *));
68
 
int string_cmp PARAMS ((const void *, const void *));
69
55
struct hash_table *make_string_hash_table PARAMS ((int));
70
56
struct hash_table *make_nocase_string_hash_table PARAMS ((int));
71
57
 
72
 
unsigned long ptrhash PARAMS ((const void *));
73
 
int ptrcmp PARAMS ((const void *, const void *));
 
58
unsigned long hash_pointer PARAMS ((const void *));
 
59
 
 
60
/* From XEmacs, and hence from Dragon book. */
 
61
 
 
62
#define GOOD_HASH 65599 /* prime number just over 2^16; Dragon book, p. 435 */
 
63
#define HASH2(a,b)               (GOOD_HASH * (a)                     + (b))
 
64
#define HASH3(a,b,c)             (GOOD_HASH * HASH2 (a,b)             + (c))
 
65
#define HASH4(a,b,c,d)           (GOOD_HASH * HASH3 (a,b,c)           + (d))
 
66
#define HASH5(a,b,c,d,e)         (GOOD_HASH * HASH4 (a,b,c,d)         + (e))
 
67
#define HASH6(a,b,c,d,e,f)       (GOOD_HASH * HASH5 (a,b,c,d,e)       + (f))
 
68
#define HASH7(a,b,c,d,e,f,g)     (GOOD_HASH * HASH6 (a,b,c,d,e,f)     + (g))
 
69
#define HASH8(a,b,c,d,e,f,g,h)   (GOOD_HASH * HASH7 (a,b,c,d,e,f,g)   + (h))
 
70
#define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i))
74
71
 
75
72
#endif /* HASH_H */