From 617104adeb89f4581f5810b40c546d94316bc9f9 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 3 Sep 2026 13:28:48 +0000 Subject: idk --- src/option.cc | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'src/option.cc') diff --git a/src/option.cc b/src/option.cc index 552d83f..2cae4ef 100644 --- a/src/option.cc +++ b/src/option.cc @@ -5,6 +5,7 @@ #include "global.h" #include "util/io.h" +#include "util/prompt.h" using namespace std; @@ -27,6 +28,37 @@ void v(string s) } LOG << "-v: invalid value" << endl; } - + +void p(string s) +{ + if (s == "" || s == "true" || s == "1") + { + ov4::emit_prompt = true; + LOG << "emit_prompt = true" << endl; + return; + } + if (s == "false" || s == "0") + { + ov4::emit_prompt = false; + LOG << "emit_prompt = flase" << endl; + return; + } + LOG << "-p: invalid value" << endl; +} + + +/* + * usage - print a help message + */ +void h([[maybe_unused]] string s) +{ + cout << "\ +Usage: ccshell [-hvp] \n\ + -h print this message \n\ + -v(=) print additional diagnostic information \n\ + -p(=) do not emit a command prompt \ +" << endl; + exit(1); } +} -- cgit v1.3.1-4-g156e