aboutsummaryrefslogtreecommitdiffstats
path: root/cmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmd.h')
-rw-r--r--cmd.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/cmd.h b/cmd.h
index d591111..ce1d44c 100644
--- a/cmd.h
+++ b/cmd.h
@@ -1,6 +1,7 @@
1#ifndef CMD_H 1#ifndef CMD_H
2#define CMD_H 2#define CMD_H
3 3
4#include <fcntl.h>
4#include <pwd.h> 5#include <pwd.h>
5#include <stdbool.h> 6#include <stdbool.h>
6#include <stdio.h> 7#include <stdio.h>
@@ -9,7 +10,6 @@
9#include <sys/types.h> 10#include <sys/types.h>
10#include <sys/wait.h> 11#include <sys/wait.h>
11#include <unistd.h> 12#include <unistd.h>
12#include <fcntl.h>
13 13
14typedef enum { 14typedef enum {
15 CMD_NORMAL, 15 CMD_NORMAL,
@@ -31,9 +31,15 @@ typedef struct Command {
31} Command; 31} Command;
32 32
33void showPrompt(); 33void showPrompt();
34Command *newcmd(); 34Command *newCmd();
35int runcmd(Command *cmd); 35
36void freecmd(Command *cmd); 36int runCmd(Command *cmd);
37void printcmd(Command *cmd); 37int runNormalCmd(Command *cmd);
38int runPipeCmd(Command *cmd);
39int runAndOrCmd(Command *cmd);
40
41void freeCmd(Command *cmd);
42
43void redirect(Command *cur);
38 44
39#endif \ No newline at end of file 45#endif \ No newline at end of file