aboutsummaryrefslogtreecommitdiff
path: root/src/option.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/option.cc')
-rw-r--r--src/option.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/option.cc b/src/option.cc
new file mode 100644
index 0000000..552d83f
--- /dev/null
+++ b/src/option.cc
@@ -0,0 +1,32 @@
+#include "option.h"
+
+#include <string>
+#include <iostream>
+
+#include "global.h"
+#include "util/io.h"
+
+using namespace std;
+
+namespace ov4::option
+{
+
+void v(string s)
+{
+ if (s == "" || s == "true" || s == "1")
+ {
+ ov4::verbose = true;
+ LOG << "verbose = true" << endl;
+ return;
+ }
+ if (s == "false" || s == "0")
+ {
+ ov4::verbose = false;
+ LOG << "verbose = flase" << endl;
+ return;
+ }
+ LOG << "-v: invalid value" << endl;
+}
+
+}
+