normed the stdme headers
This commit is contained in:
parent
79e039c94a
commit
398dd520d0
84 changed files with 297 additions and 2819 deletions
|
|
@ -11,21 +11,21 @@
|
|||
/* ************************************************************************** */
|
||||
|
||||
#ifndef ENV_H
|
||||
#define ENV_H
|
||||
# define ENV_H
|
||||
|
||||
#include "me/string/string.h"
|
||||
#include "me/hashmap/hashmap_env.h"
|
||||
#include "me/types.h"
|
||||
#include "me/vec/vec_str.h"
|
||||
# include "me/hashmap/hashmap_env.h"
|
||||
# include "me/string/string.h"
|
||||
# include "me/types.h"
|
||||
# include "me/vec/vec_str.h"
|
||||
|
||||
t_hashmap_env *create_env_map(void);
|
||||
t_hashmap_env *create_env_map(void);
|
||||
|
||||
t_error build_envp(t_hashmap_env *envs, t_vec_str *out);
|
||||
t_error build_envp(t_hashmap_env *envs, t_vec_str *out);
|
||||
|
||||
struct s_build_envp_state
|
||||
struct s_build_envp_state
|
||||
{
|
||||
t_vec_str out;
|
||||
t_string buf;
|
||||
t_string buf;
|
||||
};
|
||||
|
||||
#endif /* ENV_H */
|
||||
|
|
|
|||
|
|
@ -11,27 +11,27 @@
|
|||
/* ************************************************************************** */
|
||||
|
||||
#ifndef NODE_H
|
||||
#define NODE_H
|
||||
# define NODE_H
|
||||
|
||||
#include "me/types.h"
|
||||
#include "parser/api.h"
|
||||
# include "me/types.h"
|
||||
# include "parser/api.h"
|
||||
|
||||
typedef struct s_node
|
||||
{
|
||||
t_u64 kind;
|
||||
t_const_str kind_str;
|
||||
t_const_str field_str;
|
||||
t_u64 field;
|
||||
t_const_str input;
|
||||
t_str single_str;
|
||||
t_usize start;
|
||||
t_usize end;
|
||||
t_usize childs_count;
|
||||
struct s_node *childs;
|
||||
} t_node;
|
||||
t_u64 kind;
|
||||
t_const_str kind_str;
|
||||
t_const_str field_str;
|
||||
t_u64 field;
|
||||
t_const_str input;
|
||||
t_str single_str;
|
||||
t_usize start;
|
||||
t_usize end;
|
||||
t_usize childs_count;
|
||||
struct s_node *childs;
|
||||
} t_node;
|
||||
|
||||
t_node build_node(t_parse_node curr, t_const_str input);
|
||||
t_str node_getstr(t_node *node);
|
||||
void free_node(t_node self);
|
||||
t_node build_node(t_parse_node curr, t_const_str input);
|
||||
t_str node_getstr(t_node *node);
|
||||
void free_node(t_node self);
|
||||
|
||||
#endif /* NODE_H */
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* handle_command.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/09 14:42:43 by rparodi #+# #+# */
|
||||
/* Updated: 2024/05/09 14:59:28 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef HANDLE_COMMAND_H
|
||||
# define HANDLE_COMMAND_H
|
||||
|
||||
# include "me/types.h"
|
||||
# include "app/state.h"
|
||||
# include "app/node.h"
|
||||
|
||||
t_error handle_command(t_node *self, t_utils *shcat, t_i32 *out_exit_code);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* handle_concat.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/02 15:49:12 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/05/02 15:52:16 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef HANDLE_CONCAT_H
|
||||
#define HANDLE_CONCAT_H
|
||||
|
||||
#include "app/state.h"
|
||||
#include "app/node.h"
|
||||
#include "me/types.h"
|
||||
|
||||
t_error handle_concat(t_node *self, t_utils *shcat, t_str *ret);
|
||||
|
||||
#endif /* HANDLE_CONCAT_H */
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* handle_expension.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/03 15:24:56 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/05/03 15:25:18 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef HANDLE_EXPENSION_H
|
||||
#define HANDLE_EXPENSION_H
|
||||
|
||||
#include "app/node.h"
|
||||
#include "app/state.h"
|
||||
#include "me/types.h"
|
||||
|
||||
t_error handle_expension(t_node *self, t_utils *shcat, t_str *ret);
|
||||
|
||||
#endif /* HANDLE_EXPENSION_H */
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* handle_program.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/09 14:42:43 by rparodi #+# #+# */
|
||||
/* Updated: 2024/05/09 15:51:11 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef HANDLE_PROGRAM_H
|
||||
# define HANDLE_PROGRAM_H
|
||||
|
||||
# include "me/types.h"
|
||||
# include "app/state.h"
|
||||
# include "app/node.h"
|
||||
|
||||
t_error handle_program(t_node *self, t_utils *shcat, t_i32 *out_exit_code);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* handle_raw_word.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/02 15:58:01 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/05/02 15:58:48 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef HANDLE_RAW_WORD_H
|
||||
#define HANDLE_RAW_WORD_H
|
||||
|
||||
#include "app/node.h"
|
||||
#include "app/state.h"
|
||||
|
||||
t_error handle_raw_string(t_node *self, t_utils *shcat, t_str *ret);
|
||||
|
||||
#endif /* HANDLE_RAW_WORD_H */
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* handle_word.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/02 16:00:11 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/05/02 16:00:40 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef HANDLE_WORD_H
|
||||
#define HANDLE_WORD_H
|
||||
|
||||
#include "app/state.h"
|
||||
#include "app/node.h"
|
||||
#include "me/types.h"
|
||||
|
||||
t_error handle_word(t_node *self, t_utils *shcat, t_str *ret);
|
||||
|
||||
#endif /* HANDLE_WORD_H */
|
||||
|
|
@ -11,14 +11,14 @@
|
|||
/* ************************************************************************** */
|
||||
|
||||
#ifndef SIGNAL_HANDLER_H
|
||||
#define SIGNAL_HANDLER_H
|
||||
# define SIGNAL_HANDLER_H
|
||||
|
||||
#include "me/types.h"
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
# include "me/types.h"
|
||||
# include <signal.h>
|
||||
# include <stdio.h>
|
||||
|
||||
typedef t_i32 t_signal;
|
||||
typedef t_i32 t_signal;
|
||||
|
||||
t_error install_signal(void);
|
||||
t_error install_signal(void);
|
||||
|
||||
#endif /* SIGNAL_HANDLER_H */
|
||||
|
|
|
|||
|
|
@ -11,17 +11,17 @@
|
|||
/* ************************************************************************** */
|
||||
|
||||
#ifndef STATE_H
|
||||
#define STATE_H
|
||||
# define STATE_H
|
||||
|
||||
#include "app/node.h"
|
||||
#include "me/hashmap/hashmap_env.h"
|
||||
#include "me/types.h"
|
||||
#include "me/os/process.h"
|
||||
# include "app/node.h"
|
||||
# include "me/hashmap/hashmap_env.h"
|
||||
# include "me/os/process.h"
|
||||
# include "me/types.h"
|
||||
|
||||
typedef struct s_parser
|
||||
{
|
||||
t_first_parser *parser;
|
||||
} t_parser;
|
||||
t_first_parser *parser;
|
||||
} t_parser;
|
||||
|
||||
typedef struct s_utils
|
||||
{
|
||||
|
|
@ -33,6 +33,6 @@ typedef struct s_utils
|
|||
t_hashmap_env *env;
|
||||
t_node current_node;
|
||||
t_process ret;
|
||||
} t_utils;
|
||||
} t_utils;
|
||||
|
||||
#endif /* STATE_H */
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* type_rust.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/28 14:44:20 by rparodi #+# #+# */
|
||||
/* Updated: 2024/03/31 20:53:56 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef TYPE_RUST_H
|
||||
#define TYPE_RUST_H
|
||||
|
||||
# include <stdbool.h>
|
||||
# include <stddef.h>
|
||||
# include <unistd.h>
|
||||
|
||||
typedef char *t_str;
|
||||
typedef const char *t_const_str;
|
||||
|
||||
typedef unsigned char t_u8;
|
||||
typedef char t_i8;
|
||||
typedef unsigned short t_u16;
|
||||
typedef short t_i16;
|
||||
typedef int t_i32;
|
||||
typedef unsigned int t_u32;
|
||||
typedef unsigned long long t_u64;
|
||||
typedef long long t_i64;
|
||||
typedef ssize_t t_isize;
|
||||
typedef size_t t_usize;
|
||||
|
||||
typedef float t_f32;
|
||||
typedef double t_f64;
|
||||
|
||||
typedef int int;
|
||||
|
||||
typedef bool t_error;
|
||||
|
||||
# define ERROR 1
|
||||
# define NO_ERROR 0
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue