Replace dtoastr with c_dtoastr where appropriate
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 24 Dec 2012 08:27:11 +0000 (09:27 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 24 Dec 2012 08:34:51 +0000 (09:34 +0100)
src/language/control/repeat.c
src/language/lexer/token.c
src/ui/syntax-gen.c

index 72d45c2c2ff96344cfe65c3948475fd661792469..e76c4903dea02e6b07c653201a9ff38dfef4f2ce 100644 (file)
@@ -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);
         }
index 89a5cf0102baf5fa77347ef8051469a8fde8dc77..80c6615c5a5015048ed7e4767ada3e135c26262f 100644 (file)
@@ -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)
index 52c40fa69d6cc83a58662b6a1d6a28354cd335df..dca3bd3c5b3cb778dde442553cebd40c83c23152 100644 (file)
@@ -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);
     }
 }