projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add random access to casefiles, for use in GUI.
[pspp]
/
src
/
data
/
value.h
diff --git
a/src/data/value.h
b/src/data/value.h
index 1fac59966657a8709b2811e967df99c7edd9a0f2..fccd8a98cd4e0093928f1bf5178aa4f42ea5f9ff 100644
(file)
--- a/
src/data/value.h
+++ b/
src/data/value.h
@@
-27,34
+27,32
@@
/* Values. */
/* Max length of a short string value, generally 8 chars. */
/* Values. */
/* Max length of a short string value, generally 8 chars. */
-#define MAX_SHORT_STRING ((SIZEOF_DOUBLE)>=8 ? ((SIZEOF_DOUBLE)+1)/2*2 : 8)
-#define MIN_LONG_STRING (MAX_SHORT_STRING+1)
+#define MAX_SHORT_STRING ( (SIZEOF_DOUBLE)>=8 ? (SIZEOF_DOUBLE + 1)/2 * 2 : 8 )
+
+#define MIN_LONG_STRING (MAX_SHORT_STRING + 1)
/* Max string length. */
/* Max string length. */
-#define MAX_STRING 255
+#define MAX_LONG_STRING 255
+
+/* This nonsense is required for SPSS compatibility */
+#define EFFECTIVE_LONG_STRING_LENGTH (MAX_LONG_STRING - 3)
+
+#define MAX_VERY_LONG_STRING 32767
+
+#define MAX_STRING MAX_VERY_LONG_STRING
+
/* Special values. */
#define SYSMIS (-DBL_MAX)
#define LOWEST second_lowest_value
#define HIGHEST DBL_MAX
/* Special values. */
#define SYSMIS (-DBL_MAX)
#define LOWEST second_lowest_value
#define HIGHEST DBL_MAX
-/*
Describes one value, which is either a floating-point number or a
-
short
string. */
+/*
A numeric or short string value.
+
Multiple consecutive values represent a long
string. */
union value
{
union value
{
- /* A numeric value. */
double f;
double f;
-
- /* A short-string value. */
char s[MAX_SHORT_STRING];
char s[MAX_SHORT_STRING];
-
- /* Used by evaluate_expression() to return a string result.
- As currently implemented, it's a pointer to a dynamic
- buffer in the appropriate expression.
-
- Also used by the AGGREGATE procedure in handling string
- values. */
- char *c;
};
/* Maximum number of `union value's in a single number or string
};
/* Maximum number of `union value's in a single number or string