Merge commit, fixed warnings
This commit is contained in:
commit
13bc603a59
13 changed files with 158 additions and 113 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/10 18:43:18 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/08/11 11:30:09 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/08/14 18:15:30 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -22,6 +22,7 @@ t_error builtin_echo__(t_state *state, t_builtin_spawn_info info, t_i32 *exit_co
|
|||
bool print_line;
|
||||
t_string s;
|
||||
|
||||
(void)(state);
|
||||
print_line = true;
|
||||
i = 1;
|
||||
s = string_new(1024);
|
||||
|
|
@ -39,7 +40,6 @@ t_error builtin_echo__(t_state *state, t_builtin_spawn_info info, t_i32 *exit_co
|
|||
string_push(&s, info.args.buffer[i]);
|
||||
if (print_line)
|
||||
string_push_char(&s, '\n');
|
||||
// TODO: change the null to the actual redirection thingy, this needs to be done in the handle_builtin function beforehand
|
||||
me_printf_fd(info.stdout, "%s", s.buf);
|
||||
string_free(s);
|
||||
return (*exit_code = 0, NO_ERROR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue