From: Martin Ling Date: Thu, 20 Sep 2018 19:42:11 +0000 (+0100) Subject: Don't reference SR_PACKAGE_VERSION_STRING directly in output modules. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2868bca35b321ad922326a213146c648ffa3410e;p=libsigrok.git Don't reference SR_PACKAGE_VERSION_STRING directly in output modules. --- diff --git a/src/output/ascii.c b/src/output/ascii.c index 9e04e768..c956b075 100644 --- a/src/output/ascii.c +++ b/src/output/ascii.c @@ -124,7 +124,7 @@ static GString *gen_header(const struct sr_output *o) } header = g_string_sized_new(512); - g_string_printf(header, "%s %s\n", PACKAGE_NAME, SR_PACKAGE_VERSION_STRING); + g_string_printf(header, "%s %s\n", PACKAGE_NAME, sr_package_version_string_get()); num_channels = g_slist_length(o->sdi->channels); g_string_append_printf(header, "Acquisition with %d/%d channels", ctx->num_enabled_channels, num_channels); diff --git a/src/output/bits.c b/src/output/bits.c index c3f2ef32..f29d57fa 100644 --- a/src/output/bits.c +++ b/src/output/bits.c @@ -102,7 +102,7 @@ static GString *gen_header(const struct sr_output *o) } header = g_string_sized_new(512); - g_string_printf(header, "%s %s\n", PACKAGE_NAME, SR_PACKAGE_VERSION_STRING); + g_string_printf(header, "%s %s\n", PACKAGE_NAME, sr_package_version_string_get()); num_channels = g_slist_length(o->sdi->channels); g_string_append_printf(header, "Acquisition with %d/%d channels", ctx->num_enabled_channels, num_channels); diff --git a/src/output/csv.c b/src/output/csv.c index 47526587..1ff4e3a7 100644 --- a/src/output/csv.c +++ b/src/output/csv.c @@ -252,7 +252,7 @@ static GString *gen_header(const struct sr_output *o, g_string_append_printf(header, "%s CSV generated by %s %s\n%s from %s on %s", ctx->comment, PACKAGE_NAME, - SR_PACKAGE_VERSION_STRING, ctx->comment, + sr_package_version_string_get(), ctx->comment, ctx->title, ctime(&hdr->starttime.tv_sec)); /* Columns / channels */ diff --git a/src/output/hex.c b/src/output/hex.c index a1c09f81..e557eb08 100644 --- a/src/output/hex.c +++ b/src/output/hex.c @@ -107,7 +107,7 @@ static GString *gen_header(const struct sr_output *o) } header = g_string_sized_new(512); - g_string_printf(header, "%s %s\n", PACKAGE_NAME, SR_PACKAGE_VERSION_STRING); + g_string_printf(header, "%s %s\n", PACKAGE_NAME, sr_package_version_string_get()); num_channels = g_slist_length(o->sdi->channels); g_string_append_printf(header, "Acquisition with %d/%d channels", ctx->num_enabled_channels, num_channels); diff --git a/src/output/srzip.c b/src/output/srzip.c index 93c43d32..0c5ebf68 100644 --- a/src/output/srzip.c +++ b/src/output/srzip.c @@ -99,7 +99,7 @@ static int zip_create(const struct sr_output *o) meta = g_key_file_new(); g_key_file_set_string(meta, "global", "sigrok version", - SR_PACKAGE_VERSION_STRING); + sr_package_version_string_get()); devgroup = "device 1"; diff --git a/src/output/vcd.c b/src/output/vcd.c index f90db498..561b3ba0 100644 --- a/src/output/vcd.c +++ b/src/output/vcd.c @@ -102,7 +102,7 @@ static GString *gen_header(const struct sr_output *o) /* generator */ g_string_append_printf(header, "$version %s %s $end\n", - PACKAGE_NAME, SR_PACKAGE_VERSION_STRING); + PACKAGE_NAME, sr_package_version_string_get()); g_string_append_printf(header, "$comment\n Acquisition with " "%d/%d channels", ctx->num_enabled_channels, num_channels);