if (!h)
return CMD_FAILURE;
- reader = sfm_open_reader (h, &d, &info);
+ reader = sfm_open_reader (h, NULL, &d, &info);
if (!reader)
{
fh_unref (h);
display_attributes (struct tab_table *t, const struct attrset *set, int flags,
int c, int r)
{
- struct attrset_iterator i;
- struct attribute *attr;
+ struct attribute **attrs;
+ size_t n_attrs;
+ size_t i;
- 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++)
{
+ const struct attribute *attr = attrs[i];
const char *name = attribute_get_name (attr);
size_t n_values;
size_t i;
r++;
}
}
+ free (attrs);
}
static void