-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.h
36 lines (28 loc) · 910 Bytes
/
shell.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _SHELL_H_
#define _SHELL_H_
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
int _putchar(char);
void _prompt(int ac);
char **_strtok(char *s);
void _strcat(char *dest, const char *src);
bool _strcmp(const char *s1, const char *s2, int beg, int end);
void _strcpy(char *dest, const char *src);
int _strlen(const char *s);
void exit_control(char *line, ssize_t length);
char *find_path(char **env, char *cmd);
void get_strseq(const char *s, int beg, int end, char **res);
int find_strseq(const char *s, const char *sep, int idx);
bool env_built(char *s, char *env[]);
void print_env(char **env);
void sig_hand(int sig_num);
int num_words(char *sentence);
void proce_frk(char **tok, char **env, char *cmd, struct stat *st, char *err);
#endif /* _SHELL_H_ */