+ int iterate = 1;
+ char file_path[FILE_PATH_MAX] = DEFAULT_FILE;
+
+ while (1) {
+ int opt;
+ int opt_idx = 0;
+
+ static struct option long_options[] =
+ {
+ {"iterate" , required_argument, 0, 'i'},
+ {"file" , required_argument, 0, 'f'},
+ { 0, 0, 0, 0 }
+ };
+
+ if ((opt = getopt_long(argc, argv, "i:f:", long_options, &opt_idx)) == -1)
+ break;
+
+ switch (opt) {
+ case 'f':
+ strcpy(file_path, optarg);
+ break;
+ case 'i':
+ iterate = atoi(optarg);
+ break;
+ case 'h':
+ default:
+ help();
+ return 0;
+ }
+ }
+