better handling of float cli arguments
This commit is contained in:
@@ -122,7 +122,14 @@ while ((opt = getopt(argc, argv, "d:ghn:o:O:p:s:uv")) != -1) {
|
||||
case 'n': nbre_capt = atoi(optarg); break;
|
||||
case 'O': dest_dir = optarg; break;
|
||||
case 'o': outfile = optarg; break;
|
||||
case 'p': period = 1e6*atof(optarg); break;
|
||||
case 'p': foo = parse_double(optarg, &period);
|
||||
if (foo<0) {
|
||||
fprintf(stderr,
|
||||
"error parsing -p arg '%s'\n",
|
||||
optarg);
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
case 's': parse_WxH(optarg, &width, &height);
|
||||
break;
|
||||
case 'u': upscaling = 1; break;
|
||||
|
||||
Reference in New Issue
Block a user