#include <libpspp/misc.h>
#include <libpspp/str.h>
+#include "minmax.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
mv_init (&v->miss, width);
if (v->type == NUMERIC)
{
- v->print = f8_2;
+ v->print = fmt_for_output (FMT_F, 8, 2);
v->alignment = ALIGN_RIGHT;
v->display_width = 8;
v->measure = MEASURE_SCALE;
}
else
{
- v->print = make_output_format (FMT_A, v->width, 0);
+ v->print = fmt_for_output (FMT_A, v->width, 0);
v->alignment = ALIGN_LEFT;
v->display_width = 8;
v->measure = MEASURE_NOMINAL;
/* Compares two double pointers to variables, which should point
to elements of a struct dictionary's `var' member array. */
static int
-compare_var_ptrs (const void *a_, const void *b_, void *aux UNUSED)
+compare_var_ptrs (const void *a_, const void *b_, const void *aux UNUSED)
{
struct variable *const *a = a_;
struct variable *const *b = b_;
move_element (d->var, d->var_cnt, sizeof *d->var, v->index, new_index);
- min_idx = min (v->index, new_index);
- max_idx = max (v->index, new_index);
+ min_idx = MIN (v->index, new_index);
+ max_idx = MAX (v->index, new_index);
for (i = min_idx; i <= max_idx; i++)
d->var[i]->index = i;
}
/* Compares two strings. */
static int
-compare_strings (const void *a, const void *b, void *aux UNUSED)
+compare_strings (const void *a, const void *b, const void *aux UNUSED)
{
return strcmp (a, b);
}
/* Hashes a string. */
static unsigned
-hash_string (const void *s, void *aux UNUSED)
+hash_string (const void *s, const void *aux UNUSED)
{
return hsh_hash_string (s);
}