1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-23 01:51:33 +02:00

b2/boom.c (main): rearrange to reduce indentation depth

This commit is contained in:
Werner Almesberger 2012-06-02 05:26:33 -03:00
parent 3ebac688bd
commit be1277eb99

View File

@ -129,45 +129,45 @@ int main(int argc, char **argv)
dollar = unique("$"); dollar = unique("$");
for (i = 1; i != argc; i++) { for (i = 1; i != argc; i++) {
if (*argv[i] == '-') { if (*argv[i] != '-') {
if (!strcmp(argv[i], "-N")) {
i++;
file_name_override = argv[i];
} else if (!strcmp(argv[i], "-v")) {
verbose++;
} else if (!strncmp(argv[i], "-d", 2)) {
if (argv[i][2]) {
dump(argv[i]+2);
} else {
i++;
if (!argv[i])
usage(*argv);
dump(argv[i]);
}
} else if (!strcmp(argv[i], "-c")) {
process = parse_characteristics;
} else if (!strcmp(argv[i], "-i")) {
process = parse_inventory;
} else if (!strcmp(argv[i], "-x")) {
process = parse_currencies;
} else if (!strcmp(argv[i], "-p")) {
process = parse_providers;
} else if (!strcmp(argv[i], "-s")) {
process = parse_substitutions;
} else if (!strcmp(argv[i], "-b")) {
process = parse_kicad_bom;
} else if (!strcmp(argv[i], "-X")) {
process = parse_symbols;
} else if (!strcmp(argv[i], "-q")) {
process = add_var;
} else if (!strcmp(argv[i], "-Q")) {
process = add_var;
select_parts = 1;
} else
usage(*argv);
} else {
process(argv[i]); process(argv[i]);
continue;
} }
if (!strcmp(argv[i], "-N")) {
i++;
file_name_override = argv[i];
} else if (!strcmp(argv[i], "-v")) {
verbose++;
} else if (!strncmp(argv[i], "-d", 2)) {
if (argv[i][2]) {
dump(argv[i]+2);
} else {
i++;
if (!argv[i])
usage(*argv);
dump(argv[i]);
}
} else if (!strcmp(argv[i], "-c")) {
process = parse_characteristics;
} else if (!strcmp(argv[i], "-i")) {
process = parse_inventory;
} else if (!strcmp(argv[i], "-x")) {
process = parse_currencies;
} else if (!strcmp(argv[i], "-p")) {
process = parse_providers;
} else if (!strcmp(argv[i], "-s")) {
process = parse_substitutions;
} else if (!strcmp(argv[i], "-b")) {
process = parse_kicad_bom;
} else if (!strcmp(argv[i], "-X")) {
process = parse_symbols;
} else if (!strcmp(argv[i], "-q")) {
process = add_var;
} else if (!strcmp(argv[i], "-Q")) {
process = add_var;
select_parts = 1;
} else
usage(*argv);
} }
if (vars) if (vars)
do_substitutions(); do_substitutions();