- correct graph data on unexact variables

This commit is contained in:
zolliker
2005-09-09 14:41:48 +00:00
parent e4aae153f7
commit ac38600f9d

View File

@ -86,7 +86,7 @@ void LoggerSetDir(char *dirarg) {
}
fclose(fil);
} else {
perror("open read error \n");
printf("can not read %s\n", path);
}
}
/*--------------------------------------------------------------------------*/
@ -104,8 +104,7 @@ char *LoggerGetDir(void) {
fprintf(fil, "%s%ld\n", LASTLOGTXT, (long)now);
fclose(fil);
} else {
printf("can not open %s\n", path);
perror("open write error \n");
printf("can not write %s\n", path);
}
last = now;
}
@ -259,7 +258,7 @@ int LoggerWrite(Logger *log, time_t now, int period, char *value) {
int l;
FILE *fil;
char path[PATH_MAX];
char path[256];
char tim[256];
tm = localtime(&now);
@ -417,7 +416,7 @@ static void LoggerOut(Compressor *c, time_t t, float y) {
char line[80];
/* printf("out %ld %g\n", t, y); */
if (y != c->ylast) {
if (y != c->ylast || !c->exact) {
c->ylast = y;
if (y == LOGGER_NAN) {
snprintf(line, sizeof line, "%ld\n", (long)(t - c->tlast));