- ctx->probelist[ctx->num_enabled_probes++] = probe->name;
- }
- ctx->probelist[ctx->num_enabled_probes] = 0;
- ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
-
- num_probes = g_slist_length(o->sdi->probes);
- comment[0] = '\0';
- if (sr_dev_has_option(o->sdi, SR_CONF_SAMPLERATE)) {
- o->sdi->driver->config_get(SR_CONF_SAMPLERATE,
- (const void **)&samplerate, o->sdi);
- if (!(frequency_s = sr_samplerate_string(*samplerate))) {
- sr_err("%s: sr_samplerate_string failed", __func__);
- g_free(ctx->header);
- g_free(ctx);
- return SR_ERR;
- }
- snprintf(comment, 127, gnuplot_header_comment,
- ctx->num_enabled_probes, num_probes, frequency_s);
- g_free(frequency_s);
- }
-
- /* Columns / channels */
- wbuf[0] = '\0';
- for (i = 0; i < ctx->num_enabled_probes; i++) {
- c = (char *)&wbuf + strlen((const char *)&wbuf);
- sprintf(c, "# %d\t\t%s\n", i + 1, ctx->probelist[i]);