- VDEF_MAXIMUM /* like the MAX in (G)PRINT */
- ,VDEF_MINIMUM /* like the MIN in (G)PRINT */
- ,VDEF_AVERAGE /* like the AVERAGE in (G)PRINT */
- ,VDEF_PERCENT /* Nth percentile */
- ,VDEF_TOTAL /* average multiplied by time */
- ,VDEF_FIRST /* first non-unknown value and time */
- ,VDEF_LAST /* last non-unknown value and time */
- };
-enum text_prop_en { TEXT_PROP_DEFAULT=0, /* default settings */
- TEXT_PROP_TITLE, /* properties for the title */
- TEXT_PROP_AXIS, /* for the numbers next to the axis */
- TEXT_PROP_UNIT, /* for the vertical unit description */
- TEXT_PROP_LEGEND, /* fot the legend below the graph */
- TEXT_PROP_LAST };
+ VDEF_MAXIMUM = 0 /* like the MAX in (G)PRINT */
+ , VDEF_MINIMUM /* like the MIN in (G)PRINT */
+ , VDEF_AVERAGE /* like the AVERAGE in (G)PRINT */
+ , VDEF_STDEV /* the standard deviation */
+ , VDEF_PERCENT /* Nth percentile */
+ , VDEF_TOTAL /* average multiplied by time */
+ , VDEF_FIRST /* first non-unknown value and time */
+ , VDEF_LAST /* last non-unknown value and time */
+ , VDEF_LSLSLOPE /* least squares line slope */
+ , VDEF_LSLINT /* least squares line y_intercept */
+ , VDEF_LSLCORREL /* least squares line correlation coefficient */
+ , VDEF_PERCENTNAN /* Nth percentile ignoring NAN*/
+};
+enum text_prop_en {
+ TEXT_PROP_DEFAULT = 0, /* default settings */
+ TEXT_PROP_TITLE, /* properties for the title */
+ TEXT_PROP_AXIS, /* for the numbers next to the axis */
+ TEXT_PROP_UNIT, /* for the vertical unit description */
+ TEXT_PROP_LEGEND, /* for the legend below the graph */
+ TEXT_PROP_WATERMARK, /* for the little text to the side of the graph */
+ TEXT_PROP_LAST
+};
+
+enum legend_pos{ NORTH = 0, WEST, SOUTH, EAST };
+enum legend_direction { TOP_DOWN = 0, BOTTOM_UP };
+
+enum gfx_if_en { IF_PNG = 0, IF_SVG, IF_EPS, IF_PDF,
+ IF_XML=128, IF_CSV=129, IF_TSV=130, IF_SSV=131, IF_JSON=132,
+ IF_XMLENUM=133, IF_JSONTIME=134
+};
+enum gfx_en { GFX_LINE = 0, GFX_AREA, GFX_TEXT };
+enum gfx_h_align_en { GFX_H_NULL = 0, GFX_H_LEFT, GFX_H_RIGHT, GFX_H_CENTER };
+enum gfx_v_align_en { GFX_V_NULL = 0, GFX_V_TOP, GFX_V_BOTTOM, GFX_V_CENTER };
+
+enum gfx_type_en {GTYPE_TIME=0,GTYPE_XY=1};
+
+/* cairo color components */
+typedef struct gfx_color_t {
+ double red;
+ double green;
+ double blue;
+ double alpha;
+} gfx_color_t;
+
+typedef struct keyvalue_t {
+ char* key;
+ char* value;
+ int pos;
+ int flag;
+} keyvalue_t;
+
+typedef struct keyint_t {
+ char*key;
+ int value;
+} keyint_t;
+
+typedef struct parsedargs_t {
+ char *arg; /* copy of the parsed string - rewritten*/
+ const char *arg_orig; /* original argument */
+ int kv_cnt; /* number of key/value arguments */
+ keyvalue_t *kv_args; /* key value arguments */
+} parsedargs_t;
+void initParsedArguments(parsedargs_t*);
+void freeParsedArguments(parsedargs_t*);
+int addToArguments(parsedargs_t*, char*, char*, int);
+int parseArguments(const char*, parsedargs_t*);
+void dumpKeyValue(char* ,keyvalue_t*);
+void dumpArguments(parsedargs_t*);
+char* getKeyValueArgument(const char*, int, parsedargs_t*);
+int getMappedKeyValueArgument(const char*,int, parsedargs_t*,
+ int*,keyint_t**);
+int getLong(const char*,long *,char**,int);
+int getDouble(const char*,double *,char**);
+keyvalue_t* getFirstUnusedArgument(int, parsedargs_t*);
+char* checkUnusedValues(parsedargs_t*);