Format code.
This commit is contained in:
20
include/ht.h
20
include/ht.h
@@ -6,25 +6,25 @@
|
||||
#include "libds.h"
|
||||
|
||||
struct ht_node_s {
|
||||
void* key;
|
||||
void* data;
|
||||
struct ht_node_s* next;
|
||||
void* key;
|
||||
void* data;
|
||||
struct ht_node_s* next;
|
||||
};
|
||||
|
||||
struct ht_s {
|
||||
struct ht_node_s* data[LIBDS_HT_SIZE];
|
||||
unsigned int (*hash_func)(void*);
|
||||
int (*cmp_func)(void*, void*);
|
||||
void* (*copy_func)(void*);
|
||||
void (*free_func)(void*);
|
||||
struct ht_node_s* data[LIBDS_HT_SIZE];
|
||||
unsigned int (*hash_func)(void*);
|
||||
int (*cmp_func)(void*, void*);
|
||||
void* (*copy_func)(void*);
|
||||
void (*free_func)(void*);
|
||||
};
|
||||
|
||||
typedef struct ht_node_s ht_node;
|
||||
typedef struct ht_s ht;
|
||||
|
||||
unsigned int ht_default_hash_func(void*);
|
||||
int ht_default_cmp_func(void*, void*);
|
||||
void* ht_default_copy_func(void*);
|
||||
int ht_default_cmp_func(void*, void*);
|
||||
void* ht_default_copy_func(void*);
|
||||
void ht_default_free_func(void*);
|
||||
|
||||
void ht_init(ht*);
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
enum libds_result_e {
|
||||
SUCCESS,
|
||||
MALLOC
|
||||
};
|
||||
enum libds_result_e { SUCCESS, MALLOC };
|
||||
|
||||
typedef enum libds_result_e libds_result;
|
||||
typedef int (*compare_func)(void*, void*);
|
||||
|
||||
Reference in New Issue
Block a user