Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executor merge #14

Merged
merged 93 commits into from
Sep 8, 2023
Merged

Executor merge #14

merged 93 commits into from
Sep 8, 2023

Conversation

LithiumOx
Copy link
Member

Just a force merge to be able to continue from the executor

LithiumOx and others added 30 commits July 13, 2023 18:03
📝 docs(enum.h): add enum for different types of tokens

🔧 fix(minishell.h): update last modified timestamp in file header
🔧 fix(minishell.h): update last modified timestamp in file header
🔧 fix(structs.h): update last modified timestamp in file header
✨ feat(minishell.h): add support for bool type
✨ feat(minishell.h): add support for unistd.h library
✨ feat(minishell.h): add support for list_append function
✨ feat(minishell.h): add support for list_insert function
✨ feat(structs.h): add support for t_token struct
✨ feat(structs.h): add support for t_token type field
✨ feat(structs.h): add support for t_token value field
✨ feat(structs.h): add support for t_token prev field
✨ feat(structs.h): add support for t_token next field

📝 docs(init.c): add documentation for list_append and list_insert functions
🔀 chore(structs.h): update timestamp in comments
🔧 chore(Makefile): update INCLUDES variable to include additional directories
🔧 chore(libft): update libft submodule commit reference
🔧 chore(src/lexer): add new files index.c and utils.c
…ctories

🔧 fix(Makefile): remove lists/init from the list of source files
🔧 fix(includes/minishell.h): update timestamp
🔧 fix(includes/structs.h): update timestamp
🔧 fix(src/main.c): add tokenization logic
🔧 fix(libft): update libft submodule commit
🔧 fix(main.c): fix memory leaks and add debug print statements
✨ feat(main.c): add support for tokenizing input commands in minishell
🔧 chore(libft): update libft submodule to commit e940f84ca25690b4f7d9300ed027922dff3e5a4b
🔧 chore(main.c): refactor print_vec function to pretty_print_vector
🔧 chore(main.c): refactor clear_structs_vec function to clear_token
🔧 chore(main.c): update print_vec function to pretty print tokens
🔧 chore(main.c): update clear_structs_vec function to properly free memory
🐛 fix(main.c): remove unnecessary initialization of tokens vector
🐛 fix(main.c): fix memory leak by initializing tokens vector before each iteration
🔄 chore(libft): update libft submodule to commit 7e3359b
🐛 fix(main.c): fix pretty_print_vector function formatting
🐛 fix(main.c): fix token type assignment in tokenize function
🐛 fix(main.c): remove check_quotes_parantheses function call in main function
🐛 fix(main.c): fix comparison function from mini_strcmp to ft_strcmp
✨ feat(main.c): improve pretty printing of tokens in the vector
…ty_print_vector function

🐛 fix(main.c): fix memory leak by freeing token in clear_token function
🐛 fix(main.c): fix incorrect assignment of token value in tokenize function
🐛 fix(main.c): fix incorrect push of token address in tokenize function
📦 chore(main.c): update timestamp in Updated comment
🔧 chore(print_vector.c): add new file print_vector.c
…a8785dd683d7c879b8d2

🐛 fix(main.c): fix token indexing in pretty_print_vector function
✨ feat(main.c): add capitalize_token function to convert token values to lowercase
🐛 fix(main.c): change function name capitalize_token to uncapitalize_token
🐛 fix(main.c): change variable name tokens to t in tokenize function
🐛 fix(main.c): change variable name tokens to t in main function
✨ feat(main.c): add dynamic tokenization of input string
🔄 refactor(structs.h): update timestamp in file header comment
🐛 fix(main.c): fix memory leak in main function
🔧 chore(main.c): add check_leaks function to detect memory leaks
✨ feat(main.c): add debug mode with debug information and memory leak check
…e they are compiled

🔧 chore(minishell.h): update the last modified timestamp to reflect recent changes
🔧 chore(libft): update libft submodule to the latest commit
🔧 chore(lexer/index.c): update the last modified timestamp to reflect recent changes
🔧 chore(main.c): update the last modified timestamp to reflect recent changes
✨ feat(utils/error.c): add new error handling function to handle and display errors in a formatted way
Julius De Baaij and others added 27 commits August 2, 2023 21:32
…ing" to be recognized as C files

🔧 fix(enum.h): rename "I_HEREDOC" enum value to "HEREDOC" for consistency and clarity
🔧 fix(structs.h): change "t_vector exec" to "t_pipe exec" to accurately represent the type of the variable
🔧 fix(print_vector.c): change "I_HEREDOC" to "HEREDOC" in the extra_types function for consistency
🔧 fix(exec.c): update comments to reflect the plan of executing the entire process in a child process
🔧 fix(group.c): update comments to reflect the plan of handling HEREDOCs in the main process and redirects in child processes
🔧 fix(group.c): remove unused group_range function
🔧 fix(group.c): update comments to reflect the step-by-step process of grouping tokens and creating t_pipe
🔧 fix(group.c): update comments to reflect the plan of handling redirects and pipes in the group_tokens function
🔧 fix(index.c): rename "I_HEREDOC" to "HEREDOC" in the func_map array for consistency
🔧 fix(verify_token.c): rename "I_HEREDOC" to "HEREDOC" in the verify_token function for consistency
…mantics

