diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-05-30 12:57:16 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-05-30 12:57:16 +0300 |
commit | 2a6ef4f51500091e535b2b47d709eee5cd52468c (patch) | |
tree | e3e28622c41b8b477acf1f2be6db9955b7ab4c6b /src/tagr.h | |
parent | fbc8bdac6efb0c63a73c5105bbf4ecb304187e44 (diff) | |
download | tagr-2a6ef4f51500091e535b2b47d709eee5cd52468c.tar.gz tagr-2a6ef4f51500091e535b2b47d709eee5cd52468c.tar.bz2 |
* src/graph.c (default_monitor): New global.
(find_max): New function.
(draw_graph): Adjust max rate if requested.
* src/grid.c (ygrid_create): Use mon->ystep_absolute
to determine the type of grid.
* src/readconfig.c (cb_monitor): Handle `monitor default'.
(monitor_kw): New statements: max-adjust and y-step-absolute.
(tagr_kw): Remove rate-units kw.
* src/tagr.h (struct monitor): New members: max_adjust and
ystep_absolute.
(default_monitor): New extern.
Diffstat (limited to 'src/tagr.h')
-rw-r--r-- | src/tagr.h | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -43,14 +43,16 @@ struct monitor { - char *id; - char *name; - char *dir; - char *rate_unit; - unsigned long max_rate; - double scale; - double ystep; - int swap; + char *id; /* Monitor ID */ + char *name; /* Full name */ + char *dir; /* Output directory */ + char *rate_unit; /* Rate units */ + unsigned long max_rate; /* Max. rate value */ + unsigned long max_adjust; /* Adjustment for max. rate */ + double scale; /* Y (rate) scale */ + double ystep; /* Step of Y grid, in fractions of max_rate */ + int ystep_absolute; /* When true, ystep is an absolute value */ + int swap; /* Swap input and output rates */ }; extern int preprocess_only; @@ -75,8 +77,8 @@ extern char *html_template; extern char *html_input_file; extern int html_input_line; extern int verbose_level; -extern char *rate_unit; +extern struct monitor default_monitor; extern int percent_option; extern int transparent_option; extern int zero_unknown_option; |