diff options
Diffstat (limited to 'cmd.h')
-rw-r--r-- | cmd.h | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -30,16 +30,19 @@ typedef struct Command { | |||
30 | bool background; | 30 | bool background; |
31 | } Command; | 31 | } Command; |
32 | 32 | ||
33 | extern char hostname[100]; | ||
34 | extern char *username; | ||
35 | extern char pwd[100]; | ||
36 | |||
33 | void showPrompt(); | 37 | void showPrompt(); |
34 | Command *newCmd(); | 38 | void argInsert(struct Command *cmd, char *s, bool isStr); |
35 | 39 | ||
40 | Command *newCmd(); | ||
41 | void freeCmd(Command *cmd); | ||
36 | int runCmd(Command *cmd); | 42 | int runCmd(Command *cmd); |
37 | int runNormalCmd(Command *cmd); | 43 | int runNormalCmd(Command *cmd); |
38 | int runPipeCmd(Command *cmd); | 44 | int runPipeCmd(Command *cmd); |
39 | int runAndOrCmd(Command *cmd); | 45 | int runAndOrCmd(Command *cmd); |
40 | |||
41 | void freeCmd(Command *cmd); | ||
42 | |||
43 | void redirect(Command *cur); | 46 | void redirect(Command *cur); |
44 | 47 | ||
45 | #endif \ No newline at end of file | 48 | #endif \ No newline at end of file |