while ((c = getopt(argc, argv, ":evODQko:m:s:r:p:c:C:l:b:g:t:a:h:z:d:?")) != -1) {
switch (c) {
case 'm':
- if ((sscanf(optarg,"%lf",&s) > 0) && (s != 0)){
+ if (sscanf(optarg, "%lf", &s) > 0 && s != 0) {
pm->bbox_margin[0] = pm->bbox_margin[1] = s;
} else {
usage(cmd, 1);
pm->clusterMethod = CLUSTERING_MQ;
break;
case 's':
- if ((sscanf(optarg,"%lf",&s) > 0)){
+ if (sscanf(optarg, "%lf", &s) > 0) {
pm->shore_depth_tol = s;
} else {
usage(cmd,1);
}
break;
case 'h':
- if ((sscanf(optarg,"%d",&v) > 0)){
+ if (sscanf(optarg, "%d", &v) > 0) {
pm->nedgep = MAX(0, v);
- } else if (!strncmp(optarg, HLPFX, N_HLPFX) && (sscanf(optarg+N_HLPFX,"%d",&v) > 0)) {
+ } else if (!strncmp(optarg, HLPFX, N_HLPFX) &&
+ sscanf(optarg + N_HLPFX, "%d", &v) > 0) {
pm->highlight_cluster = MAX(0, v);
} else {
usage(cmd,1);
}
break;
case 'r':
- if ((sscanf(optarg,"%d",&r) > 0)){
+ if (sscanf(optarg, "%d", &r) > 0) {
pm->nrandom = r;
}
break;
case 't':
- if ((sscanf(optarg,"%d",&r) > 0) && r > 0){
+ if (sscanf(optarg, "%d", &r) > 0 && r > 0) {
pm->improve_contiguity_n = r;
}
break;
case 'p':
pm->show_points = 1;
- if ((sscanf(optarg,"%d",&r) > 0)){
+ if (sscanf(optarg, "%d", &r) > 0) {
pm->show_points = MIN(3, r);
}
break;
pm->color_optimize = false;
break;
case 'a':
- if ((sscanf(optarg,"%d",&r) > 0)){
+ if (sscanf(optarg, "%d", &r) > 0) {
pm->nart = r;
} else {
usage(cmd,1);
case 'c':
if (sscanf(optarg,"_opacity=%2s", stmp) > 0 && strlen(stmp) == 2){
pm->opacity = stmp;
- } else if ((sscanf(optarg,"%d",&r) > 0) && r >= COLOR_SCHEME_NONE && r <= COLOR_SCHEME_GREY){
+ } else if (sscanf(optarg, "%d", &r) > 0 && r >= COLOR_SCHEME_NONE &&
+ r <= COLOR_SCHEME_GREY) {
pm->color_scheme = r;
} else if (knownColorScheme(optarg)) {
pm->color_scheme = COLOR_SCHEME_NONE;
pm->seed = v;
break;
case 'C':
- if (!((sscanf(optarg,"%d",&v) > 0) && v >= 0)){
+ if (!(sscanf(optarg, "%d", &v) > 0 && v >= 0)) {
usage(cmd,1);
}
else