projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
encoding-guesser: Fix bug in parsing fallback encodings.
[pspp]
/
src
/
language
/
lexer
/
token.c
diff --git
a/src/language/lexer/token.c
b/src/language/lexer/token.c
index 89a5cf0102baf5fa77347ef8051469a8fde8dc77..80c6615c5a5015048ed7e4767ada3e135c26262f 100644
(file)
--- 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 "data/identifier.h"
#include "libpspp/assertion.h"
#include "libpspp/cast.h"
+#include "libpspp/misc.h"
+
#include "gl/ftoastr.h"
#include "gl/xalloc.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];
{
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));
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];
{
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)
fprintf (stream, "\t%s", s);
}
if (token->type == T_ID || token->type == T_STRING || token->string.length)