diff options
| author | _ov4 <ov4@ov4.org> | 2026-09-02 04:19:08 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-09-02 04:19:08 +0000 |
| commit | fc7eec4af8c35012effdb62992adc9b49b869c28 (patch) | |
| tree | 8949790dbc7033f189304d4b594cab5226f6f888 /src/option.cc | |
| parent | 7d44fcb22f8c3817627815322e57dda893f3cab4 (diff) | |
better option sys
Diffstat (limited to 'src/option.cc')
| -rw-r--r-- | src/option.cc | 32 |
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; +} + +} + |
