1
1
mirror of https://github.com/theoludwig/libcproject.git synced 2024-11-08 22:31:31 +01:00

feat: add types.h

This commit is contained in:
Théo LUDWIG 2023-06-25 15:07:34 +02:00
parent 1ded37b106
commit a0140a6716
Signed by: theoludwig
GPG Key ID: ADFE5A563D718F3B
13 changed files with 26 additions and 5 deletions

View File

@ -4,6 +4,8 @@
#include <stdbool.h>
#include <stdlib.h>
#include "types.h"
#define ARRAY_LIST_INITIAL_CAPACITY 10
/**

View File

@ -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

View File

@ -8,6 +8,7 @@
#include "mathematics.h"
#include "stdbool.h"
#include "string.h"
#include "types.h"
/**
* @brief Convert a character to a string.

View File

@ -5,6 +5,7 @@
#include <stdlib.h>
#include "string.h"
#include "types.h"
#define DICTIONARY_INITIAL_CAPACITY 10

View File

@ -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.

View File

@ -5,6 +5,7 @@
#include <stdlib.h>
#include "stack.h"
#include "types.h"
/**
* @brief Linked list data structure.

View File

@ -5,6 +5,8 @@
#include <stdbool.h>
#include "types.h"
/**
* @brief Verify that 2 numbers are equal.
*

View File

@ -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

View File

@ -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

View File

@ -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').

View File

@ -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
View File

@ -0,0 +1,10 @@
#ifndef __TYPES__
#define __TYPES__
#include <stdint.h>
typedef uint8_t byte_t;
typedef char* string_t;
#endif

View File

@ -12,6 +12,7 @@
#include "lib/stack.h"
#include "lib/string.h"
#include "lib/terminal.h"
#include "lib/types.h"
#include "version.h"
#endif