lex_match_id (lexer, "FILE");
lex_match (lexer, T_EQUALS);
- h = fh_parse (lexer, FH_REF_FILE);
+ h = fh_parse (lexer, FH_REF_FILE, NULL);
if (!h)
return CMD_FAILURE;
tab_text (t, 0, 10, TAB_LEFT, _("Charset:"));
- tab_text (t, 1, 10, TAB_LEFT,
- dict_get_encoding(d) ? dict_get_encoding(d) : _("Unknown"));
+ tab_text (t, 1, 10, TAB_LEFT, dict_get_encoding (d));
tab_submit (t);
return CMD_FAILURE;
if (dict_get_label (dataset_dict (ds)) == NULL)
tab_output_text (TAB_LEFT,
- _("The active file does not have a file label."));
+ _("The active dataset does not have a file label."));
else
- {
- tab_output_text (TAB_LEFT | TAT_TITLE, _("File label:"));
- tab_output_text (TAB_LEFT | TAB_FIX, dict_get_label (dataset_dict (ds)));
- }
+ tab_output_text_format (TAB_LEFT, _("File label: %s"),
+ dict_get_label (dataset_dict (ds)));
}
else
{
const struct string_array *documents = dict_get_documents (dict);
if (string_array_is_empty (documents))
- tab_output_text (TAB_LEFT, _("The active file dictionary does not "
+ tab_output_text (TAB_LEFT, _("The active dataset dictionary does not "
"contain any documents."));
else
{
size_t i;
tab_output_text (TAB_LEFT | TAT_TITLE,
- _("Documents in the active file:"));
+ _("Documents in the active dataset:"));
for (i = 0; i < dict_get_document_line_cnt (dict); i++)
tab_output_text (TAB_LEFT | TAB_FIX, dict_get_document_line (dict, i));
}
for (i = 0; i < n_values; i++)
{
if (n_values > 1)
- tab_text_format (t, c, r, TAB_LEFT, "%s[%d]", name, i + 1);
+ tab_text_format (t, c, r, TAB_LEFT, "%s[%zu]", name, i + 1);
else
tab_text (t, c, r, TAB_LEFT, name);
tab_text (t, c + 1, r, TAB_LEFT, attribute_get_value (attr, i));
for (i = 0; i < n_labels; i++)
{
const struct val_lab *vl = labels[i];
- char buf[MAX_STRING + 1];
- if (var_is_alpha (v))
- {
- int width = var_get_width (v);
- memcpy (buf, value_str (&vl->value, width), width);
- buf[width] = 0;
- }
- else
- sprintf (buf, "%g", vl->value.f);
-
- tab_text (t, 1, r, TAB_NONE, buf);
- tab_text (t, 2, r, TAB_LEFT, val_lab_get_label (vl));
+ tab_value (t, 1, r, TAB_NONE, &vl->value, v, NULL);
+ tab_text (t, 2, r, TAB_LEFT, val_lab_get_escaped_label (vl));
r++;
}
free (labels);