-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshellby.h
More file actions
50 lines (39 loc) · 1.21 KB
/
shellby.h
File metadata and controls
50 lines (39 loc) · 1.21 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _SHELLBY_H_
#define _SHELLBY_H_
/* Libraries */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <errno.h>
/* Structures and global variables */
extern char **environ;
/* Prototypes */
/*prompt*/
int inter_shellby(void);
char **input_tokens(char *token, char *buffer);
void print_env(void);
int process_line(char **buffer, size_t *line_size, int *count);
/*aux functions*/
int _strcmp(const char *s1, const char *s2);
int _strncmp(const char *s1, const char *s2, size_t n);
unsigned int _strlen(const char *s);
char *_strcpy(char *dest, char *src);
void free_all(char *buffer, char **commands, char *heap_token);
int check_built_ins(char *buffer, char *token);
/*store paths*/
char **store_paths(void);
void *_realloc(void *ptr, unsigned int old_size, unsigned int new_size);
char *concat(const char *str1, const char *str2);
/*non_inter_shellby*/
int non_inter_shellby(int argc, char *argv[]);
int non_inter_piped(char *argv);
void child_exe(char **cmnds, char *argv, int count);
void print_number(int n);
/* look in PATH */
char *look_inPATH(char **token);
char *_strchr(char *s, char c);
#endif /* _SHELLBY_H_ */