diff --git a/Makefile b/Makefile index f2f7958..7840939 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ $(PROGRAM): $(OBJ) .PHONY: format format: - @clang-format -i $(CFILES) + @clang-format -i $(shell find src -name "*.c" -o -name "*.h") .PHONY: docs docs: diff --git a/src/builtin.h b/src/builtin.h index ca82ca2..c7f386a 100644 --- a/src/builtin.h +++ b/src/builtin.h @@ -9,7 +9,8 @@ #ifndef __BUILTIN_H_ #define __BUILTIN_H_ -#define NOT_IMPLEMENTED() printf("%s has not been implemented yet.\n", __func__); +#define NOT_IMPLEMENTED() \ + printf("%s has not been implemented yet.\n", __func__); typedef int (*builtin_func)(int argc, const char **); diff --git a/src/hashtable.h b/src/hashtable.h index e94dea8..4d0f56c 100644 --- a/src/hashtable.h +++ b/src/hashtable.h @@ -35,7 +35,8 @@ hashtable_t *hashtable_create(); /** * @brief This routine inserts an entry into a hashtable. */ -void hashtable_insert(hashtable_t *hashtable, const char *key, builtin_func func_ptr); +void hashtable_insert(hashtable_t *hashtable, const char *key, + builtin_func func_ptr); /** * @brief This routine creates an hashtable entry @@ -51,7 +52,8 @@ builtin_func hashtable_search(hashtable_t *hashtable, const char *key); * @brief This routine calculates the hash of a key * with basic collision mitigation */ -int hashtable_get_hash(const char *key, const size_t hashmap_size, const int att); +int hashtable_get_hash(const char *key, const size_t hashmap_size, + const int att); /** * @brief This routine removes an entry from a hashtable. @@ -71,5 +73,4 @@ void hashtable_destroy(hashtable_t *hashtable); */ int _hashtable_hash(const char *key, const int a, const size_t size); - #endif // __HASHTABLE_H_