From: John Darrington Date: Sun, 23 Dec 2012 20:15:26 +0000 (+0100) Subject: Autorecode: use locale independent printf function X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ace3e978177b9f189ac8ebf8e852d5001dabcf5;p=pspp Autorecode: use locale independent printf function --- diff --git a/src/language/stats/autorecode.c b/src/language/stats/autorecode.c index 95fb8d173c..736d1e6852 100644 --- a/src/language/stats/autorecode.c +++ b/src/language/stats/autorecode.c @@ -37,9 +37,10 @@ #include "libpspp/str.h" #include "gl/xalloc.h" -#include "gl/vasnprintf.h" +#include "gl/c-vasprintf.h" #include "gl/mbiter.h" + #include "gettext.h" #define _(msgid) gettext (msgid) @@ -295,7 +296,6 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds) for (j = 0; j < n_items; j++) { const union value *from = &items[j]->from; - size_t len; char *recoded_value = NULL; char *c; const int src_width = items[j]->width; @@ -315,7 +315,7 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds) recoded_value = recode_string (UTF8, dict_get_encoding (arc->dict), str, src_width); } else - recoded_value = asnprintf (NULL, &len, "%g", from->f); + recoded_value = c_xasprintf ("%g", from->f); /* Remove trailing whitespace */ for (c = recoded_value; *c != '\0'; c++)