X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fmrsets.c;h=621516b9ecdc82eaaceaf480d5f958142dc353a1;hb=d81e61ee74df11558749faa3ceaf09fda48c7bc1;hp=3af5d033370e9b05703580eecc4a2a64cf20e63e;hpb=9ade26c8349b4434008c46cf09bc7473ec743972;p=pspp diff --git a/src/language/dictionary/mrsets.c b/src/language/dictionary/mrsets.c index 3af5d03337..621516b9ec 100644 --- a/src/language/dictionary/mrsets.c +++ b/src/language/dictionary/mrsets.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,9 +17,9 @@ #include #include "data/data-out.h" +#include "data/dataset.h" #include "data/dictionary.h" #include "data/mrset.h" -#include "data/procedure.h" #include "data/value-labels.h" #include "data/variable.h" #include "language/command.h" @@ -205,14 +205,12 @@ parse_group (struct lexer *lexer, struct dictionary *dict, if (mrset->name == NULL) { - msg (SE, _("Required %s specification missing from %s subcommand."), - "NAME", subcommand_name); + lex_spec_missing (lexer, subcommand_name, "NAME"); goto error; } else if (mrset->n_vars == 0) { - msg (SE, _("Required %s specification missing from %s subcommand."), - "VARIABLES", subcommand_name); + lex_spec_missing (lexer, subcommand_name, "VARIABLES"); goto error; } @@ -221,8 +219,7 @@ parse_group (struct lexer *lexer, struct dictionary *dict, /* Check that VALUE is specified and is valid for the VARIABLES. */ if (!has_value) { - msg (SE, _("Required %s specification missing from %s subcommand."), - "VALUE", subcommand_name); + lex_spec_missing (lexer, subcommand_name, "VALUE"); goto error; } else if (var_is_alpha (mrset->vars[0])) @@ -371,7 +368,7 @@ parse_group (struct lexer *lexer, struct dictionary *dict, msg (SW, _("Variables %s and %s specified as part of " "multiple dichotomy group %s (which has " "CATEGORYLABELS=COUNTEDVALUES) have the same " - "value label for the the group's counted " + "value label for the group's counted " "value. These categories will not be " "distinguishable in output."), other_name, name, mrset->name); @@ -420,7 +417,7 @@ parse_group (struct lexer *lexer, struct dictionary *dict, if (width == c->width && value_equal (value, &c->value, width)) { - if (!c->warned && strcasecmp (c->label, label)) + if (!c->warned && utf8_strcasecmp (c->label, label)) { char *s = data_out (value, var_get_encoding (var), var_get_print_format (var)); @@ -537,8 +534,8 @@ parse_display (struct lexer *lexer, struct dictionary *dict) if (n == 0) { if (dict_get_n_mrsets (dict) == 0) - msg (SN, _("The active file dictionary does not contain any multiple " - "response sets.")); + msg (SN, _("The active dataset dictionary does not contain any " + "multiple response sets.")); stringi_set_destroy (&mrset_names_set); return true; } @@ -579,8 +576,14 @@ parse_display (struct lexer *lexer, struct dictionary *dict) if (mrset->width == 0) ds_put_format (&details, "%.0f\n", mrset->counted.f); else - ds_put_format (&details, "`%.*s'\n", mrset->width, - value_str (&mrset->counted, mrset->width)); + { + const uint8_t *raw = value_str (&mrset->counted, mrset->width); + char *utf8 = recode_string ("UTF-8", dict_get_encoding (dict), + CHAR_CAST (const char *, raw), + mrset->width); + ds_put_format (&details, "`%s'\n", utf8); + free (utf8); + } ds_put_format (&details, "%s: %s\n", _("Category label source"), (mrset->cat_source == MRSET_VARLABELS ? _("Variable labels")