]>
jfr.im git - irc/quakenet/newserv.git/blob - graphing/dump.c
7 int dump(fsample_m
*f
, fsample_t start
, fsample_t stop
) {
10 for(i
=start
;i
<stop
;i
++) {
12 for(j
=0;j
<f
->pos
;j
++) {
14 int moo
= fsget_m(f
, j
, i
, &t
);
17 int moo2
= fsget_mr(f
, j
, i
, &t
);
18 printf("X%2d(%2d) ", t
, moo2
);
20 printf(" %2d(%2d) ", t
, moo
);
30 int main(int cargc
, char **cargv
) {
32 int stop
= time(NULL
) / GRAPHING_RESOLUTION
;
36 puts("insufficient args");
40 if(stat(cargv
[1], &sb
) == -1) {
41 puts("file doesn't exist");
45 f
= fsopen_m(0, cargv
[1], SAMPLES
, NULL
, NULL
);
49 dump(f
, stop
- 100, stop
);