-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdef.h
More file actions
43 lines (39 loc) · 776 Bytes
/
Copy pathdef.h
File metadata and controls
43 lines (39 loc) · 776 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _DEF_H_
#define _DEF_H_
#include <stdio.h>
#include <stdbool.h>
#define kBuiltinSize 6
#define kPathBufSize 1024
#define kLineSize 1024
#define kFileName 100
#define kPipeSize 5
#define kArgsSize 20
#define kCmdSize 5
#define kOpenMax 100
typedef void (*CmdHandler)();
typedef struct BuiltinCmd
{
char name[kBuiltinSize];
CmdHandler handler;
}BuiltinCmd;
// typedef struct ProcessNode
// {
// pid_t pid;
// struct ProcessNode *next;
// }ProcessNode;
typedef struct Command
{
char *args[kArgsSize];
bool append;
int infd, outfd;
struct Command* next;
}Command;
// void InitCmd(Command* cmd)
// {
// cmd->args[0] = NULL;
// cmd->append = false;
// cmd->next = NULL;
// cmd->infd = 0;
// cmd->outfd = 1;
// }
#endif