From 4881184f738deb7a4c5b843a361d4225f4e3d6c0 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Mon, 24 Dec 2012 09:27:11 +0100 Subject: [PATCH] Replace dtoastr with c_dtoastr where appropriate --- src/language/control/repeat.c | 3 ++- src/language/lexer/token.c | 6 ++++-- src/ui/syntax-gen.c | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/language/control/repeat.c b/src/language/control/repeat.c index 72d45c2c2f..e76c4903de 100644 --- a/src/language/control/repeat.c +++ b/src/language/control/repeat.c @@ -32,6 +32,7 @@ #include "libpspp/hmap.h" #include "libpspp/message.h" #include "libpspp/str.h" +#include "libpspp/misc.h" #include "gl/ftoastr.h" #include "gl/minmax.h" @@ -399,7 +400,7 @@ parse_numbers (struct lexer *lexer, struct dummy_var *dv) { char s[DBL_BUFSIZE_BOUND]; - dtoastr (s, sizeof s, 0, 0, lex_number (lexer)); + c_dtoastr (s, sizeof s, 0, 0, lex_number (lexer)); add_replacement (dv, xstrdup (s), &allocated); lex_get (lexer); } diff --git a/src/language/lexer/token.c b/src/language/lexer/token.c index 89a5cf0102..80c6615c5a 100644 --- a/src/language/lexer/token.c +++ b/src/language/lexer/token.c @@ -25,6 +25,8 @@ #include "data/identifier.h" #include "libpspp/assertion.h" #include "libpspp/cast.h" +#include "libpspp/misc.h" + #include "gl/ftoastr.h" #include "gl/xalloc.h" @@ -51,7 +53,7 @@ number_token_to_string (const struct token *token) { char buffer[DBL_BUFSIZE_BOUND]; - dtoastr (buffer, sizeof buffer, 0, 0, fabs (token->number)); + c_dtoastr (buffer, sizeof buffer, 0, 0, fabs (token->number)); return (token->type == T_POS_NUM ? xstrdup (buffer) : xasprintf ("-%s", buffer)); @@ -163,7 +165,7 @@ token_print (const struct token *token, FILE *stream) { char s[DBL_BUFSIZE_BOUND]; - dtoastr (s, sizeof s, 0, 0, token->number); + c_dtoastr (s, sizeof s, 0, 0, token->number); fprintf (stream, "\t%s", s); } if (token->type == T_ID || token->type == T_STRING || token->string.length) diff --git a/src/ui/syntax-gen.c b/src/ui/syntax-gen.c index 52c40fa69d..dca3bd3c5b 100644 --- a/src/ui/syntax-gen.c +++ b/src/ui/syntax-gen.c @@ -30,6 +30,7 @@ #include "libpspp/i18n.h" #include "libpspp/message.h" #include "libpspp/str.h" +#include "libpspp/misc.h" #include "gl/ftoastr.h" @@ -176,7 +177,7 @@ syntax_gen_number (struct string *output, { char s[DBL_BUFSIZE_BOUND]; - dtoastr (s, sizeof s, 0, 0, number); + c_dtoastr (s, sizeof s, 0, 0, number); ds_put_cstr (output, s); } } -- 2.30.2