- minor improvements and bug fixes

This commit is contained in:
zolliker
2010-09-02 11:43:46 +00:00
parent b74bcafc7a
commit 7644fe66e2
3 changed files with 11 additions and 4 deletions

View File

@ -69,7 +69,7 @@ static void OutFloat(Compressor * c, Point p)
} else {
if (c->omitEqual && c->written.y == p.y)
return;
snprintf(c->buf, sizeof(c->buf), "%g", p.y);
snprintf(c->buf, sizeof(c->buf), "%.7g", p.y);
value = c->buf;
}
SCPrintf(c->pCon, eWarning, "%ld %s", (long) (p.t - c->written.t),
@ -141,7 +141,7 @@ static void PutFinish(Compressor * c, time_t now)
if (c->type == NUMERIC) {
if (now > c->last.t + c->period) { /* copy last value to the actual time */
if (c->last.y != LOGGER_NAN) {
snprintf(value, sizeof value, "%g", c->last.y);
snprintf(value, sizeof value, "%.7g", c->last.y);
PutValue(c, now, value);
}
if (c->best.t > c->written.t) {