From 3914f0621fa631a10da40d131e279c6ddbe8ba65 Mon Sep 17 00:00:00 2001 From: "Raphael (rparodi)" Date: Tue, 30 Jul 2024 16:42:20 +0200 Subject: [PATCH] Normed the headers of stdme --- stdme/include/me/str/str.h | 8 ++++---- stdme/include/me/types.h | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/stdme/include/me/str/str.h b/stdme/include/me/str/str.h index 9fb98768..1c6ca285 100644 --- a/stdme/include/me/str/str.h +++ b/stdme/include/me/str/str.h @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/19 23:30:46 by maiboyer #+# #+# */ -/* Updated: 2024/07/22 15:10:45 by maiboyer ### ########.fr */ +/* Updated: 2024/07/30 16:41:44 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,7 +14,7 @@ # define STR_H # include "me/types.h" -#include "me/vec/vec_str.h" +# include "me/vec/vec_str.h" /// @brief Get the length of a string /// @param str the string /// @return the length of the string @@ -106,7 +106,7 @@ t_str str_map(t_const_str s, char (*f)(t_usize, char)); /// @param chr the list of chars to be used as word delimiter /// @param out[out] the returned value, a vector of words /// @return True in case of error, false otherwise -t_error str_split(t_const_str str, t_const_str chrs, t_vec_str *out); +t_error str_split(t_const_str str, t_const_str chrs, t_vec_str *out); /// @brief Remove consecutive leading and trailing characters from a string /// @param str the string to trim @@ -116,7 +116,7 @@ t_str str_trim(t_const_str str, t_const_str charset); /// @brief Remove consecutive leading and trailing characters from a string /// @param str the string to free -static inline void str_free(t_str str) +static inline void str_free(t_str str) { void mem_free(void *ptr); diff --git a/stdme/include/me/types.h b/stdme/include/me/types.h index e4ae2d69..835667fd 100644 --- a/stdme/include/me/types.h +++ b/stdme/include/me/types.h @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/03 14:31:12 by maiboyer #+# #+# */ -/* Updated: 2024/07/26 13:55:48 by maiboyer ### ########.fr */ +/* Updated: 2024/07/30 16:40:58 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,6 +18,18 @@ # include # include +# ifndef ERROR +/// @def signal that an error occured +# define ERROR 1 +# else +# include +# endif + +# ifndef NO_ERROR +/// @def signal that no error occured +# define NO_ERROR 0 +# endif + /// @brief A string, null terminated typedef char *t_str; /// @brief A constant string, null terminated @@ -64,16 +76,4 @@ void me_exit(t_i32 code); /// @brief a function that prints the current stack trace void print_trace(void); - -# ifndef ERROR -/// @def signal that an error occured -# define ERROR 1 -# else -# include -# endif - -# ifndef NO_ERROR -/// @def signal that no error occured -# define NO_ERROR 0 -# endif #endif