projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
psppire-var-sheet: Hard-code size of pixbuf cells.
[pspp]
/
src
/
data
/
format-guesser.c
diff --git
a/src/data/format-guesser.c
b/src/data/format-guesser.c
index 26c917b824ce77733409ecb27885fd7d7d0e55eb..17c5da90ceb8b2f74012889a3bcd036a798ef799 100644
(file)
--- a/
src/data/format-guesser.c
+++ b/
src/data/format-guesser.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008
, 2010, 2011
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-16,19
+16,19
@@
#include <config.h>
#include <config.h>
-#include "format-guesser.h"
+#include "
data/
format-guesser.h"
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
-#include "c-ctype.h"
-#include "minmax.h"
-#include "xalloc.h"
+#include "data/format.h"
+#include "data/settings.h"
+#include "libpspp/assertion.h"
+#include "libpspp/str.h"
-#include <data/format.h>
-#include <data/settings.h>
-#include <libpspp/assertion.h>
-#include <libpspp/str.h>
+#include "gl/c-ctype.h"
+#include "gl/minmax.h"
+#include "gl/xalloc.h"
/* A token in which potential date or time fields are broken.
/* A token in which potential date or time fields are broken.
@@
-304,12
+304,12
@@
add_numeric (struct fmt_guesser *g, struct substring s)
int c;
/* Skip leading "$" and optional following white space. */
int c;
/* Skip leading "$" and optional following white space. */
- has_dollar = ss_match_
char
(&s, '$');
+ has_dollar = ss_match_
byte
(&s, '$');
if (has_dollar)
ss_ltrim (&s, ss_cstr (CC_SPACES));
/* Skip optional sign. */
if (has_dollar)
ss_ltrim (&s, ss_cstr (CC_SPACES));
/* Skip optional sign. */
- ss_match_
char
_in (&s, ss_cstr ("+-"));
+ ss_match_
byte
_in (&s, ss_cstr ("+-"));
/* Skip digits punctuated by commas and dots. We don't know
whether the decimal point is a comma or a dot, so for now we
/* Skip digits punctuated by commas and dots. We don't know
whether the decimal point is a comma or a dot, so for now we
@@
-348,10
+348,10
@@
add_numeric (struct fmt_guesser *g, struct substring s)
}
/* Skip the optional exponent. */
}
/* Skip the optional exponent. */
- has_exp = ss_match_
char
_in (&s, ss_cstr ("eEdD")) != EOF;
- has_exp_sign = ss_match_
char
_in (&s, ss_cstr ("-+")) != EOF;
+ has_exp = ss_match_
byte
_in (&s, ss_cstr ("eEdD")) != EOF;
+ has_exp_sign = ss_match_
byte
_in (&s, ss_cstr ("-+")) != EOF;
if (has_exp_sign)
if (has_exp_sign)
- ss_match_
char
(&s, ' ');
+ ss_match_
byte
(&s, ' ');
exp_digits = ss_ltrim (&s, ss_cstr (CC_DIGITS));
if ((has_exp || has_exp_sign) && !exp_digits)
{
exp_digits = ss_ltrim (&s, ss_cstr (CC_DIGITS));
if ((has_exp || has_exp_sign) && !exp_digits)
{
@@
-361,7
+361,7
@@
add_numeric (struct fmt_guesser *g, struct substring s)
}
/* Skip optional '%'. */
}
/* Skip optional '%'. */
- has_percent = ss_match_
char
(&s, '%');
+ has_percent = ss_match_
byte
(&s, '%');
if (has_dollar && has_percent)
{
/* A valid number cannot have both '$' and '%'. */
if (has_dollar && has_percent)
{
/* A valid number cannot have both '$' and '%'. */
@@
-635,7
+635,7
@@
parse_date_token (struct substring *s, enum date_token tokens_seen,
ss_advance (s, 1);
token = recognize_identifier_token (s);
if (token)
ss_advance (s, 1);
token = recognize_identifier_token (s);
if (token)
- ss_match_
char
_in (s, ss_cstr (CC_SPACES));
+ ss_match_
byte
_in (s, ss_cstr (CC_SPACES));
else
token = DT_DELIM | DT_SPACE;
return token;
else
token = DT_DELIM | DT_SPACE;
return token;
@@
-666,7
+666,7
@@
parse_date_number (struct substring *s, enum date_token tokens_seen,
size_t digit_cnt = ss_get_long (s, &value);
enum date_token token = 0;
size_t digit_cnt = ss_get_long (s, &value);
enum date_token token = 0;
- if (ss_match_
char
(s, settings_get_decimal_char (FMT_F))
+ if (ss_match_
byte
(s, settings_get_decimal_char (FMT_F))
&& tokens_seen & DT_COLON
&& value <= 59)
{
&& tokens_seen & DT_COLON
&& value <= 59)
{