X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Ft-test.q;h=8446f8355e50afcf00c8d9826064f2ef317cd498;hb=1f93f78ae82897f5c3cf0d83206e0982d06e9226;hp=5f5fc56f021d1ba60d125a8b23561b6dae79031b;hpb=537fdeb3702c011e05d7826a8d556a7beeba2605;p=pspp-builds.git diff --git a/src/language/stats/t-test.q b/src/language/stats/t-test.q index 5f5fc56f..8446f835 100644 --- a/src/language/stats/t-test.q +++ b/src/language/stats/t-test.q @@ -240,11 +240,6 @@ static void calculate (struct cmd_t_test *, static int mode; -static struct cmd_t_test cmd; - -static bool bad_weight_warn = false; - - static int compare_group_binary (const struct group_statistics *a, const struct group_statistics *b, const struct group_properties *p); @@ -258,6 +253,7 @@ static unsigned hash_group_binary (const struct group_statistics *g, int cmd_t_test (struct lexer *lexer, struct dataset *ds) { + struct cmd_t_test cmd; struct casegrouper *grouper; struct casereader *group; bool ok; @@ -338,8 +334,6 @@ cmd_t_test (struct lexer *lexer, struct dataset *ds) return CMD_FAILURE; } - bad_weight_warn = true; - /* Data pass. */ grouper = casegrouper_create_splits (proc_open (ds), dataset_dict (ds)); while (casegrouper_get_next_group (grouper, &group)) @@ -409,7 +403,7 @@ tts_custom_groups (struct lexer *lexer, struct dataset *ds, struct cmd_t_test *c } } - if (!parse_value (lexer, &gp.v.g_value[0], var_get_type (indep_var))) + if (!parse_value (lexer, &gp.v.g_value[0], var_get_width (indep_var))) return 0; lex_match (lexer, ','); @@ -428,7 +422,7 @@ tts_custom_groups (struct lexer *lexer, struct dataset *ds, struct cmd_t_test *c return 1; } - if (!parse_value (lexer, &gp.v.g_value[1], var_get_type (indep_var))) + if (!parse_value (lexer, &gp.v.g_value[1], var_get_width (indep_var))) return 0; n_group_values = 2; @@ -749,15 +743,15 @@ ssbox_independent_samples_populate (struct ssbox *ssb, const char *s; s = var_lookup_value_label (indep_var, &gp.v.g_value[0]); - val_lab[0] = s ? strdup (s) : NULL; + val_lab[0] = s ? xstrdup (s) : NULL; s = var_lookup_value_label (indep_var, &gp.v.g_value[1]); - val_lab[1] = s ? strdup (s) : NULL; + val_lab[1] = s ? xstrdup (s) : NULL; } else { - val_lab[0] = calloc (sizeof (char), MAX_SHORT_STRING + 1); - val_lab[1] = calloc (sizeof (char), MAX_SHORT_STRING + 1); + val_lab[0] = xcalloc (sizeof (char), MAX_SHORT_STRING + 1); + val_lab[1] = xcalloc (sizeof (char), MAX_SHORT_STRING + 1); memcpy (val_lab[0], gp.v.g_value[0].s, MAX_SHORT_STRING); memcpy (val_lab[1], gp.v.g_value[1].s, MAX_SHORT_STRING); }