|
|
tcsv.h - ploot - simple plotting tools |
|
|
 |
git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ploot (git://bitreich.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
Tags |
|
|
|
--- |
|
|
|
tcsv.h (557B) |
|
|
|
--- |
|
|
|
1 #ifndef CSV_H |
|
|
|
2 #define CSV_H |
|
|
|
3 |
|
|
|
4 #include <stdio.h> |
|
|
|
5 #include <time.h> |
|
|
|
6 |
|
|
|
7 /* |
|
|
|
8 * List of values and timestamps. Both have their dedicated buffer |
|
|
|
9 * so that the timestamp buffer can be shared across csv objects. |
|
|
|
10 */ |
|
|
|
11 struct csv { |
|
|
|
12 time_t *t; /* array of timestamps */ |
|
|
|
13 double *v; /* array of values */ |
|
|
|
14 size_t n; /* number of values */ |
|
|
|
15 char label[64]; /* for the legend */ |
|
|
|
16 }; |
|
|
|
17 |
|
|
|
18 void csv_labels(FILE *, struct csv **, size_t *); |
|
|
|
19 void csv_values(FILE *, struct csv *, size_t); |
|
|
|
20 int csv_min_max(struct csv *, int, time_t *, time_t *, double *, double *); |
|
|
|
21 |
|
|
|
22 #endif |
|