projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed the parsing of subcommands, such that the (n) setting is optional
[pspp]
/
src
/
var.h
diff --git
a/src/var.h
b/src/var.h
index 21b23faccf040a9282fe97a3747feb4ba2613a4b..c1ad04c5ef2803560c8ce02bc27b681078b193ad 100644
(file)
--- a/
src/var.h
+++ b/
src/var.h
@@
-22,7
+22,7
@@
#include <stddef.h>
#include "format.h"
#include <stddef.h>
#include "format.h"
-#include "
t-test
.h"
+#include "
group_proc
.h"
#include "val.h"
/* Frequency tables. */
#include "val.h"
/* Frequency tables. */
@@
-219,7
+219,7
@@
struct variable
struct means_proc mns;
struct matrix_data_proc mxd;
struct match_files_proc mtf;
struct means_proc mns;
struct matrix_data_proc mxd;
struct match_files_proc mtf;
- struct
t_test_proc t_t
;
+ struct
group_proc grp_data
;
}
p;
};
}
p;
};
@@
-247,22
+247,6
@@
struct vector
int cnt; /* Number of variables. */
};
\f
int cnt; /* Number of variables. */
};
\f
-/* Cases. */
-
-/* A single case. (This doesn't need to be a struct anymore, but it
- remains so for hysterical raisins.) */
-struct ccase
- {
- union value data[1];
- };
-
-/* Linked list of cases. */
-struct case_list
- {
- struct case_list *next;
- struct ccase c;
- };
-
\f
/* Dictionary. */
/* Complete dictionary state. */
/* Dictionary. */
/* Complete dictionary state. */
@@
-300,8
+284,10
@@
int dict_rename_vars (struct dictionary *,
struct variable **, char **new_names,
size_t count, char **err_name);
struct variable **, char **new_names,
size_t count, char **err_name);
+struct ccase;
struct variable *dict_get_weight (const struct dictionary *);
struct variable *dict_get_weight (const struct dictionary *);
-double dict_get_case_weight (const struct dictionary *, const struct ccase *);
+double dict_get_case_weight (const struct dictionary *,
+ const struct ccase *, int *);
void dict_set_weight (struct dictionary *, struct variable *);
struct variable *dict_get_filter (const struct dictionary *);
void dict_set_weight (struct dictionary *, struct variable *);
struct variable *dict_get_filter (const struct dictionary *);
@@
-413,12
+399,14
@@
void cancel_transformations (void);
\f
struct var_set;
\f
struct var_set;
-struct var_set *var_set_create_from_dict (struct dictionary *d);
-struct var_set *var_set_create_from_array (struct variable **var, size_t);
+struct var_set *var_set_create_from_dict (const struct dictionary *d);
+struct var_set *var_set_create_from_array (struct variable *const *var,
+ size_t);
-size_t var_set_get_cnt (struct var_set *vs);
-struct variable *var_set_get_var (struct var_set *vs, size_t idx);
-struct variable *var_set_lookup_var (struct var_set *vs, const char *name);
+size_t var_set_get_cnt (const struct var_set *vs);
+struct variable *var_set_get_var (const struct var_set *vs, size_t idx);
+struct variable *var_set_lookup_var (const struct var_set *vs,
+ const char *name);
void var_set_destroy (struct var_set *vs);
\f
/* Variable parsers. */
void var_set_destroy (struct var_set *vs);
\f
/* Variable parsers. */
@@
-433,16
+421,25
@@
enum
PV_NUMERIC = 0020, /* Vars must be numeric. */
PV_STRING = 0040, /* Vars must be string. */
PV_SAME_TYPE = 00100, /* All vars must be the same type. */
PV_NUMERIC = 0020, /* Vars must be numeric. */
PV_STRING = 0040, /* Vars must be string. */
PV_SAME_TYPE = 00100, /* All vars must be the same type. */
- PV_NO_SCRATCH = 00200
,
/* Disallow scratch variables. */
+ PV_NO_SCRATCH = 00200
/* Disallow scratch variables. */
};
struct variable *parse_variable (void);
};
struct variable *parse_variable (void);
-struct variable *parse_dict_variable (struct dictionary *);
-int parse_variables (struct dictionary *, struct variable ***, int *,
+struct variable *parse_dict_variable (
const
struct dictionary *);
+int parse_variables (
const
struct dictionary *, struct variable ***, int *,
int opts);
int opts);
-int parse_var_set_vars (struct var_set *, struct variable ***, int *,
+int parse_var_set_vars (
const
struct var_set *, struct variable ***, int *,
int opts);
int parse_DATA_LIST_vars (char ***names, int *cnt, int opts);
int parse_mixed_vars (char ***names, int *cnt, int opts);
int opts);
int parse_DATA_LIST_vars (char ***names, int *cnt, int opts);
int parse_mixed_vars (char ***names, int *cnt, int opts);
+
+
+/* Return a string representing this variable, in the form most
+ appropriate from a human factors perspective.
+ (IE: the label if it has one, otherwise the name )
+*/
+const char * var_to_string(const struct variable *var);
+
+
#endif /* !var_h */
#endif /* !var_h */