summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 86b4a5b)
raw | patch | inline | side by side (parent: 86b4a5b)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 18 Jun 2007 18:25:35 +0000 (18:25 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 18 Jun 2007 18:25:35 +0000 (18:25 +0000) |
program/src/rrd_cgi.c | patch | blob | history | |
program/src/rrd_graph.c | patch | blob | history | |
program/src/rrd_tune.c | patch | blob | history | |
program/src/rrd_xport.c | patch | blob | history |
diff --git a/program/src/rrd_cgi.c b/program/src/rrd_cgi.c
index 846397f6089465c01dede1510f3735fb4c6ba2eb..0bb326f3c12a5587146ead6cc13192a92498a835 100644 (file)
--- a/program/src/rrd_cgi.c
+++ b/program/src/rrd_cgi.c
static size_t varheap_size = 0;
/* allocate and initialize variable heap */
-static int initvar(void)
+static int initvar(
+ void)
{
varheap = (vardata *) malloc(sizeof(vardata) * INIT_VARSTORE_SIZE);
if (varheap == NULL) {
}
/* cleanup: free allocated memory */
-static void donevar(void)
+static void donevar(
+ void)
{
int i;
index 7fbe8651146c94b54e48ed47e33c7c44002969f9..f7ea57286a4112250d9cf0e92f471e2cbd73614d 100644 (file)
--- a/program/src/rrd_graph.c
+++ b/program/src/rrd_graph.c
long long_tmp;
struct rrd_time_value start_tv, end_tv;
long unsigned int color;
+
/* defines for long options without a short equivalent. should be bytes,
and may not collide with (the ASCII value of) short options */
#define LONGOPT_UNITS_SI 255
- struct option long_options[] = {
- {"start", required_argument, 0, 's'},
- {"end", required_argument, 0, 'e'},
- {"x-grid", required_argument, 0, 'x'},
- {"y-grid", required_argument, 0, 'y'},
- {"vertical-label", required_argument, 0, 'v'},
- {"width", required_argument, 0, 'w'},
- {"height", required_argument, 0, 'h'},
- {"full-size-mode", no_argument, 0, 'D'},
- {"interlaced", no_argument, 0, 'i'},
- {"upper-limit", required_argument, 0, 'u'},
- {"lower-limit", required_argument, 0, 'l'},
- {"rigid", no_argument, 0, 'r'},
- {"base", required_argument, 0, 'b'},
- {"logarithmic", no_argument, 0, 'o'},
- {"color", required_argument, 0, 'c'},
- {"font", required_argument, 0, 'n'},
- {"title", required_argument, 0, 't'},
- {"imginfo", required_argument, 0, 'f'},
- {"imgformat", required_argument, 0, 'a'},
- {"lazy", no_argument, 0, 'z'},
- {"zoom", required_argument, 0, 'm'},
- {"no-legend", no_argument, 0, 'g'},
- {"force-rules-legend", no_argument, 0, 'F'},
- {"only-graph", no_argument, 0, 'j'},
- {"alt-y-grid", no_argument, 0, 'Y'},
- {"no-minor", no_argument, 0, 'I'},
- {"slope-mode", no_argument, 0, 'E'},
- {"alt-autoscale", no_argument, 0, 'A'},
- {"alt-autoscale-min", no_argument, 0, 'J'},
- {"alt-autoscale-max", no_argument, 0, 'M'},
- {"no-gridfit", no_argument, 0, 'N'},
- {"units-exponent", required_argument, 0, 'X'},
- {"units-length", required_argument, 0, 'L'},
- {"units", required_argument, 0, LONGOPT_UNITS_SI},
- {"step", required_argument, 0, 'S'},
- {"tabwidth", required_argument, 0, 'T'},
- {"font-render-mode", required_argument, 0, 'R'},
- {"graph-render-mode", required_argument, 0, 'G'},
- {"font-smoothing-threshold", required_argument, 0, 'B'},
- {"watermark", required_argument, 0, 'W'},
- {"alt-y-mrtg", no_argument, 0, 1000}, /* this has no effect it is just here to save old apps from crashing when they use it */
- {0, 0, 0, 0}
- };
+ struct option long_options[] = {
+ {"start", required_argument, 0, 's'},
+ {"end", required_argument, 0, 'e'},
+ {"x-grid", required_argument, 0, 'x'},
+ {"y-grid", required_argument, 0, 'y'},
+ {"vertical-label", required_argument, 0, 'v'},
+ {"width", required_argument, 0, 'w'},
+ {"height", required_argument, 0, 'h'},
+ {"full-size-mode", no_argument, 0, 'D'},
+ {"interlaced", no_argument, 0, 'i'},
+ {"upper-limit", required_argument, 0, 'u'},
+ {"lower-limit", required_argument, 0, 'l'},
+ {"rigid", no_argument, 0, 'r'},
+ {"base", required_argument, 0, 'b'},
+ {"logarithmic", no_argument, 0, 'o'},
+ {"color", required_argument, 0, 'c'},
+ {"font", required_argument, 0, 'n'},
+ {"title", required_argument, 0, 't'},
+ {"imginfo", required_argument, 0, 'f'},
+ {"imgformat", required_argument, 0, 'a'},
+ {"lazy", no_argument, 0, 'z'},
+ {"zoom", required_argument, 0, 'm'},
+ {"no-legend", no_argument, 0, 'g'},
+ {"force-rules-legend", no_argument, 0, 'F'},
+ {"only-graph", no_argument, 0, 'j'},
+ {"alt-y-grid", no_argument, 0, 'Y'},
+ {"no-minor", no_argument, 0, 'I'},
+ {"slope-mode", no_argument, 0, 'E'},
+ {"alt-autoscale", no_argument, 0, 'A'},
+ {"alt-autoscale-min", no_argument, 0, 'J'},
+ {"alt-autoscale-max", no_argument, 0, 'M'},
+ {"no-gridfit", no_argument, 0, 'N'},
+ {"units-exponent", required_argument, 0, 'X'},
+ {"units-length", required_argument, 0, 'L'},
+ {"units", required_argument, 0, LONGOPT_UNITS_SI},
+ {"step", required_argument, 0, 'S'},
+ {"tabwidth", required_argument, 0, 'T'},
+ {"font-render-mode", required_argument, 0, 'R'},
+ {"graph-render-mode", required_argument, 0, 'G'},
+ {"font-smoothing-threshold", required_argument, 0, 'B'},
+ {"watermark", required_argument, 0, 'W'},
+ {"alt-y-mrtg", no_argument, 0, 1000}, /* this has no effect it is just here to save old apps from crashing when they use it */
+ {0, 0, 0, 0}
+ };
optind = 0;
opterr = 0; /* initialize getopt */
/* NaN < -INF < finite_values < INF */
int vdef_percent_compar(
- const void *a, const void *b)
+ const void *a,
+ const void *b)
{
/* Equality is not returned; this doesn't hurt except
* (maybe) for a little performance.
diff --git a/program/src/rrd_tune.c b/program/src/rrd_tune.c
index 714e7d40673993c8e421c7916470e90d3fadd35d..f675c8b24d92ec9f5524a696b67f543ca629d2dd 100644 (file)
--- a/program/src/rrd_tune.c
+++ b/program/src/rrd_tune.c
double max;
char dst[DST_SIZE];
rrd_file_t *rrd_file;
- struct option long_options[] = {
- {"heartbeat", required_argument, 0, 'h'},
- {"minimum", required_argument, 0, 'i'},
- {"maximum", required_argument, 0, 'a'},
- {"data-source-type", required_argument, 0, 'd'},
- {"data-source-rename", required_argument, 0, 'r'},
- /* added parameter tuning options for aberrant behavior detection */
- {"deltapos", required_argument, 0, 'p'},
- {"deltaneg", required_argument, 0, 'n'},
- {"window-length", required_argument, 0, 'w'},
- {"failure-threshold", required_argument, 0, 'f'},
- {"alpha", required_argument, 0, 'x'},
- {"beta", required_argument, 0, 'y'},
- {"gamma", required_argument, 0, 'z'},
- {"gamma-deviation", required_argument, 0, 'v'},
- {"aberrant-reset", required_argument, 0, 'b'},
- {0, 0, 0, 0}
- };
+ struct option long_options[] = {
+ {"heartbeat", required_argument, 0, 'h'},
+ {"minimum", required_argument, 0, 'i'},
+ {"maximum", required_argument, 0, 'a'},
+ {"data-source-type", required_argument, 0, 'd'},
+ {"data-source-rename", required_argument, 0, 'r'},
+ /* added parameter tuning options for aberrant behavior detection */
+ {"deltapos", required_argument, 0, 'p'},
+ {"deltaneg", required_argument, 0, 'n'},
+ {"window-length", required_argument, 0, 'w'},
+ {"failure-threshold", required_argument, 0, 'f'},
+ {"alpha", required_argument, 0, 'x'},
+ {"beta", required_argument, 0, 'y'},
+ {"gamma", required_argument, 0, 'z'},
+ {"gamma-deviation", required_argument, 0, 'v'},
+ {"aberrant-reset", required_argument, 0, 'b'},
+ {0, 0, 0, 0}
+ };
optind = 0;
opterr = 0; /* initialize getopt */
index 21110b84705e66a4efa209287bfae31985a2a69c..a063c87766413744ed9fd5291ce3fa646a172b0b 100644 (file)
--- a/program/src/rrd_xport.c
+++ b/program/src/rrd_xport.c
time_t start_tmp = 0, end_tmp = 0;
struct rrd_time_value start_tv, end_tv;
char *parsetime_error = NULL;
- struct option long_options[] = {
- {"start", required_argument, 0, 's'},
- {"end", required_argument, 0, 'e'},
- {"maxrows", required_argument, 0, 'm'},
- {"step", required_argument, 0, 261},
- {"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */
- {0, 0, 0, 0}
- };
+ struct option long_options[] = {
+ {"start", required_argument, 0, 's'},
+ {"end", required_argument, 0, 'e'},
+ {"maxrows", required_argument, 0, 'm'},
+ {"step", required_argument, 0, 261},
+ {"enumds", no_argument, 0, 262}, /* these are handled in the frontend ... */
+ {0, 0, 0, 0}
+ };
optind = 0;
opterr = 0; /* initialize getopt */