Minishell
1.0
42 School Minishell Project - A simple shell implementation
Yüklüyor...
Arıyor...
Eşleşme Yok
builtin_export.c
Bu dosyanın dokümantasyonuna git.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* builtin_export.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: hgenc <hgenc@student.42kocaeli.com.tr> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2026/01/17 18:47:00 by hgenc #+# #+# */
9
/* Updated: 2026/01/18 17:25:00 by hgenc ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
/**
14
* @file builtin_export.c
15
* @brief export builtin komutu implementasyonu
16
*/
17
18
#include "
../../include/minishell.h
"
19
#include <stdlib.h>
20
#include <unistd.h>
21
22
int
builtin_export
(
t_shell
*shell,
t_cmd
*cmd)
23
{
24
int
i;
25
int
ret;
26
27
if
(!cmd->
args
[1])
28
return
(
print_export_list
(shell), 0);
29
ret = 0;
30
i = 1;
31
while
(cmd->
args
[i])
32
{
33
if
(
process_export_arg
(shell, cmd->
args
[i]))
34
ret = 1;
35
i++;
36
}
37
return
(ret);
38
}
builtin_export
int builtin_export(t_shell *shell, t_cmd *cmd)
Definition
builtin_export.c:22
process_export_arg
int process_export_arg(t_shell *shell, char *arg)
Definition
builtin_export_utils.c:124
print_export_list
void print_export_list(t_shell *shell)
Argümansız export - tüm değişkenleri alfabetik sıralı yazdırır.
Definition
builtin_export_utils.c:60
minishell.h
Minishell ana header dosyası
t_cmd
struct s_cmd t_cmd
t_shell
struct s_shell t_shell
s_cmd::args
char ** args
Definition
minishell.h:129
src
builtins
builtin_export.c
Oluşturan
1.16.1