diff options
author | Xfennec <xfennec@cqfd-corp.org> | 2016-01-22 17:03:21 +0100 |
---|---|---|
committer | Xfennec <xfennec@cqfd-corp.org> | 2016-01-22 17:03:21 +0100 |
commit | 5d8db0f6dbd501cbb6f023b72e7600579eda3885 (patch) | |
tree | 870d4f8418f4df3d949ca338a1661252491cfea1 | |
parent | ba3bec9e64e62e6f8ac735842a3a0bf79f7c6bce (diff) |
Reseting optind before parsing PROGRESS_ARGS (related to issue #69 and probably #68)v0.11
-rw-r--r-- | progress.c | 7 | ||||
-rw-r--r-- | progress.h | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -480,6 +480,13 @@ int c,i; int option_index = 0; char *rp; +printf("argc=%d\n", argc); +for (i = 0 ; i < argc ; i++) + printf("[%s] ", argv[i]); +printf("\n\n"); + +optind = 1; // reset getopt + while(1) { c = getopt_long (argc, argv, options_string, long_options, &option_index); @@ -25,7 +25,7 @@ #include "hlist.h" -#define PROGRESS_VERSION "0.10" +#define PROGRESS_VERSION "0.11" #define PROC_PATH "/proc" #define MAX_PIDS 32 |