X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=src%2Frrd_args.c;h=f15d4cc819aaa45c3af6c2bbf9cd0a0b23c5b891;hp=f9137332276faf7a7fb89d3d86035f99b162deaf;hb=d00ed057f5ca87431c18ecbf9c45364eb85c24f4;hpb=8a3753760230b270c8f4615891cba2586a661d21 diff --git a/src/rrd_args.c b/src/rrd_args.c index f913733..f15d4cc 100644 --- a/src/rrd_args.c +++ b/src/rrd_args.c @@ -1,3 +1,26 @@ +/** + * collection4 - rrd_args.c + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #include #include #include @@ -16,12 +39,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 +63,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 +77,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 +122,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