| 1 |
|
/* |
| 2 |
< |
File autogenerated by gengetopt version 2.15 |
| 2 |
> |
File autogenerated by gengetopt version 2.19.1 |
| 3 |
|
generated with the following command: |
| 4 |
< |
gengetopt -i StaticProps.ggo -F StaticPropsCmd |
| 4 |
> |
gengetopt --file-name=StaticPropsCmd -u |
| 5 |
|
|
| 6 |
|
The developers of gengetopt consider the fixed text that goes in all |
| 7 |
|
gengetopt output files to be in the public domain: |
| 21 |
|
|
| 22 |
|
#include "StaticPropsCmd.h" |
| 23 |
|
|
| 24 |
+ |
const char *gengetopt_args_info_purpose = ""; |
| 25 |
+ |
|
| 26 |
+ |
const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]... [FILES]..."; |
| 27 |
+ |
|
| 28 |
+ |
const char *gengetopt_args_info_description = ""; |
| 29 |
+ |
|
| 30 |
+ |
const char *gengetopt_args_info_help[] = { |
| 31 |
+ |
" -h, --help Print help and exit", |
| 32 |
+ |
" -V, --version Print version and exit", |
| 33 |
+ |
" -i, --input=filename input dump file", |
| 34 |
+ |
" -o, --output=filename output file name", |
| 35 |
+ |
" -n, --step=INT process every n frame (default=`1')", |
| 36 |
+ |
" -b, --nbins=INT number of bins (general purpose) \n (default=`100')", |
| 37 |
+ |
" -x, --nbins_x=INT number of bins in x axis (default=`100')", |
| 38 |
+ |
" -y, --nbins_y=INT number of bins in y axis (default=`100')", |
| 39 |
+ |
" -a, --nanglebins=INT number of bins for cos(angle) (default=`50')", |
| 40 |
+ |
" --length=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)", |
| 41 |
+ |
" -c, --rcut=DOUBLE cutoff radius (rcut)", |
| 42 |
+ |
" -z, --zoffset=DOUBLE Where to set the zero for the slab_density \n calculation (default=`0')", |
| 43 |
+ |
" --sele1=selection script select the first stuntdouble set", |
| 44 |
+ |
" --sele2=selection script select the second stuntdouble set", |
| 45 |
+ |
" --sele3=selection script select the third stuntdouble set", |
| 46 |
+ |
" --refsele=selection script\n select reference (use and only use with --gxyz)", |
| 47 |
+ |
" --molname=STRING molecule name", |
| 48 |
+ |
" --begin=INT begin internal index", |
| 49 |
+ |
" --end=INT end internal index", |
| 50 |
+ |
" --radius=DOUBLE nanoparticle radius", |
| 51 |
+ |
"\n Group: staticProps\n an option of this group is required", |
| 52 |
+ |
" --bo bond order parameter (--rcut must be specified)", |
| 53 |
+ |
" --bor bond order parameter as a function of radius \n (--rcut must be specified)", |
| 54 |
+ |
" --bad N(theta) bond angle density within (--rcut must \n be specified)", |
| 55 |
+ |
" -g, --gofr g(r)", |
| 56 |
+ |
" --gofz g(z)", |
| 57 |
+ |
" --r_theta g(r, cos(theta))", |
| 58 |
+ |
" --r_omega g(r, cos(omega))", |
| 59 |
+ |
" --theta_omega g(cos(theta), cos(omega))", |
| 60 |
+ |
" --gxyz g(x, y, z)", |
| 61 |
+ |
" -p, --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)", |
| 62 |
+ |
" --rp2 rp2 order parameter (--sele1 and --sele2 must \n be specified)", |
| 63 |
+ |
" -s, --scd scd order parameter (either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)", |
| 64 |
+ |
" -d, --density density plot", |
| 65 |
+ |
" --slab_density slab density", |
| 66 |
+ |
" --hxy hxy", |
| 67 |
+ |
" --rho_r rho of R", |
| 68 |
+ |
" --hullvol hull volume of nanoparticle", |
| 69 |
+ |
0 |
| 70 |
+ |
}; |
| 71 |
+ |
|
| 72 |
|
static |
| 73 |
|
void clear_given (struct gengetopt_args_info *args_info); |
| 74 |
|
static |
| 107 |
|
args_info->end_given = 0 ; |
| 108 |
|
args_info->radius_given = 0 ; |
| 109 |
|
args_info->bo_given = 0 ; |
| 110 |
+ |
args_info->bor_given = 0 ; |
| 111 |
+ |
args_info->bad_given = 0 ; |
| 112 |
|
args_info->gofr_given = 0 ; |
| 113 |
+ |
args_info->gofz_given = 0 ; |
| 114 |
|
args_info->r_theta_given = 0 ; |
| 115 |
|
args_info->r_omega_given = 0 ; |
| 116 |
|
args_info->theta_omega_given = 0 ; |
| 122 |
|
args_info->slab_density_given = 0 ; |
| 123 |
|
args_info->hxy_given = 0 ; |
| 124 |
|
args_info->rho_r_given = 0 ; |
| 125 |
+ |
args_info->hullvol_given = 0 ; |
| 126 |
|
args_info->staticProps_group_counter = 0 ; |
| 127 |
|
} |
| 128 |
|
|
| 163 |
|
|
| 164 |
|
} |
| 165 |
|
|
| 166 |
+ |
static |
| 167 |
+ |
void init_args_info(struct gengetopt_args_info *args_info) |
| 168 |
+ |
{ |
| 169 |
+ |
args_info->help_help = gengetopt_args_info_help[0] ; |
| 170 |
+ |
args_info->version_help = gengetopt_args_info_help[1] ; |
| 171 |
+ |
args_info->input_help = gengetopt_args_info_help[2] ; |
| 172 |
+ |
args_info->output_help = gengetopt_args_info_help[3] ; |
| 173 |
+ |
args_info->step_help = gengetopt_args_info_help[4] ; |
| 174 |
+ |
args_info->nbins_help = gengetopt_args_info_help[5] ; |
| 175 |
+ |
args_info->nbins_x_help = gengetopt_args_info_help[6] ; |
| 176 |
+ |
args_info->nbins_y_help = gengetopt_args_info_help[7] ; |
| 177 |
+ |
args_info->nanglebins_help = gengetopt_args_info_help[8] ; |
| 178 |
+ |
args_info->length_help = gengetopt_args_info_help[9] ; |
| 179 |
+ |
args_info->rcut_help = gengetopt_args_info_help[10] ; |
| 180 |
+ |
args_info->zoffset_help = gengetopt_args_info_help[11] ; |
| 181 |
+ |
args_info->sele1_help = gengetopt_args_info_help[12] ; |
| 182 |
+ |
args_info->sele2_help = gengetopt_args_info_help[13] ; |
| 183 |
+ |
args_info->sele3_help = gengetopt_args_info_help[14] ; |
| 184 |
+ |
args_info->refsele_help = gengetopt_args_info_help[15] ; |
| 185 |
+ |
args_info->molname_help = gengetopt_args_info_help[16] ; |
| 186 |
+ |
args_info->begin_help = gengetopt_args_info_help[17] ; |
| 187 |
+ |
args_info->end_help = gengetopt_args_info_help[18] ; |
| 188 |
+ |
args_info->radius_help = gengetopt_args_info_help[19] ; |
| 189 |
+ |
args_info->bo_help = gengetopt_args_info_help[20] ; |
| 190 |
+ |
args_info->bor_help = gengetopt_args_info_help[21] ; |
| 191 |
+ |
args_info->bad_help = gengetopt_args_info_help[22] ; |
| 192 |
+ |
args_info->gofr_help = gengetopt_args_info_help[23] ; |
| 193 |
+ |
args_info->gofz_help = gengetopt_args_info_help[24] ; |
| 194 |
+ |
args_info->r_theta_help = gengetopt_args_info_help[25] ; |
| 195 |
+ |
args_info->r_omega_help = gengetopt_args_info_help[26] ; |
| 196 |
+ |
args_info->theta_omega_help = gengetopt_args_info_help[27] ; |
| 197 |
+ |
args_info->gxyz_help = gengetopt_args_info_help[28] ; |
| 198 |
+ |
args_info->p2_help = gengetopt_args_info_help[29] ; |
| 199 |
+ |
args_info->rp2_help = gengetopt_args_info_help[30] ; |
| 200 |
+ |
args_info->scd_help = gengetopt_args_info_help[31] ; |
| 201 |
+ |
args_info->density_help = gengetopt_args_info_help[32] ; |
| 202 |
+ |
args_info->slab_density_help = gengetopt_args_info_help[33] ; |
| 203 |
+ |
args_info->hxy_help = gengetopt_args_info_help[34] ; |
| 204 |
+ |
args_info->rho_r_help = gengetopt_args_info_help[35] ; |
| 205 |
+ |
args_info->hullvol_help = gengetopt_args_info_help[36] ; |
| 206 |
+ |
|
| 207 |
+ |
} |
| 208 |
+ |
|
| 209 |
|
void |
| 210 |
|
cmdline_parser_print_version (void) |
| 211 |
|
{ |
| 215 |
|
void |
| 216 |
|
cmdline_parser_print_help (void) |
| 217 |
|
{ |
| 218 |
+ |
int i = 0; |
| 219 |
|
cmdline_parser_print_version (); |
| 220 |
< |
printf("\nUsage: StaticProps [OPTIONS]...\n\n"); |
| 221 |
< |
printf("%s\n"," -h, --help Print help and exit"); |
| 222 |
< |
printf("%s\n"," -V, --version Print version and exit"); |
| 223 |
< |
printf("%s\n"," -i, --input=filename input dump file"); |
| 224 |
< |
printf("%s\n"," -o, --output=filename output file name"); |
| 225 |
< |
printf("%s\n"," -n, --step=INT process every n frame (default=`1')"); |
| 226 |
< |
printf("%s\n"," -b, --nbins=INT number of bins (general purpose) \n (default=`100')"); |
| 227 |
< |
printf("%s\n"," -x, --nbins_x=INT number of bins in x axis (default=`100')"); |
| 228 |
< |
printf("%s\n"," -y, --nbins_y=INT number of bins in y axis (default=`100')"); |
| 229 |
< |
printf("%s\n"," -a, --nanglebins=INT number of bins for cos(angle) (default=`50')"); |
| 230 |
< |
printf("%s\n"," --length=DOUBLE maximum length (Defaults to 1/2 smallest length \n of first frame)"); |
| 135 |
< |
printf("%s\n"," -c, --rcut=DOUBLE cutoff radius (rcut)"); |
| 136 |
< |
printf("%s\n"," -z, --zoffset=DOUBLE Where to set the zero for the slab_density \n calculation (default=`0')"); |
| 137 |
< |
printf("%s\n"," --sele1=selection script select the first stuntdouble set"); |
| 138 |
< |
printf("%s\n"," --sele2=selection script select the second stuntdouble set"); |
| 139 |
< |
printf("%s\n"," --sele3=selection script select the third stuntdouble set"); |
| 140 |
< |
printf("%s\n"," --refsele=selection script\n select reference (use and only use with --gxyz)"); |
| 141 |
< |
printf("%s\n"," --molname=STRING molecule name"); |
| 142 |
< |
printf("%s\n"," --begin=INT begin internal index"); |
| 143 |
< |
printf("%s\n"," --end=INT end internal index"); |
| 144 |
< |
printf("%s\n"," --radius=DOUBLE nanoparticle radius"); |
| 145 |
< |
printf("%s\n","\n Group: staticProps\n an option of this group is required"); |
| 146 |
< |
printf("%s\n"," --bo bond order parameter (--rcut must be specified"); |
| 147 |
< |
printf("%s\n"," -g, --gofr g(r)"); |
| 148 |
< |
printf("%s\n"," --r_theta g(r, cos(theta))"); |
| 149 |
< |
printf("%s\n"," --r_omega g(r, cos(omega))"); |
| 150 |
< |
printf("%s\n"," --theta_omega g(cos(theta), cos(omega))"); |
| 151 |
< |
printf("%s\n"," --gxyz g(x, y, z)"); |
| 152 |
< |
printf("%s\n"," -p, --p2 p2 order parameter (--sele1 and --sele2 must be \n specified)"); |
| 153 |
< |
printf("%s\n"," --rp2 rp2 order parameter (--sele1 and --sele2 must \n be specified)"); |
| 154 |
< |
printf("%s\n"," -s, --scd scd order parameter (either --sele1, --sele2, \n --sele3 are specified or --molname, --begin, \n --end are specified)"); |
| 155 |
< |
printf("%s\n"," -d, --density density plot"); |
| 156 |
< |
printf("%s\n"," --slab_density slab density"); |
| 157 |
< |
printf("%s\n"," --hxy hxy"); |
| 158 |
< |
printf("%s\n"," --rho_r rho of R"); |
| 159 |
< |
|
| 220 |
> |
|
| 221 |
> |
if (strlen(gengetopt_args_info_purpose) > 0) |
| 222 |
> |
printf("\n%s\n", gengetopt_args_info_purpose); |
| 223 |
> |
|
| 224 |
> |
printf("\n%s\n\n", gengetopt_args_info_usage); |
| 225 |
> |
|
| 226 |
> |
if (strlen(gengetopt_args_info_description) > 0) |
| 227 |
> |
printf("%s\n", gengetopt_args_info_description); |
| 228 |
> |
|
| 229 |
> |
while (gengetopt_args_info_help[i]) |
| 230 |
> |
printf("%s\n", gengetopt_args_info_help[i++]); |
| 231 |
|
} |
| 232 |
|
|
| 233 |
|
void |
| 235 |
|
{ |
| 236 |
|
clear_given (args_info); |
| 237 |
|
clear_args (args_info); |
| 238 |
+ |
init_args_info (args_info); |
| 239 |
+ |
|
| 240 |
+ |
args_info->inputs = NULL; |
| 241 |
+ |
args_info->inputs_num = 0; |
| 242 |
|
} |
| 243 |
|
|
| 244 |
|
static void |
| 245 |
|
cmdline_parser_release (struct gengetopt_args_info *args_info) |
| 246 |
|
{ |
| 247 |
|
|
| 248 |
+ |
unsigned int i; |
| 249 |
|
if (args_info->input_arg) |
| 250 |
|
{ |
| 251 |
|
free (args_info->input_arg); /* free previous argument */ |
| 372 |
|
args_info->radius_orig = 0; |
| 373 |
|
} |
| 374 |
|
|
| 375 |
+ |
for (i = 0; i < args_info->inputs_num; ++i) |
| 376 |
+ |
free (args_info->inputs [i]); |
| 377 |
+ |
|
| 378 |
+ |
if (args_info->inputs_num) |
| 379 |
+ |
free (args_info->inputs); |
| 380 |
+ |
|
| 381 |
|
clear_given (args_info); |
| 382 |
|
} |
| 383 |
|
|
| 530 |
|
if (args_info->bo_given) { |
| 531 |
|
fprintf(outfile, "%s\n", "bo"); |
| 532 |
|
} |
| 533 |
+ |
if (args_info->bor_given) { |
| 534 |
+ |
fprintf(outfile, "%s\n", "bor"); |
| 535 |
+ |
} |
| 536 |
+ |
if (args_info->bad_given) { |
| 537 |
+ |
fprintf(outfile, "%s\n", "bad"); |
| 538 |
+ |
} |
| 539 |
|
if (args_info->gofr_given) { |
| 540 |
|
fprintf(outfile, "%s\n", "gofr"); |
| 541 |
|
} |
| 542 |
+ |
if (args_info->gofz_given) { |
| 543 |
+ |
fprintf(outfile, "%s\n", "gofz"); |
| 544 |
+ |
} |
| 545 |
|
if (args_info->r_theta_given) { |
| 546 |
|
fprintf(outfile, "%s\n", "r_theta"); |
| 547 |
|
} |
| 575 |
|
if (args_info->rho_r_given) { |
| 576 |
|
fprintf(outfile, "%s\n", "rho_r"); |
| 577 |
|
} |
| 578 |
+ |
if (args_info->hullvol_given) { |
| 579 |
+ |
fprintf(outfile, "%s\n", "hullvol"); |
| 580 |
+ |
} |
| 581 |
|
|
| 582 |
|
fclose (outfile); |
| 583 |
|
|
| 618 |
|
return; |
| 619 |
|
|
| 620 |
|
args_info->bo_given = 0 ; |
| 621 |
+ |
args_info->bor_given = 0 ; |
| 622 |
+ |
args_info->bad_given = 0 ; |
| 623 |
|
args_info->gofr_given = 0 ; |
| 624 |
+ |
args_info->gofz_given = 0 ; |
| 625 |
|
args_info->r_theta_given = 0 ; |
| 626 |
|
args_info->r_omega_given = 0 ; |
| 627 |
|
args_info->theta_omega_given = 0 ; |
| 633 |
|
args_info->slab_density_given = 0 ; |
| 634 |
|
args_info->hxy_given = 0 ; |
| 635 |
|
args_info->rho_r_given = 0 ; |
| 636 |
+ |
args_info->hullvol_given = 0 ; |
| 637 |
|
|
| 638 |
|
args_info->staticProps_group_counter = 0; |
| 639 |
|
} |
| 682 |
|
{ |
| 683 |
|
int error = 0; |
| 684 |
|
|
| 685 |
+ |
/* checks for required options */ |
| 686 |
|
if (! args_info->input_given) |
| 687 |
|
{ |
| 688 |
|
fprintf (stderr, "%s: '--input' ('-i') option required%s\n", prog_name, (additional_error ? additional_error : "")); |
| 689 |
|
error = 1; |
| 690 |
|
} |
| 691 |
+ |
|
| 692 |
|
if (args_info->staticProps_group_counter == 0) |
| 693 |
|
{ |
| 694 |
|
fprintf (stderr, "%s: %d options of group staticProps were given. One is required.%s\n", prog_name, args_info->staticProps_group_counter, (additional_error ? additional_error : "")); |
| 696 |
|
} |
| 697 |
|
|
| 698 |
|
|
| 699 |
+ |
/* checks for dependences among options */ |
| 700 |
+ |
|
| 701 |
|
return error; |
| 702 |
|
} |
| 703 |
|
|
| 715 |
|
cmdline_parser_init (&local_args_info); |
| 716 |
|
|
| 717 |
|
optarg = 0; |
| 718 |
< |
optind = 1; |
| 718 |
> |
optind = 0; |
| 719 |
|
opterr = 1; |
| 720 |
|
optopt = '?'; |
| 721 |
|
|
| 746 |
|
{ "end", 1, NULL, 0 }, |
| 747 |
|
{ "radius", 1, NULL, 0 }, |
| 748 |
|
{ "bo", 0, NULL, 0 }, |
| 749 |
+ |
{ "bor", 0, NULL, 0 }, |
| 750 |
+ |
{ "bad", 0, NULL, 0 }, |
| 751 |
|
{ "gofr", 0, NULL, 'g' }, |
| 752 |
+ |
{ "gofz", 0, NULL, 0 }, |
| 753 |
|
{ "r_theta", 0, NULL, 0 }, |
| 754 |
|
{ "r_omega", 0, NULL, 0 }, |
| 755 |
|
{ "theta_omega", 0, NULL, 0 }, |
| 761 |
|
{ "slab_density", 0, NULL, 0 }, |
| 762 |
|
{ "hxy", 0, NULL, 0 }, |
| 763 |
|
{ "rho_r", 0, NULL, 0 }, |
| 764 |
+ |
{ "hullvol", 0, NULL, 0 }, |
| 765 |
|
{ NULL, 0, NULL, 0 } |
| 766 |
|
}; |
| 767 |
|
|
| 1199 |
|
free (args_info->radius_orig); /* free previous string */ |
| 1200 |
|
args_info->radius_orig = gengetopt_strdup (optarg); |
| 1201 |
|
} |
| 1202 |
< |
/* bond order parameter (--rcut must be specified. */ |
| 1202 |
> |
/* bond order parameter (--rcut must be specified). */ |
| 1203 |
|
else if (strcmp (long_options[option_index].name, "bo") == 0) |
| 1204 |
|
{ |
| 1205 |
|
if (local_args_info.bo_given) |
| 1211 |
|
continue; |
| 1212 |
|
local_args_info.bo_given = 1; |
| 1213 |
|
args_info->bo_given = 1; |
| 1214 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1215 |
+ |
reset_group_staticProps (args_info); |
| 1216 |
+ |
args_info->staticProps_group_counter += 1; |
| 1217 |
+ |
break; |
| 1218 |
+ |
} |
| 1219 |
+ |
/* bond order parameter as a function of radius (--rcut must be specified). */ |
| 1220 |
+ |
else if (strcmp (long_options[option_index].name, "bor") == 0) |
| 1221 |
+ |
{ |
| 1222 |
+ |
if (local_args_info.bor_given) |
| 1223 |
+ |
{ |
| 1224 |
+ |
fprintf (stderr, "%s: `--bor' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1225 |
+ |
goto failure; |
| 1226 |
+ |
} |
| 1227 |
+ |
if (args_info->bor_given && ! override) |
| 1228 |
+ |
continue; |
| 1229 |
+ |
local_args_info.bor_given = 1; |
| 1230 |
+ |
args_info->bor_given = 1; |
| 1231 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1232 |
+ |
reset_group_staticProps (args_info); |
| 1233 |
+ |
args_info->staticProps_group_counter += 1; |
| 1234 |
+ |
break; |
| 1235 |
+ |
} |
| 1236 |
+ |
/* N(theta) bond angle density within (--rcut must be specified). */ |
| 1237 |
+ |
else if (strcmp (long_options[option_index].name, "bad") == 0) |
| 1238 |
+ |
{ |
| 1239 |
+ |
if (local_args_info.bad_given) |
| 1240 |
+ |
{ |
| 1241 |
+ |
fprintf (stderr, "%s: `--bad' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1242 |
+ |
goto failure; |
| 1243 |
+ |
} |
| 1244 |
+ |
if (args_info->bad_given && ! override) |
| 1245 |
+ |
continue; |
| 1246 |
+ |
local_args_info.bad_given = 1; |
| 1247 |
+ |
args_info->bad_given = 1; |
| 1248 |
|
if (args_info->staticProps_group_counter && override) |
| 1249 |
|
reset_group_staticProps (args_info); |
| 1250 |
|
args_info->staticProps_group_counter += 1; |
| 1251 |
|
break; |
| 1252 |
|
} |
| 1253 |
+ |
/* g(z). */ |
| 1254 |
+ |
else if (strcmp (long_options[option_index].name, "gofz") == 0) |
| 1255 |
+ |
{ |
| 1256 |
+ |
if (local_args_info.gofz_given) |
| 1257 |
+ |
{ |
| 1258 |
+ |
fprintf (stderr, "%s: `--gofz' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1259 |
+ |
goto failure; |
| 1260 |
+ |
} |
| 1261 |
+ |
if (args_info->gofz_given && ! override) |
| 1262 |
+ |
continue; |
| 1263 |
+ |
local_args_info.gofz_given = 1; |
| 1264 |
+ |
args_info->gofz_given = 1; |
| 1265 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1266 |
+ |
reset_group_staticProps (args_info); |
| 1267 |
+ |
args_info->staticProps_group_counter += 1; |
| 1268 |
+ |
break; |
| 1269 |
+ |
} |
| 1270 |
|
/* g(r, cos(theta)). */ |
| 1271 |
|
else if (strcmp (long_options[option_index].name, "r_theta") == 0) |
| 1272 |
|
{ |
| 1403 |
|
args_info->staticProps_group_counter += 1; |
| 1404 |
|
break; |
| 1405 |
|
} |
| 1406 |
+ |
/* hull volume of nanoparticle. */ |
| 1407 |
+ |
else if (strcmp (long_options[option_index].name, "hullvol") == 0) |
| 1408 |
+ |
{ |
| 1409 |
+ |
if (local_args_info.hullvol_given) |
| 1410 |
+ |
{ |
| 1411 |
+ |
fprintf (stderr, "%s: `--hullvol' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
| 1412 |
+ |
goto failure; |
| 1413 |
+ |
} |
| 1414 |
+ |
if (args_info->hullvol_given && ! override) |
| 1415 |
+ |
continue; |
| 1416 |
+ |
local_args_info.hullvol_given = 1; |
| 1417 |
+ |
args_info->hullvol_given = 1; |
| 1418 |
+ |
if (args_info->staticProps_group_counter && override) |
| 1419 |
+ |
reset_group_staticProps (args_info); |
| 1420 |
+ |
args_info->staticProps_group_counter += 1; |
| 1421 |
+ |
break; |
| 1422 |
+ |
} |
| 1423 |
|
|
| 1424 |
|
break; |
| 1425 |
|
case '?': /* Invalid option. */ |
| 1450 |
|
if ( error ) |
| 1451 |
|
return (EXIT_FAILURE); |
| 1452 |
|
|
| 1453 |
+ |
if (optind < argc) |
| 1454 |
+ |
{ |
| 1455 |
+ |
int i = 0 ; |
| 1456 |
+ |
int found_prog_name = 0; |
| 1457 |
+ |
/* whether program name, i.e., argv[0], is in the remaining args |
| 1458 |
+ |
(this may happen with some implementations of getopt, |
| 1459 |
+ |
but surely not with the one included by gengetopt) */ |
| 1460 |
+ |
|
| 1461 |
+ |
i = optind; |
| 1462 |
+ |
while (i < argc) |
| 1463 |
+ |
if (argv[i++] == argv[0]) { |
| 1464 |
+ |
found_prog_name = 1; |
| 1465 |
+ |
break; |
| 1466 |
+ |
} |
| 1467 |
+ |
i = 0; |
| 1468 |
+ |
|
| 1469 |
+ |
args_info->inputs_num = argc - optind - found_prog_name; |
| 1470 |
+ |
args_info->inputs = |
| 1471 |
+ |
(char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ; |
| 1472 |
+ |
while (optind < argc) |
| 1473 |
+ |
if (argv[optind++] != argv[0]) |
| 1474 |
+ |
args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ; |
| 1475 |
+ |
} |
| 1476 |
+ |
|
| 1477 |
|
return 0; |
| 1478 |
|
|
| 1479 |
|
failure: |