-
Notifications
You must be signed in to change notification settings - Fork 0
/
headers.h
67 lines (60 loc) · 1.45 KB
/
headers.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <stdio.h>
#include <sys/utsname.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <pwd.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <grp.h>
#include <time.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <termios.h>
#include <ctype.h>
#include "cmd.h"
#include "paths.h"
#include "prompt.h"
#include "error_mes.h"
#include "echo.h"
#include "cd.h"
#include "pwd.h"
#include "back_process.h"
#include "ls.h"
#include "fore_process.h"
#include "pinfo.h"
#include "dll.h"
#include "history.h"
#include "discover.h"
#include "jobs.h"
#include "bg.h"
#include "fg.h"
#include "sig.h"
#include "autocompletion.h"
// using extern for convention
// Generic variables
extern size_t max_str_len;
extern size_t command_len;
extern size_t max_arg_length;
extern int pwd_flag;
extern int shell_pid;
extern char root_dir_path[1000];
extern char* user_name;
extern char old_pwd[1000];
extern char cur_dir[1000];
extern char input_message[1000];
// For foregorund processes
extern long process_exec_time;
extern int is_foreground_running;
extern int cur_foreground_process_pid;
extern char cur_foreground_process_name[1000];
// For background process handling
struct dll* running_background_processes;
// for history
struct dll* history_queue;
extern int default_history_storage_size;
extern int default_history_display_num;
extern char history_storage_file_name[1000];
extern char history_storage_file[2000];