summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b358054)
raw | patch | inline | side by side (parent: b358054)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 1 May 2005 10:23:11 +0000 (10:23 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 1 May 2005 10:23:11 +0000 (10:23 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@460 a5681a0c-68f1-0310-ab6d-d61299d08faa
index 217482ce4bf716ead7bb47ddcc045962509586f7..f7e5360fe536b8a9bbe4faa1a316d1b1f260285e 100644 (file)
argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char)); \
strcpy(argv[i+1],handle); \
} \
- optind=0; opterr=0; \
rrd_clear_error();\
RETVAL=name(items+1,argv); \
for (i=0; i < items; i++) {\
argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char)); \
strcpy(argv[i+1],handle); \
} \
- optind=0; opterr=0; \
rrd_clear_error(); \
data=name(items+1, argv); \
for (i=0; i < items; i++) { \
argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char));
strcpy(argv[i+1],handle);
}
- optind=0; opterr=0;
rrd_clear_error();
rrd_graph(items+1,argv,&calcpr,&xsize,&ysize,NULL,&ymin,&ymax);
for (i=0; i < items; i++) {
argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char));
strcpy(argv[i+1],handle);
}
- optind=0; opterr=0;
rrd_clear_error();
rrd_fetch(items+1,argv,&start,&end,&step,&ds_cnt,&ds_namv,&data);
for (i=0; i < items; i++) {
argv[i+1] = (char *) malloc((strlen(handle)+1)*sizeof(char));
strcpy(argv[i+1],handle);
}
- optind=0; opterr=0;
rrd_clear_error();
rrd_xport(items+1,argv,&xsize,&start,&end,&step,&col_cnt,&legend_v,&data);
for (i=0; i < items; i++) {
diff --git a/src/rrd_cgi.c b/src/rrd_cgi.c
index 51e4c1c96d57ff17455eeaab3d7084e97c11d92a..ee46d5e5bc86feb90068dd592ec9e7bd1d3c1101 100644 (file)
--- a/src/rrd_cgi.c
+++ b/src/rrd_cgi.c
#ifdef MUST_DISABLE_FPMASK
fpsetmask(0);
#endif
+ optind = 0; opterr = 0; /* initialize getopt */
+
/* what do we get for cmdline arguments?
for (i=0;i<argc;i++)
printf("%d-'%s'\n",i,argv[i]); */
args[argc++] = "--imginfo";
args[argc++] = "<IMG SRC=\"./%s\" WIDTH=\"%lu\" HEIGHT=\"%lu\">";
}
- optind=0; /* reset gnu getopt */
- opterr=0; /* reset gnu getopt */
calfree();
if( rrd_graph(argc+1, args-1, &calcpr, &xsize, &ysize,NULL,&ymin,&ymax) != -1 ) {
return stralloc(calcpr[0]);
diff --git a/src/rrd_create.c b/src/rrd_create.c
index bb32a3ec062f99b7ec4a0be6674e0afb0cd7c4d8..95dbc143ed035c4ea7e053628e49bdd8998bd4e2 100644 (file)
--- a/src/rrd_create.c
+++ b/src/rrd_create.c
char *parsetime_error = NULL;
long long_tmp;
int rc;
+ optind = 0; opterr = 0; /* initialize getopt */
while (1){
static struct option long_options[] =
diff --git a/src/rrd_fetch.c b/src/rrd_fetch.c
index c5a73a336f6232ff8b89d2961d6502758bc7b030..74ab730499eaa481082af9f0dca89225926a290e 100644 (file)
--- a/src/rrd_fetch.c
+++ b/src/rrd_fetch.c
struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
+ optind = 0; opterr = 0; /* initialize getopt */
/* init start and end time */
parsetime("end-24h", &start_tv);
diff --git a/src/rrd_first.c b/src/rrd_first.c
index ab3bd497b9b4c0aaeab5b400be81cd8f48074045..eee8140887fc082c2710b72151eaf30fdad943c3 100644 (file)
--- a/src/rrd_first.c
+++ b/src/rrd_first.c
{
int target_rraindex=0;
char *endptr;
+ optind = 0; opterr = 0; /* initialize getopt */
while (1){
static struct option long_options[] =
};
int option_index = 0;
int opt;
+ optind = 0; opterr = 0; /* initialize getopt */
opt = getopt_long(argc, argv, "", long_options, &option_index);
if(opt == EOF)
diff --git a/src/rrd_graph.c b/src/rrd_graph.c
index dc21548dba90325bd58a9b62f7c9f52c23b66928..5efe82753acd4ac28e973b182e95e827b411b4b4 100644 (file)
--- a/src/rrd_graph.c
+++ b/src/rrd_graph.c
rrd_graph(int argc, char **argv, char ***prdata, int *xsize, int *ysize, FILE *stream, double *ymin, double *ymax)
{
image_desc_t im;
-
rrd_graph_init(&im);
im.graphhandle = stream;
long long_tmp;
struct rrd_time_value start_tv, end_tv;
gfx_color_t color;
+ optind = 0; opterr = 0; /* initialize getopt */
parsetime("end-24h", &start_tv);
parsetime("now", &end_tv);
diff --git a/src/rrd_restore.c b/src/rrd_restore.c
index a3d09adb16111d035fbda42ed743b2b2a52e930c..4ca223abd2b9460627b94eed0bfe6ec05cfeb8c8 100644 (file)
--- a/src/rrd_restore.c
+++ b/src/rrd_restore.c
char force_overwrite = 0;
/* init rrd clean */
+ optind = 0; opterr = 0; /* initialize getopt */
rrd_init(&rrd);
if (argc<3) {
rrd_set_error("usage rrdtool %s [--range-check/-r] [--force-overwrite/-f] file.xml file.rrd",argv[0]);
diff --git a/src/rrd_tool.c b/src/rrd_tool.c
index cc178fb61a750a46159283027e3d805ccf856a88..46a9e9c671bc2ec71e84ab798934a6b8fa3a4e5b 100644 (file)
--- a/src/rrd_tool.c
+++ b/src/rrd_tool.c
#if defined(HAVE_SYS_STAT_H)
struct stat st;
#endif
- optind=0; /* reset gnu getopt */
- opterr=0; /* no error messages */
if (RemoteMode){
if (argc>1 && strcmp("quit", argv[1]) == 0){
diff --git a/src/rrd_tune.c b/src/rrd_tune.c
index 94d9293081e31f15ed336639030c5ba92e8f6e22..7e2ac91eeb25deb479c6b6ae91a5a5f0f1ad2314 100644 (file)
--- a/src/rrd_tune.c
+++ b/src/rrd_tune.c
double min;
double max;
char dst[DST_SIZE];
+ optind = 0; opterr = 0; /* initialize getopt */
if(rrd_open(argv[1],&rrd_file,&rrd, RRD_READWRITE)==-1){
diff --git a/src/rrd_update.c b/src/rrd_update.c
index a67a93a12816f9449a7675cf6b6505b7721fdee3..11d92bb58af9acc732d2b2ec63357b65a2f3a837 100644 (file)
--- a/src/rrd_update.c
+++ b/src/rrd_update.c
char *template = NULL;
info_t *result = NULL;
infoval rc;
+ optind = 0; opterr = 0; /* initialize getopt */
while (1) {
static struct option long_options[] =
{
char *template = NULL;
int rc;
+ optind = 0; opterr = 0; /* initialize getopt */
while (1) {
static struct option long_options[] =
diff --git a/src/rrd_xport.c b/src/rrd_xport.c
index 2a0bf7605d5b294617f3718ba4f9f877ab1c4128..19c2067a23dc2d654672b6953c2e336e3268551d 100644 (file)
--- a/src/rrd_xport.c
+++ b/src/rrd_xport.c
time_t start_tmp=0,end_tmp=0;
struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
+ optind = 0; opterr = 0; /* initialize getopt */
rrd_graph_init(&im);