path: root/src/stat.c
authorSergey Poznyakoff <>2009-04-25 21:52:15 (GMT)
committer Sergey Poznyakoff <>2009-04-25 21:52:15 (GMT)
commit099a946ad4465c42db4737b247f1e89bd03c83ae (patch) (side-by-side diff)
treeaf302f68f078305d27eeea1716405f79aac81877 /src/stat.c
parentd039b6b354119ff8735e4992dbf06760ea28fa55 (diff)
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') (more/less context) (ignore whitespace changes)
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stat.c b/src/stat.c
index 3b8fb96..ed4ab8e 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -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)
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)

Return to:

Send suggestions and report system problems to the System administrator.