-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathincluded.h
57 lines (50 loc) · 1.3 KB
/
included.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
#ifndef __INCLUDED_H
#define __INCLUDED_H
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/utsname.h>
#include <pwd.h>
#include <dirent.h>
#include <time.h>
#include <grp.h>
#include <sys/wait.h>
#include <ctype.h>
#include <termios.h>
#define NUM_CMD 10
#define CMD_INC 5
#define DEF_BUF_SIZE 200
#define BUF_SZ_INC 100
#define DEF_HIST_SIZE 20
#define DEF_HIST_OUT 10
#define MAX_PIPES 100
#define KNRM "\033[1;31m\x1B[0m"
#define KRED "\033[1;31m\x1B[31m"
#define KGRN "\033[1;31m\x1B[32m"
#define KYEL "\033[1;31m\x1B[33m"
#define KBLU "\033[1;31m\x1B[34m"
#define KMAG "\033[1;31m\x1B[35m"
#define KCYN "\033[1;31m\x1B[36m"
#define KWHT "\033[1;31m\x1B[37m"
#define RESET "\033[1;31m\x1B[0m"
typedef struct _sysinfo {
char *home_dir, *user, *OS, *curr_dir, *rel_path;
} sysinfo;
typedef struct _procinfo {
char *procname;
char *command;
int pid, pgpid, jobno, status; // 1 if running, 0 if stopped
} procinfo;
extern int outfd, infd, o_outfd, o_infd;
extern int err_prompt, pipeflag, pipesleft, isrunning;
extern long int prevcmd_time;
extern procinfo fgpid;
extern procinfo *bgpid[], *piped_procs[];
extern sysinfo *currsys;
extern struct termios og_termios;
#endif