diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-04-26 00:52:15 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-04-26 00:52:15 +0300 |
commit | 099a946ad4465c42db4737b247f1e89bd03c83ae (patch) | |
tree | af302f68f078305d27eeea1716405f79aac81877 /src/stat.c | |
parent | d039b6b354119ff8735e4992dbf06760ea28fa55 (diff) | |
download | tagr-099a946ad4465c42db4737b247f1e89bd03c83ae.tar.gz tagr-099a946ad4465c42db4737b247f1e89bd03c83ae.tar.bz2 |
Improve graphical presentation. Other bugfixes.
* src/graph.c (draw_graph): Cut off values of Y greater than YMAX
Use scale_sample to prepare data.
* src/grid.c (ygrid_create): New function.
(ygrid_next): Use data prepared by ygrid_create.
* src/main.c (change_user): Bugfix.
Update calls to open_db
Move log initialization to the proper place.
* src/output.c (scale_sample): New function.
(add_stats): Use scale_sample to prepare data.
(cb_monitor): Initialize scale and ystep.
(cb_double): New function.
(monitor_kw): New keywords: scale, y-step and swap.
* src/report.c (open_db): Take an argument specifying whether
the database will be written to. All callers updated.
* src/tagr.h (struct monitor): New members: scale, ystep and swap.
max_rate is ulong.
(TAGR_DB_RD, TAGR_DB_WR): New macros.
(open_db): Update proto.
(scale_sample): New proto.
Diffstat (limited to 'src/stat.c')
-rw-r--r-- | src/stat.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -422,7 +422,7 @@ import (const char *dirname) die (EX_OSERR, "cannot stat file `%s': %s", dirname, strerror (errno)); else if (S_ISREG (st.st_mode)) { - open_db (); + open_db (TAGR_DB_WR); if (import_log (dirname) == 0) count++; close_db (); @@ -441,7 +441,7 @@ import (const char *dirname) switch (rc) { case 0: - open_db (); + open_db (TAGR_DB_WR); for (i = 0; i < gl.gl_pathc; i++) if (import_log (gl.gl_pathv[i]) == 0) count++; |