+ else if (strcasecmp ("StepSize", key) == 0)
+ {
+ int tmp = atoi (value);
+ if (tmp <= 0)
+ {
+ fprintf (stderr, "rrdtool: `StepSize' must "
+ "be greater than 0.\n");
+ return (1);
+ }
+ stepsize = tmp;
+ }
+ else if (strcasecmp ("HeartBeat", key) == 0)
+ {
+ int tmp = atoi (value);
+ if (tmp <= 0)
+ {
+ fprintf (stderr, "rrdtool: `HeartBeat' must "
+ "be greater than 0.\n");
+ return (1);
+ }
+ heartbeat = tmp;
+ }
+ else if (strcasecmp ("RRARows", key) == 0)
+ {
+ int tmp = atoi (value);
+ if (tmp <= 0)
+ {
+ fprintf (stderr, "rrdtool: `RRARows' must "
+ "be greater than 0.\n");
+ return (1);
+ }
+ rrarows = tmp;
+ }
+ else if (strcasecmp ("RRATimespan", key) == 0)
+ {
+ char *saveptr = NULL;
+ char *dummy;
+ char *ptr;
+ char *value_copy;
+ int *tmp_alloc;
+
+ value_copy = strdup (value);
+ if (value_copy == NULL)
+ return (1);
+
+ dummy = value_copy;
+ while ((ptr = strtok_r (dummy, ", \t", &saveptr)) != NULL)
+ {
+ dummy = NULL;
+
+ tmp_alloc = realloc (rra_timespans_custom,
+ sizeof (int) * (rra_timespans_custom_num + 1));
+ if (tmp_alloc == NULL)
+ {
+ fprintf (stderr, "rrdtool: realloc failed.\n");
+ free (value_copy);
+ return (1);
+ }
+ rra_timespans_custom = tmp_alloc;
+ rra_timespans_custom[rra_timespans_custom_num] = atoi (ptr);
+ if (rra_timespans_custom[rra_timespans_custom_num] != 0)
+ rra_timespans_custom_num++;
+ } /* while (strtok_r) */
+ free (value_copy);
+ }
+ else if (strcasecmp ("XFF", key) == 0)
+ {
+ double tmp = atof (value);
+ if ((tmp < 0.0) || (tmp >= 1.0))
+ {
+ fprintf (stderr, "rrdtool: `XFF' must "
+ "be in the range 0 to 1 (exclusive).");
+ return (1);
+ }
+ xff = tmp;
+ }