Minishell
1.0
42 School Minishell Project - A simple shell implementation
Yüklüyor...
Arıyor...
Eşleşme Yok
builtin_utils.c
Bu dosyanın dokümantasyonuna git.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* builtin_utils.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: hgenc <hgenc@student.42kocaeli.com.tr> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2026/01/18 17:11:00 by hgenc #+# #+# */
9
/* Updated: 2026/02/16 20:30:00 by hgenc ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "
../../include/minishell.h
"
14
15
/*
16
** Değişken adının geçerli olup olmadığını kontrol eder
17
** Geçerli: harf veya _ ile başlar, alphanumeric ve _ içerebilir
18
** @param str: Kontrol edilecek string
19
** @return: 1 = geçerli, 0 = geçersiz
20
*/
21
int
is_valid_identifier
(
char
*str)
22
{
23
int
i;
24
25
if
(!str || !str[0])
26
return
(0);
27
if
(!ft_isalpha(str[0]) && str[0] !=
'_'
)
28
return
(0);
29
i = 1;
30
while
(str[i] && str[i] !=
'='
)
31
{
32
if
(!ft_isalnum(str[i]) && str[i] !=
'_'
)
33
return
(0);
34
i++;
35
}
36
return
(1);
37
}
is_valid_identifier
int is_valid_identifier(char *str)
Definition
builtin_utils.c:21
minishell.h
Minishell ana header dosyası
src
builtins
builtin_utils.c
Oluşturan
1.16.1