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/main.cc | |
| parent | 7d44fcb22f8c3817627815322e57dda893f3cab4 (diff) | |
better option sys
Diffstat (limited to 'src/main.cc')
| -rw-r--r-- | src/main.cc | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/main.cc b/src/main.cc index 2132ccb..ed88912 100644 --- a/src/main.cc +++ b/src/main.cc @@ -36,21 +36,24 @@ int main(int argc, char **argv) dup2(1, 2); /* Parse the command line */ - while ((c = getopt(argc, argv, "hvp")) != EOF) { - switch (c) { - case 'h': /* print help message */ - usage(); - break; - case 'v': /* emit additional diagnostic info */ - verbose = true; - break; - case 'p': /* don't print a prompt */ - emit_prompt = 0; /* handy for automatic testing */ - break; - default: - usage(); - } - } + + exe_option(argv); + + // while ((c = getopt(argc, argv, "hvp")) != EOF) { + // switch (c) { + // case 'h': /* print help message */ + // usage(); + // break; + // case 'v': /* emit additional diagnostic info */ + // verbose = true; + // break; + // case 'p': /* don't print a prompt */ + // emit_prompt = 0; /* handy for automatic testing */ + // break; + // default: + // usage(); + // } + // } |
