Format code.

This commit is contained in:
2016-12-21 14:50:32 -08:00
parent d41a085bcd
commit 52640ed8f9
7 changed files with 305 additions and 337 deletions

View File

@@ -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*);

View File

@@ -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*);