fixed wildcards and makefile

This commit is contained in:
mdev9
2024-04-29 11:15:54 +02:00
parent bb0a62342e
commit e9f9ede1f1
5 changed files with 10 additions and 7 deletions

View File

@ -6,7 +6,7 @@
# By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ # # By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2023/07/28 00:35:01 by tomoron #+# #+# # # Created: 2023/07/28 00:35:01 by tomoron #+# #+# #
# Updated: 2024/04/26 16:08:22 by tomoron ### ########.fr # # Updated: 2024/04/29 10:28:55 by marde-vr ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #
@ -22,7 +22,6 @@ SRCS_RAW = main.c\
pwd.c\ pwd.c\
env.c\ env.c\
parsing.c\ parsing.c\
debug.c\
env_utils.c\ env_utils.c\
parsing_var.c\ parsing_var.c\
path.c\ path.c\

View File

@ -6,7 +6,7 @@
# By: tomoron <marvin@42.fr> +#+ +:+ +#+ # # By: tomoron <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ # # +#+#+#+#+#+ +#+ #
# Created: 2023/07/28 00:35:01 by tomoron #+# #+# # # Created: 2023/07/28 00:35:01 by tomoron #+# #+# #
# Updated: 2024/04/02 16:02:33 by tomoron ### ########.fr # # Updated: 2024/04/29 11:13:55 by marde-vr ### ########.fr #
# # # #
# **************************************************************************** # # **************************************************************************** #
@ -52,7 +52,8 @@ SRCS = ft_atoi.c\
ft_split_set.c\ ft_split_set.c\
ft_free_str_arr.c\ ft_free_str_arr.c\
ft_set_color.c\ ft_set_color.c\
ft_isspace.c ft_isspace.c\
ft_str_is_only_char.c\
SRCS_BONUS = ft_lstnew.c\ SRCS_BONUS = ft_lstnew.c\
ft_lstadd_front.c\ ft_lstadd_front.c\

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */ /* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/30 16:55:48 by tomoron #+# #+# */ /* Created: 2023/10/30 16:55:48 by tomoron #+# #+# */
/* Updated: 2024/02/11 17:41:32 by tomoron ### ########.fr */ /* Updated: 2024/04/29 11:12:16 by marde-vr ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -46,6 +46,7 @@ void ft_lstadd_front(t_list **lst, t_list *new);
char **ft_split(char const *str, char charset); char **ft_split(char const *str, char charset);
void ft_lstadd_back(t_list **lst, t_list *new); void ft_lstadd_back(t_list **lst, t_list *new);
char **ft_split_set(char *str, char *charset); char **ft_split_set(char *str, char *charset);
int ft_str_is_only_char(char *str, char c);
void *ft_memset(void *s, int c, size_t n); void *ft_memset(void *s, int c, size_t n);
char *ft_get_color(int r, int g, int b); char *ft_get_color(int r, int g, int b);
void *ft_calloc(size_t nb, size_t size); void *ft_calloc(size_t nb, size_t size);

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */ /* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/04 17:31:38 by tomoron #+# #+# */ /* Created: 2024/02/04 17:31:38 by tomoron #+# #+# */
/* Updated: 2024/04/26 15:50:36 by marde-vr ### ########.fr */ /* Updated: 2024/04/29 11:12:35 by marde-vr ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */ /* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/15 12:53:29 by tomoron #+# #+# */ /* Created: 2024/04/15 12:53:29 by tomoron #+# #+# */
/* Updated: 2024/04/26 17:40:00 by marde-vr ### ########.fr */ /* Updated: 2024/04/29 11:12:40 by marde-vr ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "minishell.h" #include "minishell.h"
@ -42,6 +42,8 @@ int filename_corresponds(char *wildcard, char *value)
{ {
wildcard++; wildcard++;
value++; value++;
if (ft_str_is_only_char(wildcard, '*') && !*value)
return (1);
} }
else else
return (0); return (0);