-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.h
More file actions
29 lines (24 loc) · 774 Bytes
/
shell.h
File metadata and controls
29 lines (24 loc) · 774 Bytes
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
#ifndef SHELL_H
#define SHELL_H
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#define MAX_INPUT_SIZE 1024
char *cpy_str(char *dest, const char *src);
char *str_tok(char *str, const char *delim);
char *str_pbrk(const char *str, const char *delim);
char *read_input(void);
char *read_input_handler(void);
void display_prompt(void);
void remove_newline(char *str);
void display_environment(void);
void execute_external_command(char *input);
void execute_command(char *input);
int exec_cmd(const char *command, char *const args[], char *const env[]);
int str_cmp(const char *s1, const char *s2);
int str_format(char *str, size_t size, const char *format, void *args);
#endif