projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change enum legacy_encoding to const char *.
[pspp-builds.git]
/
src
/
data
/
data-in.c
diff --git
a/src/data/data-in.c
b/src/data/data-in.c
index eda6d1258f729b8d05352fb71fe1a24a0cdb1ef6..e7a83f25b44a5f7a55d2c46e20aed4dc7785e40e 100644
(file)
--- a/
src/data/data-in.c
+++ b/
src/data/data-in.c
@@
-53,7
+53,7
@@
/* Information about parsing one data field. */
struct data_in
{
/* Information about parsing one data field. */
struct data_in
{
-
enum legacy_encoding encoding;
/* Encoding of source. */
+
const char *encoding;
/* Encoding of source. */
struct substring input; /* Source. */
enum fmt_type format; /* Input format. */
int implied_decimals; /* Number of implied decimal places. */
struct substring input; /* Source. */
enum fmt_type format; /* Input format. */
int implied_decimals; /* Number of implied decimal places. */
@@
-100,7
+100,7
@@
static int hexit_value (int c);
FIRST_COLUMN plus the length of the input because of the
possibility of escaped quotes in strings, etc.) */
bool
FIRST_COLUMN plus the length of the input because of the
possibility of escaped quotes in strings, etc.) */
bool
-data_in (struct substring input,
enum legacy_encoding
encoding,
+data_in (struct substring input,
const char *
encoding,
enum fmt_type format, int implied_decimals,
int first_column, int last_column, union value *output, int width)
{
enum fmt_type format, int implied_decimals,
int first_column, int last_column, union value *output, int width)
{
@@
-116,7
+116,7
@@
data_in (struct substring input, enum legacy_encoding encoding,
assert ((width != 0) == fmt_is_string (format));
assert ((width != 0) == fmt_is_string (format));
- if (
encoding == LEGACY_NATIVE
+ if (
0 == strcmp (encoding, LEGACY_NATIVE)
|| fmt_get_category (format) & (FMT_CAT_BINARY | FMT_CAT_STRING))
{
i.input = input;
|| fmt_get_category (format) & (FMT_CAT_BINARY | FMT_CAT_STRING))
{
i.input = input;
@@
-639,7
+639,7
@@
parse_AHEX (struct data_in *i)
return false;
}
return false;
}
- if (
i->encoding != LEGACY_NATIVE
)
+ if (
0 != strcmp (i->encoding, LEGACY_NATIVE)
)
{
hi = legacy_to_native (i->encoding, hi);
lo = legacy_to_native (i->encoding, lo);
{
hi = legacy_to_native (i->encoding, hi);
lo = legacy_to_native (i->encoding, lo);