diff options
Diffstat (limited to 'src/mds-kbdc/mds-kbdc.c')
-rw-r--r-- | src/mds-kbdc/mds-kbdc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mds-kbdc/mds-kbdc.c b/src/mds-kbdc/mds-kbdc.c index 6f4be18..65960dd 100644 --- a/src/mds-kbdc/mds-kbdc.c +++ b/src/mds-kbdc/mds-kbdc.c @@ -34,6 +34,21 @@ /** + * Parse command line arguments + */ +void parse_cmdline(void) +{ + int i; + for (i = 0; i < argc; i++) + { + char* arg = argv[i]; + if (strequals(arg, "--force")) + argv_force = 1; + } +} + + +/** * Compile a keyboard layout file * * @param argc_ The number of elements in `argv_` @@ -53,6 +68,8 @@ int main(int argc_, char** argv_) argc = argc_; argv = argv_; + parse_cmdline(); + mds_kbdc_parsed_initialise(&result); process (parse_to_tree(argv[1], &result)); process (simplify_tree(&result)); |