-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfo.h
64 lines (58 loc) · 1.17 KB
/
info.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
#ifndef _INFO_H_
#define _INFO_H_
#include <stdlib.h>
#include <unistd.h>
#include "alias.h"
#include "command.h"
#include "env.h"
#include "error.h"
#include "getline.h"
#include "history.h"
#include "list.h"
#include "string.h"
#include "tokens.h"
#include "types.h"
extern char **environ;
/**
* struct info - shell state
* @interactive: arguments passed
* @argc: arguments passed
* @argv: arguments passed
* @file: arguments passed
* @fileno: arguments passed
* @status: arguments passed
* @line: arguments passed
* @lineno: arguments passed
* @tokens: arguments passed
* @pid: arguments passed
* @cwd: arguments passed
* @exe: arguments passed
* @env: arguments passed
* @path: arguments passed
* @aliases: arguments passed
* @history: arguments passed
* @commands: arguments passed
*/
struct info
{
int interactive;
int argc;
char **argv;
char *file;
int fileno;
int status;
char *line;
size_t lineno;
char **tokens;
pid_t pid;
char *cwd;
char *exe;
env_t *env;
list_t *path;
alias_t *aliases;
history_t *history;
cmdlist_t *commands;
};
info_t *init_info(int argc, char **argv);
int free_info(info_t *info);
#endif /* _INFO_H_ */