aboutsummaryrefslogtreecommitdiff
path: root/src/stat.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-04-26 00:52:15 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2009-04-26 00:52:15 +0300
commit099a946ad4465c42db4737b247f1e89bd03c83ae (patch)
treeaf302f68f078305d27eeea1716405f79aac81877 /src/stat.c
parentd039b6b354119ff8735e4992dbf06760ea28fa55 (diff)
downloadtagr-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.c4
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)
422 die (EX_OSERR, "cannot stat file `%s': %s", dirname, strerror (errno)); 422 die (EX_OSERR, "cannot stat file `%s': %s", dirname, strerror (errno));
423 else if (S_ISREG (st.st_mode)) 423 else if (S_ISREG (st.st_mode))
424 { 424 {
425 open_db (); 425 open_db (TAGR_DB_WR);
426 if (import_log (dirname) == 0) 426 if (import_log (dirname) == 0)
427 count++; 427 count++;
428 close_db (); 428 close_db ();
@@ -441,7 +441,7 @@ import (const char *dirname)
441 switch (rc) 441 switch (rc)
442 { 442 {
443 case 0: 443 case 0:
444 open_db (); 444 open_db (TAGR_DB_WR);
445 for (i = 0; i < gl.gl_pathc; i++) 445 for (i = 0; i < gl.gl_pathc; i++)
446 if (import_log (gl.gl_pathv[i]) == 0) 446 if (import_log (gl.gl_pathv[i]) == 0)
447 count++; 447 count++;

Return to:

Send suggestions and report system problems to the System administrator.