From cb25cf1021c8ee253c0dc7fab98ee5ce0915d00e Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 2 Jul 2010 20:38:45 +0200 Subject: [PATCH] src/rrd_args.[ch]: Split up the "draw" part (into "areas" and "lines"). --- src/rrd_args.c | 15 ++++++++++----- src/rrd_args.h | 3 ++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/rrd_args.c b/src/rrd_args.c index f913733..4c66a15 100644 --- a/src/rrd_args.c +++ b/src/rrd_args.c @@ -16,12 +16,14 @@ rrd_args_t *ra_create (void) /* {{{ */ ra->options = array_create (); ra->data = array_create (); ra->calc = array_create (); - ra->draw = array_create (); + ra->areas = array_create (); + ra->lines = array_create (); if ((ra->options == NULL) || (ra->data == NULL) || (ra->calc == NULL) - || (ra->draw == NULL)) + || (ra->areas == NULL) + || (ra->lines == NULL)) { ra_destroy (ra); return (NULL); @@ -38,7 +40,8 @@ void ra_destroy (rrd_args_t *ra) /* {{{ */ array_destroy (ra->options); array_destroy (ra->data); array_destroy (ra->calc); - array_destroy (ra->draw); + array_destroy (ra->areas); + array_destroy (ra->lines); free (ra); } /* }}} void ra_destroy */ @@ -51,7 +54,8 @@ int ra_argc (rrd_args_t *ra) return (array_argc (ra->options) + array_argc (ra->data) + array_argc (ra->calc) - + array_argc (ra->draw)); + + array_argc (ra->areas) + + array_argc (ra->lines)); } /* }}} int ra_argc */ char **ra_argv (rrd_args_t *ra) /* {{{ */ @@ -95,7 +99,8 @@ char **ra_argv (rrd_args_t *ra) /* {{{ */ APPEND_FIELD (options); APPEND_FIELD (data); APPEND_FIELD (calc); - APPEND_FIELD (draw); + APPEND_FIELD (areas); + APPEND_FIELD (lines); #undef APPEND_FIELD diff --git a/src/rrd_args.h b/src/rrd_args.h index b3ef34a..9c29325 100644 --- a/src/rrd_args.h +++ b/src/rrd_args.h @@ -8,7 +8,8 @@ struct rrd_args_s str_array_t *options; str_array_t *data; str_array_t *calc; - str_array_t *draw; + str_array_t *areas; + str_array_t *lines; int index; char last_stack_cdef[64]; -- 2.30.2