From 3630075d034a69826c380e5cb70301d5b97557d3 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Mon, 31 Aug 2026 07:33:20 +0000 Subject: eval --- include/eval.h | 7 +++++++ include/global.h | 5 +++++ src/global.cc | 3 +++ 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 +#include + namespace ov4 { + extern int verbose; constexpr int MAXLINE = 1024; constexpr int MAXARGS = 128; +extern std::vector 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 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 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); -- cgit v1.3.1-4-g156e