From 1f24adc9cd90f05a463a71e7c2d14c1863ccba00 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Sat, 29 Sep 2018 08:28:26 +0200 Subject: Renamed source files to avoid clashes --- src/lib/third_party/include/hash.h | 30 ------------------------------ src/lib/third_party/include/ht_hash.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 src/lib/third_party/include/hash.h create mode 100644 src/lib/third_party/include/ht_hash.h (limited to 'src/lib/third_party/include') diff --git a/src/lib/third_party/include/hash.h b/src/lib/third_party/include/hash.h deleted file mode 100644 index 2251706e4..000000000 --- a/src/lib/third_party/include/hash.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Based on https://gist.github.com/tonious/1377667 */ - -#ifndef _HASH_H_ -#define _HASH_H_ - -#include "ndpi_api.h" - -struct entry_s { - char *key; - u_int16_t value; - struct entry_s *next; -}; - -typedef struct entry_s entry_t; - -struct hashtable_s { - int size; - struct entry_s **table; -}; - -typedef struct hashtable_s hashtable_t; - -extern hashtable_t *ht_create( int size ); -extern int ht_hash( hashtable_t *hashtable, char *key ); -extern entry_t *ht_newpair( char *key, u_int16_t value ); -extern void ht_set( hashtable_t *hashtable, char *key, u_int16_t value ); -extern u_int16_t ht_get( hashtable_t *hashtable, char *key ); -extern void ht_free( hashtable_t *hashtable ); - -#endif /* _HASH_H_ */ diff --git a/src/lib/third_party/include/ht_hash.h b/src/lib/third_party/include/ht_hash.h new file mode 100644 index 000000000..2251706e4 --- /dev/null +++ b/src/lib/third_party/include/ht_hash.h @@ -0,0 +1,30 @@ +/* Based on https://gist.github.com/tonious/1377667 */ + +#ifndef _HASH_H_ +#define _HASH_H_ + +#include "ndpi_api.h" + +struct entry_s { + char *key; + u_int16_t value; + struct entry_s *next; +}; + +typedef struct entry_s entry_t; + +struct hashtable_s { + int size; + struct entry_s **table; +}; + +typedef struct hashtable_s hashtable_t; + +extern hashtable_t *ht_create( int size ); +extern int ht_hash( hashtable_t *hashtable, char *key ); +extern entry_t *ht_newpair( char *key, u_int16_t value ); +extern void ht_set( hashtable_t *hashtable, char *key, u_int16_t value ); +extern u_int16_t ht_get( hashtable_t *hashtable, char *key ); +extern void ht_free( hashtable_t *hashtable ); + +#endif /* _HASH_H_ */ -- cgit v1.2.3