- Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2009, 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
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
lex_match_id (lexer, "FILE");
lex_match (lexer, T_EQUALS);
lex_match_id (lexer, "FILE");
lex_match (lexer, T_EQUALS);
tab_text (t, 0, 10, TAB_LEFT, _("Charset:"));
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_output_text (TAB_LEFT,
_("The active dataset does not have a file label."));
else
tab_output_text (TAB_LEFT,
_("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)));
display_attributes (struct tab_table *t, const struct attrset *set, int flags,
int c, int r)
{
display_attributes (struct tab_table *t, const struct attrset *set, int flags,
int c, int r)
{
- for (attr = attrset_first (set, &i); attr != NULL;
- attr = attrset_next (set, &i))
+ n_attrs = attrset_count (set);
+ attrs = attrset_sorted (set);
+ for (i = 0; i < n_attrs; i++)
- 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));
r++;
}
}
else
tab_text (t, c, r, TAB_LEFT, name);
tab_text (t, c + 1, r, TAB_LEFT, attribute_get_value (attr, i));
r++;
}
}