🔧 fix(exec.c): update comments and remove unnecessary code
🔧 fix(group.c): update comments and remove unnecessary code
…edoc files

🔧 chore(Makefile): add exec/exec.c to the source files list to include it in the build process
🔧 chore(includes/minishell.h): add exec function declaration to the header file for proper function prototype
🔧 chore(libft): update libft submodule to commit 7cd6635d2ed0acd43bc50ffdacae207e28988488
🔧 chore(src/exec/exec.c): refactor exec function to improve code readability and remove unnecessary comments
🔧 chore(src/exec/group.c): refactor group_range function to improve code readability and remove commented code
🔧 chore(src/exec/heredoc.c): refactor heredoc function to improve code readability and remove unnecessary comments
🔧 chore(src/main.c): refactor main function to improve code readability and remove commented code
…percase PORT to improve semantics

✨ feat(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port
🐛 fix(Makefile): add missing source files to SRC variable to fix compilation errors
✨ feat(enum.h): add enum for different types of errors and processes for better error handling and process identification
✨ feat(minishell.h): add errno.h include for better error handling
✨ feat(minishell.h): add rm_quotes function to remove quotes from tokens
✨ feat(minishell.h): add t_exit enum for different types of errors
✨ feat(minishell.h): add t_process enum for different types of processes
✨ feat(minishell.h): add envp parameter to t_exec struct to pass environment variables to executor
✨ feat(minishell.h): add create_processes function to create child processes for execution
✨ feat(exec.c): add close_pipes function to close pipe file descriptors in groups
✨ feat(exec.c): add wait_processes function to wait for child processes to finish execution
✨ feat(executor.c): add executor function to handle execution of commands and processes
✨ feat(executor.c): add exit_mini function to handle program exit with error message and exit code
✨ feat(executor.c): add err function to handle error messages and exit codes
✨ feat(executor.c): add handle_redirects function to handle input/output redirections in groups
✨ feat(exec_process.c): add exec_process function to execute individual processes in groups
✨ feat(group.c): add group_tokens function to group tokens into executable groups
✨ feat(miscellaneous.c): add rm_quotes function to remove quotes from tokens
🔧 fix(print_vector.c): fix typo in variable name 'lenght' to 'length'
🔧 fix(create_processes.c): fix typo in variable name 'lenght' to 'length'
🔧 fix(exec.c): fix typo in variable name 'lenght' to 'length'
🔧 fix(group.c): fix typo in variable name 'lenght' to 'length'
🔧 fix(redirect.c): fix typo in variable name 'lenght' to 'length'
🔧 fix(token.c): fix typo in function name 'array_lenght' to 'array_length'
🔧 fix(index.c): fix typo in variable name 'lenght' to 'length'
🐛 fix(create_processes.c): change ft_vector_get to vector_get
🐛 fix(create_processes.c): change ft_vector_get to vector_get
🐛 fix(create_processes.c): change ft_vector_get to vector_get
🐛 fix(exec.c): change ft_vector_get to vector_get
🐛 fix(exec.c): change ft_vector_get to vector_get
🐛 fix(exec_process.c): change ft_vector_get to vector_get
🐛 fix(group.c): change ft_vec_get to vec_get
🐛 fix(group.c): change ft_vec_push to vec_push
🐛 fix(group.c): change ft_vec_push to vec_push
🐛 fix(group.c): change ft_vec_push to vec_push
🐛 fix(group.c): change ft_vec_push to vec_push
🐛 fix(group.c): change ft_vec_push

🔧 fix(group.c): change function name from ft_vec_free to vec_free
🔧 fix(group.c): change function name from ft_vec_init to vec_init
🔧 fix(global.c): change function name from ft_vec_free to vec_free
🔧 fix(init.c): change function name from ft_vec_init to vec_init
🐛 fix(token.c): change function call from vec->get to vec_get
🐛 fix(main.c): change function call from ft_vec_init to vec_init
🐛 fix(index.c): change function call from vec->get to vec_get
🐛 fix(init.c): change function call from g_data.env.push to vec_push
… returns false then write err, turn all voids into bool, red + find_cmd still need to be done
…hell function to prevent potential uninitialized variable usage

🔧 fix(error.c): refactor err function to use the exit_type and exit_msg variables from the t_shell struct instead of passing them as arguments
✨ feat(error.c): add set_err function to set the exit_type and exit_msg variables in the t_shell struct based on the type of error
✨ feat(error.c): add write_err function to print error messages based on the exit_type and exit_msg variables in the t_shell struct
@LithiumOx LithiumOx merged commit 51b339f into main Sep 8, 2023
1 check failed
@LithiumOx LithiumOx deleted the executor branch September 8, 2023 12:41
@LithiumOx LithiumOx restored the executor branch September 8, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants