diff options
author | David Robillard <d@drobilla.net> | 2021-04-12 14:58:50 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-04-12 14:58:50 -0400 |
commit | 5ea3ffb3ae0d5d718f5f2077e61af21470856d6c (patch) | |
tree | fc9bbed4b4e72cc806a9229df93398c69f649e34 /src | |
parent | a056cdb4629d09c5ddf02f15594d329744c79d44 (diff) | |
download | serd-5ea3ffb3ae0d5d718f5f2077e61af21470856d6c.tar.gz serd-5ea3ffb3ae0d5d718f5f2077e61af21470856d6c.tar.bz2 serd-5ea3ffb3ae0d5d718f5f2077e61af21470856d6c.zip |
Sort command line argument handling code
Diffstat (limited to 'src')
-rw-r--r-- | src/serdi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/serdi.c b/src/serdi.c index a464c8ec..86597cbf 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -233,6 +233,13 @@ main(int argc, char** argv) in_name = (const uint8_t*)"(string)"; from_file = false; break; + } else if (opt == 'c') { + if (argv[a][o + 1] || ++a == argc) { + return missing_arg(prog, 'c'); + } + + chop_prefix = (const uint8_t*)argv[a]; + break; } else if (opt == 'i') { if (argv[a][o + 1] || ++a == argc) { return missing_arg(prog, 'i'); @@ -258,13 +265,6 @@ main(int argc, char** argv) add_prefix = (const uint8_t*)argv[a]; break; - } else if (opt == 'c') { - if (argv[a][o + 1] || ++a == argc) { - return missing_arg(prog, 'c'); - } - - chop_prefix = (const uint8_t*)argv[a]; - break; } else if (opt == 'r') { if (argv[a][o + 1] || ++a == argc) { return missing_arg(prog, 'r'); |