- /* This member is used by data-in.c to return a string result,
- since it may need to return a long string. As currently
- implemented, it's a pointer to a static internal buffer in
- data-in.c.
-
- Also 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. */
- unsigned char *c;
-
- /* Sometimes we insert value's in a hash table. */
- unsigned long hash[SIZEOF_DOUBLE / SIZEOF_LONG];
- };
-
-/* Describes one value label. */
-struct value_label
- {
- union value v; /* The value being labeled. */
- char *s; /* Pointer to malloc()'d label. */
- int ref_count; /* Reference count. */
- };
-\f
-/* Frequency tables. */
-
-/* Frequency table entry. */
-struct freq
- {
- union value v; /* The value. */
- double c; /* The number of occurrences of the value. */
- };
-
-/* Types of frequency tables. */
-enum
- {
- FRQM_GENERAL,
- FRQM_INTEGER
- };
-
-/* Entire frequency table. */
-struct freq_tab
- {
- int mode; /* FRQM_GENERAL or FRQM_INTEGER. */
-
- /* General mode. */
- struct avl_tree *tree; /* Undifferentiated data. */
-
- /* Integer mode. */
- double *vector; /* Frequencies proper. */
- int min, max; /* The boundaries of the table. */
- double out_of_range; /* Sum of weights of out-of-range values. */
- double sysmis; /* Sum of weights of SYSMIS values. */
-
- /* All modes. */
- struct freq *valid; /* Valid freqs. */
- int n_valid; /* Number of total freqs. */
-
- struct freq *missing; /* Missing freqs. */
- int n_missing; /* Number of missing freqs. */
-
- /* Statistics. */
- double total_cases; /* Sum of weights of all cases. */
- double valid_cases; /* Sum of weights of valid cases. */
- };
-
-/* A complete set of 3 frequency tables. */
-struct freq_tab_set
- {
- struct freq_tab miss; /* Includes user-missing values. */
- struct freq_tab no_miss; /* Excludes user-missing values. */
- struct freq_tab sel; /* Identical to either miss or no_miss. */
- };
-\f
-/* Procedures' private per-variable data. */
-
-/* Structure name suffixes for private data:
- _proc: for a procedure (i.e., LIST -> list_proc).
- _trns: for a transformation (i.e., COMPUTE -> compute_trns.
- _pgm: for an input program (i.e., DATA LIST -> data_list_pgm). */
-
-/* CROSSTABS private data. */
-struct crosstab_proc
- {
- /* Integer mode only. */
- int min; /* Minimum value. */
- int max; /* Maximum value + 1. */
- int count; /* max - min. */
- };
-
-/* FREQUENCIES private data. */
-enum
- {
- frq_mean = 0, frq_semean, frq_median, frq_mode, frq_stddev, frq_variance,
- frq_kurt, frq_sekurt, frq_skew, frq_seskew, frq_range, frq_min, frq_max,
- frq_sum, frq_n_stats
- };
-
-struct frequencies_proc
- {
- /* General mode. */
- struct freq_tab tab; /* Frequencies table to use. */
-
- /* Percentiles. */
- int n_groups; /* Number of groups. */
- double *groups; /* Groups. */
-
- /* Statistics. */
- double stat[frq_n_stats];
- };
-
-/* LIST private data. */
-struct list_proc
- {
- int newline; /* Whether a new line begins here. */
- int width; /* Field width. */
- int vert; /* Whether to print the varname vertically. */
- };
-
-/* DESCRIPTIVES private data. Note that the DESCRIPTIVES procedure also
- has a transformation, descriptives_trns. */
-enum
- {
- /* As these are used as bit indexes, there must be 32 or fewer.
- Be very careful in adjusting these, see the structure below
- and the table in descriptives.q. */
- dsc_mean = 0, dsc_semean, dsc_stddev, dsc_variance, dsc_kurt,
- dsc_sekurt, dsc_skew, dsc_seskew, dsc_range, dsc_min,
- dsc_max, dsc_sum, dsc_n_stats
- };
-
-struct descriptives_proc
- {
- /* Miscellaneous. */
- int dup; /* Finds duplicates in list of
- variables. */
- char zname[10]; /* Name for z-score variable. */
-
- /* Counts. */
- double valid, miss; /* Valid, missing--general. */
-
- /* Mean, moments about the mean. */
- double X_bar, M2, M3, M4;
- double min, max;
-
- /* Statistics. */
- double stats[dsc_n_stats]; /* Everything glommed together. */
- };
-
-/* GET private data. */
-struct get_proc
- {
- int fv, nv; /* First, last, # of values. */
- };
-
-/* Sort order. */
-enum
- {
- SRT_ASCEND, /* A, B, C, ..., X, Y, Z. */
- SRT_DESCEND /* Z, Y, X, ..., C, B, A. */
- };
-
-/* SORT CASES private data. */
-struct sort_cases_proc
- {
- int order; /* SRT_ASCEND or SRT_DESCEND. */
- };
-
-/* MODIFY VARS private data. */
-struct modify_vars_proc
- {
- char new_name[9]; /* Variable's new name. */
- int drop_this_var; /* 0=keep this var, 1=drop this var. */
- struct variable *next; /* Next in linked list. */
- };
-
-/* MEANS private data. */
-struct means_proc
- {
- double min, max; /* Range for integer mode. */
- };
-
-/* Different types of variables for MATRIX DATA procedure. Order is
- important: these are used for sort keys. */
-enum
- {
- MXD_SPLIT, /* SPLIT FILE variables. */
- MXD_ROWTYPE, /* ROWTYPE_. */
- MXD_FACTOR, /* Factor variables. */
- MXD_VARNAME, /* VARNAME_. */
- MXD_CONTINUOUS, /* Continuous variables. */
-
- MXD_COUNT
- };