X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Fmatrix-data.c;h=5c8e011b26d683a1bdda1d38d5400c5eff01ab81;hb=8eac4df36306cd357bba29ffbfaddc537fc0be47;hp=8dc3f00a929ccab93b62b55d980cd1dff19dc4de;hpb=a19b858e0ac3c69e4a28c0ca6d8674427268a863;p=pspp-builds.git diff --git a/src/language/data-io/matrix-data.c b/src/language/data-io/matrix-data.c index 8dc3f00a..5c8e011b 100644 --- a/src/language/data-io/matrix-data.c +++ b/src/language/data-io/matrix-data.c @@ -18,32 +18,37 @@ 02110-1301, USA. */ #include -#include + #include #include #include -#include -#include + +#include #include -#include -#include #include -#include #include -#include +#include +#include +#include +#include #include #include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include + +#include "size_max.h" #include "gettext.h" #define _(msgid) gettext (msgid) -#include - /* FIXME: /N subcommand not implemented. It should be pretty simple, too. */ @@ -110,7 +115,7 @@ static const int content_type[PROX + 1] = }; /* Name of each content type. */ -static const char *content_names[PROX + 1] = +static const char *const content_names[PROX + 1] = { "N", "N", "N_MATRIX", "MEAN", "STDDEV", "COUNT", "MSE", "DFE", "MAT", "COV", "CORR", "PROX", @@ -147,7 +152,7 @@ struct matrix_data_pgm /* Continuous variables. */ int n_continuous; /* Number of continuous variables. */ - int first_continuous; /* Index into default_dict.var of + int first_continuous; /* Index into dataset_dict (current_dataset).var of first continuous variable. */ }; @@ -178,7 +183,7 @@ cmd_matrix_data (void) unsigned seen = 0; - discard_variables (); + discard_variables (current_dataset); pool = pool_create (); mx = pool_alloc (pool, sizeof *mx); @@ -243,7 +248,7 @@ cmd_matrix_data (void) if (strcasecmp (v[i], "ROWTYPE_")) { - new_var = dict_create_var_assert (default_dict, v[i], 0); + new_var = dict_create_var_assert (dataset_dict (current_dataset), v[i], 0); attach_mxd_aux (new_var, MXD_CONTINUOUS, i); } else @@ -253,7 +258,7 @@ cmd_matrix_data (void) free (v); } - mx->rowtype_ = dict_create_var_assert (default_dict, + mx->rowtype_ = dict_create_var_assert (dataset_dict (current_dataset), "ROWTYPE_", 8); attach_mxd_aux (mx->rowtype_, MXD_ROWTYPE, 0); } @@ -308,7 +313,7 @@ cmd_matrix_data (void) goto lossage; } - if (dict_lookup_var (default_dict, tokid) == NULL + if (dict_lookup_var (dataset_dict (current_dataset), tokid) == NULL && (lex_look_ahead () == '.' || lex_look_ahead () == '/')) { if (!strcasecmp (tokid, "ROWTYPE_") @@ -319,27 +324,27 @@ cmd_matrix_data (void) goto lossage; } - mx->single_split = dict_create_var_assert (default_dict, + mx->single_split = dict_create_var_assert (dataset_dict (current_dataset), tokid, 0); attach_mxd_aux (mx->single_split, MXD_CONTINUOUS, 0); lex_get (); - dict_set_split_vars (default_dict, &mx->single_split, 1); + dict_set_split_vars (dataset_dict (current_dataset), &mx->single_split, 1); } else { struct variable **split; size_t n; - if (!parse_variables (default_dict, &split, &n, PV_NO_DUPLICATE)) + if (!parse_variables (dataset_dict (current_dataset), &split, &n, PV_NO_DUPLICATE)) goto lossage; - dict_set_split_vars (default_dict, split, n); + dict_set_split_vars (dataset_dict (current_dataset), split, n); } { - struct variable *const *split = dict_get_split_vars (default_dict); - size_t split_cnt = dict_get_split_cnt (default_dict); + struct variable *const *split = dict_get_split_vars (dataset_dict (current_dataset)); + size_t split_cnt = dict_get_split_cnt (dataset_dict (current_dataset)); int i; for (i = 0; i < split_cnt; i++) @@ -368,7 +373,7 @@ cmd_matrix_data (void) } seen |= 4; - if (!parse_variables (default_dict, &mx->factors, &mx->n_factors, + if (!parse_variables (dataset_dict (current_dataset), &mx->factors, &mx->n_factors, PV_NONE)) goto lossage; @@ -567,7 +572,7 @@ cmd_matrix_data (void) } /* Create VARNAME_. */ - mx->varname_ = dict_create_var_assert (default_dict, "VARNAME_", 8); + mx->varname_ = dict_create_var_assert (dataset_dict (current_dataset), "VARNAME_", 8); attach_mxd_aux (mx->varname_, MXD_VARNAME, 0); /* Sort the dictionary variables into the desired order for the @@ -576,9 +581,9 @@ cmd_matrix_data (void) struct variable **v; size_t nv; - dict_get_vars (default_dict, &v, &nv, 0); + dict_get_vars (dataset_dict (current_dataset), &v, &nv, 0); qsort (v, nv, sizeof *v, compare_variables_by_mxd_var_type); - dict_reorder_vars (default_dict, v, nv); + dict_reorder_vars (dataset_dict (current_dataset), v, nv); free (v); } @@ -596,9 +601,9 @@ cmd_matrix_data (void) int i; mx->first_continuous = -1; - for (i = 0; i < dict_get_var_cnt (default_dict); i++) + for (i = 0; i < dict_get_var_cnt (dataset_dict (current_dataset)); i++) { - struct variable *v = dict_get_var (default_dict, i); + struct variable *v = dict_get_var (dataset_dict (current_dataset), i); struct mxd_var *mv = v->aux; int type = mv->var_type; @@ -634,7 +639,7 @@ cmd_matrix_data (void) return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE; lossage: - discard_variables (); + discard_variables (current_dataset); free (mx->factors); pool_destroy (mx->container); return CMD_CASCADING_FAILURE; @@ -750,7 +755,7 @@ mdump_token (const struct matrix_token *token) printf (" '%.*s'", token->length, token->string); break; default: - assert (0); + NOT_REACHED (); } fflush (stdout); } @@ -768,138 +773,115 @@ mget_token_dump (struct matrix_token *token, struct dfm_reader *reader) static const char * context (struct dfm_reader *reader) { - static char buf[32]; + static struct string buf = DS_EMPTY_INITIALIZER; + ds_clear (&buf); if (dfm_eof (reader)) - strcpy (buf, "at end of file"); + ds_assign_cstr (&buf, "at end of file"); else { - struct fixed_string line; - const char *sp; + struct substring p; - dfm_get_record (reader, &line); - sp = ls_c_str (&line); - while (sp < ls_end (&line) && isspace ((unsigned char) *sp)) - sp++; - if (sp >= ls_end (&line)) - strcpy (buf, "at end of line"); + p = dfm_get_record (reader); + ss_ltrim (&p, ss_cstr (CC_SPACES)); + if (ss_is_empty (p)) + ds_assign_cstr (&buf, "at end of line"); else - { - char *dp; - size_t copy_cnt = 0; - - dp = stpcpy (buf, "before `"); - while (sp < ls_end (&line) && !isspace ((unsigned char) *sp) - && copy_cnt < 10) - { - *dp++ = *sp++; - copy_cnt++; - } - strcpy (dp, "'"); - } + ds_put_format (&buf, "before `%.*s'", + (int) ss_cspan (p, ss_cstr (CC_SPACES)), ss_data (p)); } - return buf; + return ds_cstr (&buf); } /* Is there at least one token left in the data file? */ -static int +static bool another_token (struct dfm_reader *reader) { for (;;) { - struct fixed_string line; - const char *cp; + struct substring p; + size_t space_cnt; if (dfm_eof (reader)) - return 0; - dfm_get_record (reader, &line); - - cp = ls_c_str (&line); - while (isspace ((unsigned char) *cp) && cp < ls_end (&line)) - cp++; + return false; - if (cp < ls_end (&line)) + p = dfm_get_record (reader); + space_cnt = ss_span (p, ss_cstr (CC_SPACES)); + if (space_cnt < ss_length (p)) { - dfm_forward_columns (reader, cp - ls_c_str (&line)); - return 1; + dfm_forward_columns (reader, space_cnt); + return true; } dfm_forward_record (reader); } + NOT_REACHED(); } /* Parse a MATRIX DATA token from READER into TOKEN. */ static int (mget_token) (struct matrix_token *token, struct dfm_reader *reader) { - struct fixed_string line; - int first_column; - char *cp; + struct substring line, p; + struct substring s; + int c; if (!another_token (reader)) return 0; - dfm_get_record (reader, &line); - first_column = dfm_column_start (reader); + line = p = dfm_get_record (reader); /* Three types of fields: quoted with ', quoted with ", unquoted. */ - cp = ls_c_str (&line); - if (*cp == '\'' || *cp == '"') + c = ss_first (p); + if (c == '\'' || c == '"') { - int quote = *cp; - - token->type = MSTR; - token->string = ++cp; - while (cp < ls_end (&line) && *cp != quote) - cp++; - token->length = cp - token->string; - if (cp < ls_end (&line)) - cp++; - else - msg (SW, _("Scope of string exceeds line.")); + ss_get_char (&p); + if (!ss_get_until (&p, c, &s)) + msg (SW, _("Scope of string exceeds line.")); } else { - int is_num = isdigit ((unsigned char) *cp) || *cp == '.'; - - token->string = cp++; - while (cp < ls_end (&line) - && !isspace ((unsigned char) *cp) && *cp != ',' - && *cp != '-' && *cp != '+') - { - if (isdigit ((unsigned char) *cp)) - is_num = 1; - - if ((tolower ((unsigned char) *cp) == 'd' - || tolower ((unsigned char) *cp) == 'e') - && (cp[1] == '+' || cp[1] == '-')) - cp += 2; - else - cp++; - } + bool is_num = isdigit (c) || c == '.'; + const char *start = ss_data (p); - token->length = cp - token->string; - assert (token->length); + for (;;) + { + c = ss_first (p); + if (strchr (CC_SPACES ",-+", c) != NULL) + break; + + if (isdigit (c)) + is_num = true; + if (strchr ("deDE", c) && strchr ("+-", ss_at (p, 1))) + { + is_num = true; + ss_advance (&p, 2); + } + else + ss_advance (&p, 1); + } + s = ss_buffer (start, ss_data (p) - start); if (is_num) { struct data_in di; - di.s = token->string; - di.e = token->string + token->length; + di.s = ss_data (s); + di.e = ss_end (s); di.v = (union value *) &token->number; - di.f1 = first_column; + di.f1 = dfm_get_column (reader, di.s); di.format = make_output_format (FMT_F, token->length, 0); - if (!data_in (&di)) - return 0; + data_in (&di); } else token->type = MSTR; } - - dfm_forward_columns (reader, cp - ls_c_str (&line)); + token->string = ss_data (s); + token->length = ss_length (s); + + dfm_reread_record (reader, dfm_get_column (reader, ss_end (s))); return 1; } @@ -909,18 +891,13 @@ static int static int force_eol (struct dfm_reader *reader, const char *content) { - struct fixed_string line; - const char *cp; + struct substring p; if (dfm_eof (reader)) return 0; - dfm_get_record (reader, &line); - cp = ls_c_str (&line); - while (isspace ((unsigned char) *cp) && cp < ls_end (&line)) - cp++; - - if (cp < ls_end (&line)) + p = dfm_get_record (reader); + if (ss_span (p, ss_cstr (CC_SPACES)) != ss_length (p)) { msg (SE, _("End of line expected %s while reading %s."), context (reader), content); @@ -943,8 +920,8 @@ struct nr_aux_data double *split_values; /* SPLIT FILE variable values. */ }; -static int nr_read_splits (struct nr_aux_data *, int compare); -static int nr_read_factors (struct nr_aux_data *, int cell); +static bool nr_read_splits (struct nr_aux_data *, int compare); +static bool nr_read_factors (struct nr_aux_data *, int cell); static bool nr_output_data (struct nr_aux_data *, struct ccase *, write_case_func *, write_case_data); static bool matrix_data_read_without_rowtype (struct case_source *source, @@ -968,12 +945,13 @@ read_matrices_without_rowtype (struct matrix_data_pgm *mx) nr.factor_values = xnmalloc (mx->n_factors * mx->cells, sizeof *nr.factor_values); nr.max_cell_idx = 0; - nr.split_values = xnmalloc (dict_get_split_cnt (default_dict), + nr.split_values = xnmalloc (dict_get_split_cnt (dataset_dict (current_dataset)), sizeof *nr.split_values); - vfm_source = create_case_source (&matrix_data_without_rowtype_source_class, &nr); + proc_set_source (current_dataset, create_case_source ( + &matrix_data_without_rowtype_source_class, &nr)); - ok = procedure (NULL, NULL); + ok = procedure (current_dataset,NULL, NULL); free (nr.split_values); free (nr.factor_values); @@ -1090,16 +1068,14 @@ nr_read_data_lines (struct nr_aux_data *nr, n_cols = mx->n_continuous; break; default: - assert (0); - abort (); + NOT_REACHED (); } break; case 2: n_cols = 1; break; default: - assert (0); - abort (); + NOT_REACHED (); } { @@ -1113,7 +1089,7 @@ nr_read_data_lines (struct nr_aux_data *nr, if (token.type != MNUM) { msg (SE, _("expecting value for %s %s"), - dict_get_var (default_dict, j)->name, + dict_get_var (dataset_dict (current_dataset), j)->name, context (mx->reader)); return 0; } @@ -1123,7 +1099,6 @@ nr_read_data_lines (struct nr_aux_data *nr, if (mx->fmt != FREE && !force_eol (mx->reader, content_names[content])) return 0; - debug_printf (("\n")); } if (mx->section == LOWER) @@ -1231,16 +1206,16 @@ matrix_data_read_without_rowtype (struct case_source *source, if (!nr_output_data (nr, c, write_case, wc_data)) return false; - if (dict_get_split_cnt (default_dict) == 0 + if (dict_get_split_cnt (dataset_dict (current_dataset)) == 0 || !another_token (mx->reader)) return true; } } /* Read the split file variables. If COMPARE is 1, compares the - values read to the last values read and returns 1 if they're equal, - 0 otherwise. */ -static int + values read to the last values read and returns true if they're equal, + false otherwise. */ +static bool nr_read_splits (struct nr_aux_data *nr, int compare) { struct matrix_data_pgm *mx = nr->mx; @@ -1251,36 +1226,36 @@ nr_read_splits (struct nr_aux_data *nr, int compare) if (compare && just_read) { just_read = 0; - return 1; + return true; } - if (dict_get_split_vars (default_dict) == NULL) - return 1; + if (dict_get_split_vars (dataset_dict (current_dataset)) == NULL) + return true; if (mx->single_split) { if (!compare) { - struct mxd_var *mv = dict_get_split_vars (default_dict)[0]->aux; + struct mxd_var *mv = dict_get_split_vars (dataset_dict (current_dataset))[0]->aux; nr->split_values[0] = ++mv->sub_type; } - return 1; + return true; } if (!compare) just_read = 1; - split_cnt = dict_get_split_cnt (default_dict); + split_cnt = dict_get_split_cnt (dataset_dict (current_dataset)); for (i = 0; i < split_cnt; i++) { struct matrix_token token; if (!mget_token (&token, mx->reader)) - return 0; + return false; if (token.type != MNUM) { msg (SE, _("Syntax error expecting SPLIT FILE value %s."), context (mx->reader)); - return 0; + return false; } if (!compare) @@ -1289,32 +1264,32 @@ nr_read_splits (struct nr_aux_data *nr, int compare) { msg (SE, _("Expecting value %g for %s."), nr->split_values[i], - dict_get_split_vars (default_dict)[i]->name); - return 0; + dict_get_split_vars (dataset_dict (current_dataset))[i]->name); + return false; } } - return 1; + return true; } /* Read the factors for cell CELL. If COMPARE is 1, compares the - values read to the last values read and returns 1 if they're equal, - 0 otherwise. */ -static int + values read to the last values read and returns true if they're equal, + false otherwise. */ +static bool nr_read_factors (struct nr_aux_data *nr, int cell) { struct matrix_data_pgm *mx = nr->mx; - int compare; + bool compare; if (mx->n_factors == 0) - return 1; + return true; assert (nr->max_cell_idx >= cell); if (cell != nr->max_cell_idx) - compare = 1; + compare = true; else { - compare = 0; + compare = false; nr->max_cell_idx++; } @@ -1325,12 +1300,12 @@ nr_read_factors (struct nr_aux_data *nr, int cell) { struct matrix_token token; if (!mget_token (&token, mx->reader)) - return 0; + return false; if (token.type != MNUM) { msg (SE, _("Syntax error expecting factor value %s."), context (mx->reader)); - return 0; + return false; } if (!compare) @@ -1340,12 +1315,12 @@ nr_read_factors (struct nr_aux_data *nr, int cell) msg (SE, _("Syntax error expecting value %g for %s %s."), nr->factor_values[i + mx->n_factors * cell], mx->factors[i]->name, context (mx->reader)); - return 0; + return false; } } } - return 1; + return true; } /* Write the contents of a cell having content type CONTENT and data @@ -1376,13 +1351,13 @@ dump_cell_content (struct matrix_data_pgm *mx, int content, double *cp, for (j = 0; j < mx->n_continuous; j++) { - int fv = dict_get_var (default_dict, mx->first_continuous + j)->fv; + int fv = dict_get_var (dataset_dict (current_dataset), mx->first_continuous + j)->fv; case_data_rw (c, fv)->f = *cp; cp++; } if (type == 1) buf_copy_str_rpad (case_data_rw (c, mx->varname_->fv)->s, 8, - dict_get_var (default_dict, + dict_get_var (dataset_dict (current_dataset), mx->first_continuous + i)->name); if (!write_case (wc_data)) return false; @@ -1403,8 +1378,8 @@ nr_output_data (struct nr_aux_data *nr, struct ccase *c, size_t split_cnt; size_t i; - split_cnt = dict_get_split_cnt (default_dict); - split = dict_get_split_vars (default_dict); + split_cnt = dict_get_split_cnt (dataset_dict (current_dataset)); + split = dict_get_split_vars (dataset_dict (current_dataset)); for (i = 0; i < split_cnt; i++) case_data_rw (c, split[i]->fv)->f = nr->split_values[i]; } @@ -1419,11 +1394,8 @@ nr_output_data (struct nr_aux_data *nr, struct ccase *c, size_t factor; for (factor = 0; factor < mx->n_factors; factor++) - { - case_data_rw (c, mx->factors[factor]->fv)->f - = nr->factor_values[factor + cell * mx->n_factors]; - debug_printf (("f:%s ", mx->factors[factor]->name)); - } + case_data_rw (c, mx->factors[factor]->fv)->f + = nr->factor_values[factor + cell * mx->n_factors]; } { @@ -1486,14 +1458,14 @@ struct wr_aux_data struct factor_data *current; /* Current factor. */ }; -static int wr_read_splits (struct wr_aux_data *, struct ccase *, +static bool wr_read_splits (struct wr_aux_data *, struct ccase *, write_case_func *, write_case_data); static bool wr_output_data (struct wr_aux_data *, struct ccase *, write_case_func *, write_case_data); -static int wr_read_rowtype (struct wr_aux_data *, +static bool wr_read_rowtype (struct wr_aux_data *, const struct matrix_token *, struct dfm_reader *); -static int wr_read_factors (struct wr_aux_data *); -static int wr_read_indeps (struct wr_aux_data *); +static bool wr_read_factors (struct wr_aux_data *); +static bool wr_read_indeps (struct wr_aux_data *); static bool matrix_data_read_with_rowtype (struct case_source *, struct ccase *, write_case_func *, @@ -1515,9 +1487,10 @@ read_matrices_with_rowtype (struct matrix_data_pgm *mx) wr.current = NULL; mx->cells = 0; - vfm_source = create_case_source (&matrix_data_with_rowtype_source_class, - &wr); - ok = procedure (NULL, NULL); + proc_set_source (current_dataset, + create_case_source (&matrix_data_with_rowtype_source_class, + &wr)); + ok = procedure (current_dataset,NULL, NULL); free (wr.split_values); return ok; @@ -1552,55 +1525,55 @@ matrix_data_read_with_rowtype (struct case_source *source, /* Read the split file variables. If they differ from the previous set of split variables then output the data. Returns success. */ -static int +static bool wr_read_splits (struct wr_aux_data *wr, struct ccase *c, write_case_func *write_case, write_case_data wc_data) { struct matrix_data_pgm *mx = wr->mx; - int compare; + bool compare; size_t split_cnt; - split_cnt = dict_get_split_cnt (default_dict); + split_cnt = dict_get_split_cnt (dataset_dict (current_dataset)); if (split_cnt == 0) - return 1; + return true; if (wr->split_values) - compare = 1; + compare = true; else { - compare = 0; + compare = false; wr->split_values = xnmalloc (split_cnt, sizeof *wr->split_values); } { - int different = 0; + bool different = false; int i; for (i = 0; i < split_cnt; i++) { struct matrix_token token; if (!mget_token (&token, mx->reader)) - return 0; + return false; if (token.type != MNUM) { msg (SE, _("Syntax error %s expecting SPLIT FILE value."), context (mx->reader)); - return 0; + return false; } if (compare && wr->split_values[i] != token.number && !different) { if (!wr_output_data (wr, c, write_case, wc_data)) return 0; - different = 1; + different = true; mx->cells = 0; } wr->split_values[i] = token.number; } } - return 1; + return true; } /* Compares doubles A and B, treating SYSMIS as greatest. */ @@ -1655,8 +1628,8 @@ wr_output_data (struct wr_aux_data *wr, size_t split_cnt; size_t i; - split_cnt = dict_get_split_cnt (default_dict); - split = dict_get_split_vars (default_dict); + split_cnt = dict_get_split_cnt (dataset_dict (current_dataset)); + split = dict_get_split_vars (dataset_dict (current_dataset)); for (i = 0; i < split_cnt; i++) case_data_rw (c, split[i]->fv)->f = wr->split_values[i]; } @@ -1743,7 +1716,7 @@ wr_output_data (struct wr_aux_data *wr, /* Sets ROWTYPE_ based on the given TOKEN read from READER. Return success. */ -static int +static bool wr_read_rowtype (struct wr_aux_data *wr, const struct matrix_token *token, struct dfm_reader *reader) @@ -1751,13 +1724,13 @@ wr_read_rowtype (struct wr_aux_data *wr, if (wr->content != -1) { msg (SE, _("Multiply specified ROWTYPE_ %s."), context (reader)); - return 0; + return false; } if (token->type != MSTR) { msg (SE, _("Syntax error %s expecting ROWTYPE_ string."), context (reader)); - return 0; + return false; } { @@ -1779,12 +1752,12 @@ wr_read_rowtype (struct wr_aux_data *wr, return 0; } - return 1; + return true; } /* Read the factors for the current row. Select a set of factors and point wr_current to it. */ -static int +static bool wr_read_factors (struct wr_aux_data *wr) { struct matrix_data_pgm *mx = wr->mx; @@ -1888,15 +1861,15 @@ cache_miss: winnage: local_free (factor_values); - return 1; + return true; lossage: local_free (factor_values); - return 0; + return false; } /* Read the independent variables into wr->current. */ -static int +static bool wr_read_indeps (struct wr_aux_data *wr) { struct matrix_data_pgm *mx = wr->mx; @@ -1928,7 +1901,7 @@ wr_read_indeps (struct wr_aux_data *wr) { msg (SE, _("Duplicate specification for %s."), content_names[wr->content]); - return 0; + return false; } if (type == 0) n_cols = mx->n_continuous; @@ -1940,7 +1913,7 @@ wr_read_indeps (struct wr_aux_data *wr) { msg (SE, _("Too many rows of matrix data for %s."), content_names[wr->content]); - return 0; + return false; } switch (mx->section) @@ -1963,18 +1936,14 @@ wr_read_indeps (struct wr_aux_data *wr) n_cols = mx->n_continuous; break; default: - assert (0); - abort (); + NOT_REACHED (); } break; default: - assert (0); - abort (); + NOT_REACHED (); } c->n_rows[wr->content]++; - debug_printf ((" (c=%p,r=%d,n=%d)", c, n_rows + 1, n_cols)); - /* Read N_COLS items at CP. */ { int j; @@ -1983,24 +1952,23 @@ wr_read_indeps (struct wr_aux_data *wr) { struct matrix_token token; if (!mget_token (&token, mx->reader)) - return 0; + return false; if (token.type != MNUM) { msg (SE, _("Syntax error expecting value for %s %s."), - dict_get_var (default_dict, mx->first_continuous + j)->name, + dict_get_var (dataset_dict (current_dataset), mx->first_continuous + j)->name, context (mx->reader)); - return 0; + return false; } *cp++ = token.number; } if (mx->fmt != FREE && !force_eol (mx->reader, content_names[wr->content])) - return 0; - debug_printf (("\n")); + return false; } - return 1; + return true; } /* Matrix source. */