diff options
| -rw-r--r-- | include/global.h | 10 | ||||
| -rw-r--r-- | include/util/color.h | 4 | ||||
| -rw-r--r-- | include/util/io.h | 4 | ||||
| -rw-r--r-- | include/util/prompt.h | 14 | ||||
| -rw-r--r-- | src/global.cc | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/include/global.h b/include/global.h index 36fe3be..3649b21 100644 --- a/include/global.h +++ b/include/global.h @@ -6,14 +6,14 @@ namespace ov4 { -extern int verbose; +inline int verbose =1; -constexpr int MAXLINE = 1024; -constexpr int MAXARGS = 128; +inline constexpr int MAXLINE = 1024; +inline constexpr int MAXARGS = 128; -constexpr bool GLOBAL_DEBUG = true; +inline constexpr bool GLOBAL_DEBUG = true; -constexpr std::string_view name = "ccshell"; +inline constexpr std::string_view name = "ccshell"; } diff --git a/include/util/color.h b/include/util/color.h index 707efb4..9e9ed27 100644 --- a/include/util/color.h +++ b/include/util/color.h @@ -12,7 +12,7 @@ std::string make_color(const std::string s, const std::string_view color); namespace ov4::color { -constexpr std::string_view +inline constexpr std::string_view black = "30", red = "31", green = "32", @@ -22,7 +22,7 @@ constexpr std::string_view cyan = "36", white = "37"; -constexpr std::string_view +inline constexpr std::string_view bright_black = "90", bright_red = "91", bright_green = "92", diff --git a/include/util/io.h b/include/util/io.h index e72082f..52984c5 100644 --- a/include/util/io.h +++ b/include/util/io.h @@ -22,8 +22,8 @@ namespace ov4 struct LogVoidify { void operator&(std::ostream&) const {} }; -constexpr int DECIMAL = 10; -constexpr int LENGTH = 32; +inline constexpr int DECIMAL = 10; +inline constexpr int LENGTH = 32; void safe_print(char *s, bool ignore_wrap = false); void safe_print(int x); diff --git a/include/util/prompt.h b/include/util/prompt.h index 6cdcfb8..a9eae46 100644 --- a/include/util/prompt.h +++ b/include/util/prompt.h @@ -6,11 +6,13 @@ namespace ov4 { - constexpr std::string_view prompt_normal = "$"; - constexpr std::string_view prompt_root = "#"; - constexpr size_t hostname_size = 128; - extern bool emit_prompt; - void print_prompt(); - std::string get_prompt(); +inline constexpr std::string_view prompt_normal = "$"; +inline constexpr std::string_view prompt_root = "#"; +inline constexpr size_t hostname_size = 128; +extern bool emit_prompt; + +void print_prompt(); +std::string get_prompt(); + } diff --git a/src/global.cc b/src/global.cc index e2a17ab..06d4020 100644 --- a/src/global.cc +++ b/src/global.cc @@ -3,6 +3,4 @@ namespace ov4 { -int verbose = 0; - } |
