+ static const option long_options[] = {
+ { "alpha", required_argument, 0, 'a' },
+ { "delta", required_argument, 0, 'd' },
+ { "gamma", required_argument, 0, 'g' }
+ };
+
+ for ( ;; ) {
+ int option_index = 0;
+ int c = getopt_long(argc, argv, "a:d:g:", long_options, &option_index);
+
+ if (c == -1) {
+ break;
+ }
+ switch (c) {
+ case 'a':
+ vr_alpha = atof(optarg);
+ break;
+ case 'd':
+ vr_delta = atof(optarg);
+ break;
+ case 'g':
+ vr_gamma = atof(optarg);
+ break;
+ default:
+ fprintf(stderr, "Unknown option '%s'\n", argv[option_index]);
+ exit(1);
+ };
+ }
+