mirror of
https://github.com/theoludwig/libcproject.git
synced 2024-12-11 21:13:00 +01:00
feat: add types.h
This commit is contained in:
parent
1ded37b106
commit
a0140a6716
@ -4,6 +4,8 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define ARRAY_LIST_INITIAL_CAPACITY 10
|
||||
|
||||
/**
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "string.h"
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief Append a character to a string, assuming string points to an array
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "mathematics.h"
|
||||
#include "stdbool.h"
|
||||
#include "string.h"
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief Convert a character to a string.
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "string.h"
|
||||
#include "types.h"
|
||||
|
||||
#define DICTIONARY_INITIAL_CAPACITY 10
|
||||
|
||||
|
@ -6,14 +6,12 @@
|
||||
#include <fcntl.h>
|
||||
#include <pwd.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "string.h"
|
||||
|
||||
typedef uint8_t byte_t;
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief Read the content of a file.
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "stack.h"
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief Linked list data structure.
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief Verify that 2 numbers are equal.
|
||||
*
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief Queue structure => FIFO (First In First Out).
|
||||
* @since v1.0.0
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief Stack structure => LIFO (Last In First Out).
|
||||
* @since v1.0.0
|
||||
|
@ -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').
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "linked_list.h"
|
||||
#include "queue.h"
|
||||
#include "stack.h"
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief Read a line from stdin.
|
||||
|
10
lib/types.h
Normal file
10
lib/types.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef __TYPES__
|
||||
#define __TYPES__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint8_t byte_t;
|
||||
|
||||
typedef char* string_t;
|
||||
|
||||
#endif
|
@ -12,6 +12,7 @@
|
||||
#include "lib/stack.h"
|
||||
#include "lib/string.h"
|
||||
#include "lib/terminal.h"
|
||||
#include "lib/types.h"
|
||||
#include "version.h"
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user