char *outbuf, c;
ctx = o->internal;
- max_linelen = MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ max_linelen = SR_MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ ctx->samples_per_line / 8;
/*
* Calculate space needed for probes. Set aside 512 bytes for
char *outbuf;
ctx = o->internal;
- max_linelen = MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ max_linelen = SR_MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ ctx->samples_per_line / 2;
outsize = length_in / ctx->unitsize * ctx->num_enabled_probes
/ ctx->samples_per_line * max_linelen + 512;
char *outbuf;
ctx = o->internal;
- max_linelen = MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ max_linelen = SR_MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ ctx->samples_per_line / 8;
/*
* Calculate space needed for probes. Set aside 512 bytes for
struct context {
unsigned int num_enabled_probes;
unsigned int unitsize;
- char *probelist[MAX_NUM_PROBES+1];
+ char *probelist[SR_MAX_NUM_PROBES + 1];
char *header;
};
-#define MAX_HEADER_LEN 1024 + (MAX_NUM_PROBES * (MAX_PROBENAME_LEN + 10))
+#define MAX_HEADER_LEN \
+ (1024 + (SR_MAX_NUM_PROBES * (SR_MAX_PROBENAME_LEN + 10)))
+
const char *gnuplot_header = "\
# Sample data in space-separated columns format usable by gnuplot\n\
#\n\
char *outbuf;
ctx = o->internal;
- max_linelen = MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ max_linelen = SR_MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ ctx->samples_per_line / 8;
/*
* Calculate space needed for probes. Set aside 512 bytes for
char *outbuf, c;
ctx = o->internal;
- max_linelen = MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ max_linelen = SR_MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ ctx->samples_per_line / 8;
/*
* Calculate space needed for probes. Set aside 512 bytes for
char *outbuf;
ctx = o->internal;
- max_linelen = MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ max_linelen = SR_MAX_PROBENAME_LEN + 3 + ctx->samples_per_line
+ ctx->samples_per_line / 2;
outsize = length_in / ctx->unitsize * ctx->num_enabled_probes
/ ctx->samples_per_line * max_linelen + 512;
#define SR_ERR_MALLOC -2 /* Malloc/calloc/realloc error */
#define SR_ERR_SAMPLERATE -3 /* Incorrect samplerate */
-/* limited by uint64_t */
-#define MAX_NUM_PROBES 64
-#define MAX_PROBENAME_LEN 32
+#define SR_MAX_NUM_PROBES 64 /* Limited by uint64_t. */
+#define SR_MAX_PROBENAME_LEN 32
/* Handy little macros */
#define KHZ(n) ((n) * 1000)