normed: corrected the norm of the stdme

This commit is contained in:
Raphaël 2024-09-06 15:28:55 +02:00
parent d7bc70ce2f
commit 0b3c966eaa
7 changed files with 25 additions and 34 deletions

View file

@ -35,10 +35,10 @@ fs/fs_internal \
fs/getters \
fs/putfd \
gnl/get_next_line \
hash/hasher \
hash/hash_signed \
hash/hash_str \
hash/hash_unsigned \
hash/hasher \
hash/sip/sip13 \
hash/sip/sip_utils \
hash/sip/sip_utils2 \
@ -86,6 +86,10 @@ printf/printf \
printf/printf_fd \
printf/printf_str \
printf/vprintf \
string/mod \
string/string_insert \
string/string_remove \
string/string_reserve \
str/str_clone \
str/str_compare \
str/str_find_chr \
@ -102,10 +106,6 @@ str/str_n_find_str \
str/str_split \
str/str_substring \
str/str_trim \
string/mod \
string/string_insert \
string/string_remove \
string/string_reserve \
GEN_FILES = \
convert/i16_to_str \

View file

@ -1,27 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* best_move.c :+: :+: :+: */
/* str_sort.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/29 20:04:33 by maiboyer #+# #+# */
/* Updated: 2024/01/31 14:25:00 by maiboyer ### ########.fr */
/* Updated: 2024/09/06 15:26:05 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/types.h"
#include "me/vec/vec_str.h"
void vec_str_sort(t_vec_str *v,
t_vec_str_sort_fn is_sorted_fn)
void vec_str_sort(t_vec_str *v, t_vec_str_sort_fn is_sorted_fn)
{
t_usize sorted_part;
t_usize i;
t_str tmp;
t_usize sorted_part;
t_usize i;
t_str tmp;
if (v == NULL)
return;
return ;
sorted_part = v->len;
while (sorted_part > 0)
{

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/04 22:27:00 by maiboyer #+# #+# */
/* Updated: 2024/08/02 19:10:51 by maiboyer ### ########.fr */
/* Updated: 2024/09/06 15:28:26 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -37,28 +37,20 @@ t_error _handle_redirections_inherited(t_spawn_info *info, t_process *process)
t_error _handle_redirections_fds(t_spawn_info *info, t_process *process)
{
// t_fd *tmp;
if (info->stdin.tag == R_FD)
{
// tmp = info->stdin.fd.fd;
info->stdin = fd(dup_fd(info->stdin.fd.fd));
process->stdin = dup_fd(info->stdin.fd.fd);
// close_fd(tmp);
}
if (info->stdout.tag == R_FD)
{
// tmp = info->stdin.fd.fd;
info->stdout = fd(dup_fd(info->stdout.fd.fd));
process->stdout = dup_fd(info->stdout.fd.fd);
// close_fd(tmp);
}
if (info->stderr.tag == R_FD)
{
// tmp = info->stdin.fd.fd;
info->stderr = fd(dup_fd(info->stderr.fd.fd));
process->stderr = dup_fd(info->stderr.fd.fd);
// close_fd(tmp);
}
return (NO_ERROR);
}