diff options
Diffstat (limited to 'src/lib/libcrypto/lhash/lhash.h')
-rw-r--r-- | src/lib/libcrypto/lhash/lhash.h | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/src/lib/libcrypto/lhash/lhash.h b/src/lib/libcrypto/lhash/lhash.h index 70cbc6dfe7..6e5a1fe708 100644 --- a/src/lib/libcrypto/lhash/lhash.h +++ b/src/lib/libcrypto/lhash/lhash.h | |||
@@ -67,6 +67,10 @@ | |||
67 | extern "C" { | 67 | extern "C" { |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #ifndef NO_FP_API | ||
71 | #include <stdio.h> | ||
72 | #endif | ||
73 | |||
70 | typedef struct lhash_node_st | 74 | typedef struct lhash_node_st |
71 | { | 75 | { |
72 | char *data; | 76 | char *data; |
@@ -102,11 +106,16 @@ typedef struct lhash_st | |||
102 | unsigned long num_retrieve; | 106 | unsigned long num_retrieve; |
103 | unsigned long num_retrieve_miss; | 107 | unsigned long num_retrieve_miss; |
104 | unsigned long num_hash_comps; | 108 | unsigned long num_hash_comps; |
109 | |||
110 | int error; | ||
105 | } LHASH; | 111 | } LHASH; |
106 | 112 | ||
107 | #define LH_LOAD_MULT 256 | 113 | #define LH_LOAD_MULT 256 |
108 | 114 | ||
109 | #ifndef NOPROTO | 115 | /* Indicates a malloc() error in the last call, this is only bad |
116 | * in lh_insert(). */ | ||
117 | #define lh_error(lh) ((lh)->error) | ||
118 | |||
110 | LHASH *lh_new(unsigned long (*h)(), int (*c)()); | 119 | LHASH *lh_new(unsigned long (*h)(), int (*c)()); |
111 | void lh_free(LHASH *lh); | 120 | void lh_free(LHASH *lh); |
112 | char *lh_insert(LHASH *lh, char *data); | 121 | char *lh_insert(LHASH *lh, char *data); |
@@ -114,7 +123,7 @@ char *lh_delete(LHASH *lh, char *data); | |||
114 | char *lh_retrieve(LHASH *lh, char *data); | 123 | char *lh_retrieve(LHASH *lh, char *data); |
115 | void lh_doall(LHASH *lh, void (*func)(/* char *b */)); | 124 | void lh_doall(LHASH *lh, void (*func)(/* char *b */)); |
116 | void lh_doall_arg(LHASH *lh, void (*func)(/*char *a,char *b*/),char *arg); | 125 | void lh_doall_arg(LHASH *lh, void (*func)(/*char *a,char *b*/),char *arg); |
117 | unsigned long lh_strhash(char *c); | 126 | unsigned long lh_strhash(const char *c); |
118 | 127 | ||
119 | #ifndef NO_FP_API | 128 | #ifndef NO_FP_API |
120 | void lh_stats(LHASH *lh, FILE *out); | 129 | void lh_stats(LHASH *lh, FILE *out); |
@@ -127,26 +136,6 @@ void lh_stats_bio(LHASH *lh, BIO *out); | |||
127 | void lh_node_stats_bio(LHASH *lh, BIO *out); | 136 | void lh_node_stats_bio(LHASH *lh, BIO *out); |
128 | void lh_node_usage_stats_bio(LHASH *lh, BIO *out); | 137 | void lh_node_usage_stats_bio(LHASH *lh, BIO *out); |
129 | #endif | 138 | #endif |
130 | #else | ||
131 | LHASH *lh_new(); | ||
132 | void lh_free(); | ||
133 | char *lh_insert(); | ||
134 | char *lh_delete(); | ||
135 | char *lh_retrieve(); | ||
136 | void lh_doall(); | ||
137 | void lh_doall_arg(); | ||
138 | unsigned long lh_strhash(); | ||
139 | |||
140 | #ifndef NO_FP_API | ||
141 | void lh_stats(); | ||
142 | void lh_node_stats(); | ||
143 | void lh_node_usage_stats(); | ||
144 | #endif | ||
145 | void lh_stats_bio(); | ||
146 | void lh_node_stats_bio(); | ||
147 | void lh_node_usage_stats_bio(); | ||
148 | #endif | ||
149 | |||
150 | #ifdef __cplusplus | 139 | #ifdef __cplusplus |
151 | } | 140 | } |
152 | #endif | 141 | #endif |