diff --git a/lib/array_list.h b/lib/array_list.h index 6c64f92..aebce28 100644 --- a/lib/array_list.h +++ b/lib/array_list.h @@ -4,6 +4,8 @@ #include #include +#include "types.h" + #define ARRAY_LIST_INITIAL_CAPACITY 10 /** diff --git a/lib/character.h b/lib/character.h index faee9bd..2046f47 100644 --- a/lib/character.h +++ b/lib/character.h @@ -5,6 +5,7 @@ #include #include "string.h" +#include "types.h" /** * @brief Append a character to a string, assuming string points to an array diff --git a/lib/convert.h b/lib/convert.h index 3521e95..a61b328 100644 --- a/lib/convert.h +++ b/lib/convert.h @@ -8,6 +8,7 @@ #include "mathematics.h" #include "stdbool.h" #include "string.h" +#include "types.h" /** * @brief Convert a character to a string. diff --git a/lib/dictionary.h b/lib/dictionary.h index 16ed4c0..d1450f5 100644 --- a/lib/dictionary.h +++ b/lib/dictionary.h @@ -5,6 +5,7 @@ #include #include "string.h" +#include "types.h" #define DICTIONARY_INITIAL_CAPACITY 10 diff --git a/lib/filesystem.h b/lib/filesystem.h index d519ba8..5814619 100644 --- a/lib/filesystem.h +++ b/lib/filesystem.h @@ -6,14 +6,12 @@ #include #include #include -#include #include #include #include #include "string.h" - -typedef uint8_t byte_t; +#include "types.h" /** * @brief Read the content of a file. diff --git a/lib/linked_list.h b/lib/linked_list.h index ff20024..99f2100 100644 --- a/lib/linked_list.h +++ b/lib/linked_list.h @@ -5,6 +5,7 @@ #include #include "stack.h" +#include "types.h" /** * @brief Linked list data structure. diff --git a/lib/mathematics.h b/lib/mathematics.h index cc426fd..31166ed 100644 --- a/lib/mathematics.h +++ b/lib/mathematics.h @@ -5,6 +5,8 @@ #include +#include "types.h" + /** * @brief Verify that 2 numbers are equal. * diff --git a/lib/queue.h b/lib/queue.h index 288fb17..123c8a3 100644 --- a/lib/queue.h +++ b/lib/queue.h @@ -4,6 +4,8 @@ #include #include +#include "types.h" + /** * @brief Queue structure => FIFO (First In First Out). * @since v1.0.0 diff --git a/lib/stack.h b/lib/stack.h index 3333d43..b0eb2b5 100644 --- a/lib/stack.h +++ b/lib/stack.h @@ -4,6 +4,8 @@ #include #include +#include "types.h" + /** * @brief Stack structure => LIFO (Last In First Out). * @since v1.0.0 diff --git a/lib/string.h b/lib/string.h index dac4e4f..d5cb44a 100644 --- a/lib/string.h +++ b/lib/string.h @@ -8,8 +8,7 @@ #include "character.h" #include "convert.h" #include "dictionary.h" - -typedef char* string_t; +#include "types.h" /** * @brief Return the length of a string (excluding '\0'). diff --git a/lib/terminal.h b/lib/terminal.h index a2a5091..cde227e 100644 --- a/lib/terminal.h +++ b/lib/terminal.h @@ -11,6 +11,7 @@ #include "linked_list.h" #include "queue.h" #include "stack.h" +#include "types.h" /** * @brief Read a line from stdin. diff --git a/lib/types.h b/lib/types.h new file mode 100644 index 0000000..92eacf4 --- /dev/null +++ b/lib/types.h @@ -0,0 +1,10 @@ +#ifndef __TYPES__ +#define __TYPES__ + +#include + +typedef uint8_t byte_t; + +typedef char* string_t; + +#endif diff --git a/libcproject.h b/libcproject.h index 3a81352..be5758a 100644 --- a/libcproject.h +++ b/libcproject.h @@ -12,6 +12,7 @@ #include "lib/stack.h" #include "lib/string.h" #include "lib/terminal.h" +#include "lib/types.h" #include "version.h" #endif