Started from buttom go to the sky
This commit is contained in:
parent
96215449bd
commit
f811e55dea
4781 changed files with 10121 additions and 1743 deletions
35
includes/app/node.h
Normal file
35
includes/app/node.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* node.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/04/28 18:35:22 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/04/28 18:53:13 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef NODE_H
|
||||
#define NODE_H
|
||||
|
||||
#include "me/types.h"
|
||||
#include "parser/api.h"
|
||||
|
||||
typedef struct s_node
|
||||
{
|
||||
t_u64 kind;
|
||||
const char *kind_str;
|
||||
const char *input;
|
||||
char *single_str;
|
||||
t_usize start;
|
||||
t_usize end;
|
||||
t_usize childs_count;
|
||||
struct s_node *childs;
|
||||
} t_node;
|
||||
|
||||
t_node build_node(TSNode curr, t_const_str input);
|
||||
t_str node_getstr(t_node *node);
|
||||
void free_node(t_node t);
|
||||
|
||||
#endif /* NODE_H */
|
||||
1
includes/me
Symbolic link
1
includes/me
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../stdme/include/me/
|
||||
57
includes/minishell.h
Normal file
57
includes/minishell.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* minishell.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/28 14:41:15 by rparodi #+# #+# */
|
||||
/* Updated: 2024/04/28 18:34:45 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef MINISHELL_H
|
||||
#define MINISHELL_H
|
||||
|
||||
# include "me/types.h"
|
||||
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
# include <stdlib.h>
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/wait.h>
|
||||
# include <stdlib.h>
|
||||
# include <stdarg.h>
|
||||
# include <readline/readline.h>
|
||||
# include <readline/history.h>
|
||||
|
||||
typedef struct s_utils
|
||||
{
|
||||
t_str name_shell;
|
||||
t_str str_input;
|
||||
t_str *strs_input;
|
||||
t_str *path;
|
||||
t_str *envp;
|
||||
} t_utils;
|
||||
|
||||
t_i32 main(t_i32 argc, t_str argv[], t_str arge[]);
|
||||
void ft_other_cmd(t_utils *shcat, t_usize i, t_usize prev_i);
|
||||
t_i32 ft_strcmp(const char *s1, const char *s2);
|
||||
t_i32 ft_check_type_operators(t_str operators);
|
||||
t_str *ft_split(t_const_str s, t_i8 c);
|
||||
t_str ft_strdup(t_const_str s);
|
||||
char *ft_strjoin(char const *s1, char const *s2);
|
||||
void *ft_calloc(t_usize nmemb, t_usize size);
|
||||
size_t ft_strlen(t_const_str s);
|
||||
t_usize ft_strlcpy(t_str dst, t_const_str src, t_usize size);
|
||||
void *ft_memset(void *s, t_i32 c, t_usize n);
|
||||
void ft_bzero(void *s, t_usize n);
|
||||
void ft_free_strs(t_str *strs);
|
||||
void ft_pwd(void);
|
||||
void ft_echo(t_str txt, t_str flag);
|
||||
void ft_exit(t_utils *maiboyerlpb, t_u8 exit_status);
|
||||
void ft_free(void *ptr);
|
||||
|
||||
#endif
|
||||
1
includes/parser
Symbolic link
1
includes/parser
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../parser/includes/
|
||||
44
includes/type_rust.h
Normal file
44
includes/type_rust.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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 t_file;
|
||||
|
||||
typedef bool t_error;
|
||||
|
||||
# define ERROR 1
|
||||
# define NO_ERROR 0
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue