diff options
| -rw-r--r-- | include/eval.h | 7 | ||||
| -rw-r--r-- | include/global.h | 5 | ||||
| -rw-r--r-- | src/global.cc | 3 | ||||
| -rw-r--r-- | src/main.cc | 8 |
4 files changed, 15 insertions, 8 deletions
diff --git a/include/eval.h b/include/eval.h index 6b0d1fa..bd3912c 100644 --- a/include/eval.h +++ b/include/eval.h @@ -18,3 +18,10 @@ #include "job.h" #include "ground.h" #include "parse.h" + +namespace ov4 +{ + +void eval(char *cmdline); + +} diff --git a/include/global.h b/include/global.h index ee1141e..7d63c1b 100644 --- a/include/global.h +++ b/include/global.h @@ -1,11 +1,16 @@ #pragma once +#include <vector> +#include <string> + namespace ov4 { + extern int verbose; constexpr int MAXLINE = 1024; constexpr int MAXARGS = 128; +extern std::vector<std::string> builtin_cmd_list; } diff --git a/src/global.cc b/src/global.cc index e2a17ab..5b92331 100644 --- a/src/global.cc +++ b/src/global.cc @@ -3,6 +3,9 @@ namespace ov4 { +using namespace std; + int verbose = 0; +vector<string> builtin_cmd_list = {"quit", "fg", "bg", "jobs"}; } diff --git a/src/main.cc b/src/main.cc index 4d89e6e..f6c5477 100644 --- a/src/main.cc +++ b/src/main.cc @@ -50,14 +50,6 @@ char sbuf[MAXLINE]; /* for composing sprintf messages */ - -vector<string> builtin_cmd_list = {"quit", "fg", "bg", "jobs"}; -/* End global variables */ - - -/* Function prototypes */ - -/* Here are the functions that you will implement */ void eval(char *cmdline); int builtin_cmd(char *c_str); |
