forked from OctaForge/OctaBuild
style fix
parent
0fc919cb19
commit
9f91360299
40
main.cc
40
main.cc
|
@ -607,27 +607,27 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
ConstCharRange val = (argv[i][2] == '\0') ? argv[++i] : &argv[i][2];
|
ConstCharRange val = (argv[i][2] == '\0') ? argv[++i] : &argv[i][2];
|
||||||
switch (argn) {
|
switch (argn) {
|
||||||
case 'C':
|
case 'C':
|
||||||
if (!ostd::directory_change(val)) {
|
if (!ostd::directory_change(val)) {
|
||||||
return os.error(1, "failed changing directory: %s", val);
|
return os.error(1, "failed changing directory: %s", val);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
deffile = val;
|
||||||
|
break;
|
||||||
|
case 'e':
|
||||||
|
fcont = val;
|
||||||
|
break;
|
||||||
|
case 'j': {
|
||||||
|
int ival = atoi(val.data());
|
||||||
|
if (!ival) {
|
||||||
|
ival = ncpus;
|
||||||
|
}
|
||||||
|
os.jobs = ostd::max(1, ival);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
default:
|
||||||
case 'f':
|
return os.print_help(true, deffile);
|
||||||
deffile = val;
|
|
||||||
break;
|
|
||||||
case 'e':
|
|
||||||
fcont = val;
|
|
||||||
break;
|
|
||||||
case 'j': {
|
|
||||||
int ival = atoi(val.data());
|
|
||||||
if (!ival) {
|
|
||||||
ival = ncpus;
|
|
||||||
}
|
|
||||||
os.jobs = ostd::max(1, ival);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return os.print_help(true, deffile);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
posarg = i;
|
posarg = i;
|
||||||
|
|
Loading…
Reference in New Issue