/* Validate file. */
if (strlen (date) != 8)
- error (r, _("Bad date string length %d."), strlen (date));
+ error (r, _("Bad date string length %d."), (int) strlen (date));
if (strlen (time) != 6)
- error (r, _("Bad time string length %d."), strlen (time));
+ error (r, _("Bad time string length %d."), (int) strlen (time));
/* Save file info. */
if (info != NULL)
len = read_int32 (r);
if (len >= sizeof label)
- sys_error (r, _("Variable %s has label of invalid length %d."),
- name, len);
+ sys_error (r, _("Variable %s has label of invalid length %u."),
+ name, (unsigned int) len);
read_string (r, label, len + 1);
var_set_label (var, label);
int expected_integer_format;
if (size != 4 || count != 8)
- sys_error (r, _("Bad size (%d) or count (%d) field on record type 7, "
+ sys_error (r, _("Bad size (%u) or count (%u) field on record type 7, "
"subtype 3."),
- size, count);
+ (unsigned int) size, (unsigned int) count);
/* Check floating point format. */
if (r->float_format == FLOAT_IEEE_DOUBLE_BE
double lowest = read_flt64 (r);
if (size != 8 || count != 3)
- sys_error (r, _("Bad size (%d) or count (%d) on extension 4."),
- size, count);
+ sys_error (r, _("Bad size (%u) or count (%u) on extension 4."),
+ (unsigned int) size, (unsigned int) count);
if (sysmis != SYSMIS)
sys_warn (r, _("File specifies unexpected value %g as SYSMIS."), sysmis);
int i;
if (count % 3 || n_vars != dict_get_var_cnt (dict))
- sys_error (r, _("Bad size (%d) or count (%d) on extension 11."),
- size, count);
+ sys_error (r, _("Bad size (%u) or count (%u) on extension 11."),
+ (unsigned int) size, (unsigned int) count);
for (i = 0; i < n_vars; ++i)
{
var_cnt = read_int32 (r);
if (var_cnt < 1 || var_cnt > dict_get_var_cnt (dict))
sys_error (r, _("Number of variables associated with a value label (%d) "
- "is not between 1 and the number of variables (%d)."),
- var_cnt, dict_get_var_cnt (dict));
+ "is not between 1 and the number of variables (%u)."),
+ var_cnt, (unsigned int) dict_get_var_cnt (dict));
/* Read the list of variables. */
var = pool_nalloc (subpool, var_cnt, sizeof *var);
if (cmd.n_lrecl[0] == NOT_LONG)
msg (SE, _("Fixed-length records were specified on /RECFORM, but "
"record length was not specified on /LRECL. "
- "Assuming %d-character records."),
- properties.record_width);
+ "Assuming %u-character records."),
+ (unsigned int) properties.record_width);
else if (cmd.n_lrecl[0] < 1)
msg (SE, _("Record length (%ld) must be at least one byte. "
- "Assuming %d-character records."),
- cmd.n_lrecl[0], properties.record_width);
+ "Assuming %u-character records."),
+ cmd.n_lrecl[0], (unsigned int) properties.record_width);
else
properties.record_width = cmd.n_lrecl[0];
break;
if ((lc - fc + 1) % var_cnt)
{
msg (SE, _("The %d columns %d-%d "
- "can't be evenly divided into %d fields."),
- lc - fc + 1, fc, lc, var_cnt);
+ "can't be evenly divided into %u fields."),
+ lc - fc + 1, fc, lc, (unsigned int) var_cnt);
return false;
}
}
if (trns->record_cnt != 0 && trns->record_cnt != record)
- msg (SW, _("Output calls for %d records but %d specified on RECORDS "
+ msg (SW, _("Output calls for %d records but %u specified on RECORDS "
"subcommand."),
- record, trns->record_cnt);
+ record, (unsigned int) trns->record_cnt);
trns->record_cnt = record;
return true;
{
msg (SE, _("Differing number of variables in old name list "
"(%d) and in new name list (%d)."),
- vm.rename_cnt - prev_nv_2, prev_nv_1 - prev_nv_2);
+ (int) (vm.rename_cnt - prev_nv_2),
+ (int) (prev_nv_1 - prev_nv_2));
for (i = 0; i < prev_nv_1; i++)
free (vm.new_names[i]);
free (vm.new_names);
size_t i;
msg (SE, _("Differing number of variables in old name list "
- "(%u) and in new name list (%u)."),
- (unsigned) rename_cnt - prev_nv_2,
- (unsigned) prev_nv_1 - prev_nv_2);
+ "(%d) and in new name list (%d)."),
+ (int) (rename_cnt - prev_nv_2),
+ (int) (prev_nv_1 - prev_nv_2));
for (i = 0; i < prev_nv_1; i++)
free (rename_new_names[i]);
free (rename_new_names);
: info.float_format == FLOAT_Z_LONG ? _("IBM 390 Hex Long.")
: _("Unknown."));
tab_text (t, 0, 5, TAB_LEFT, _("Variables:"));
- tab_text (t, 1, 5, TAB_LEFT | TAT_PRINTF, "%d",
- dict_get_var_cnt (d));
+ tab_text (t, 1, 5, TAB_LEFT | TAT_PRINTF, "%u",
+ (unsigned int) dict_get_var_cnt (d));
tab_text (t, 0, 6, TAB_LEFT, _("Cases:"));
tab_text (t, 1, 6, TAB_LEFT | TAT_PRINTF,
info.case_cnt == -1 ? _("Unknown") : "%d", info.case_cnt);
if (ds_length (&lexer->tokstr) % chars_per_byte)
msg (SE, _("String of %s digits has %d characters, which is not a "
"multiple of %d."),
- base_name, ds_length (&lexer->tokstr), chars_per_byte);
+ base_name, (int) ds_length (&lexer->tokstr), chars_per_byte);
p = ds_cstr (&lexer->tokstr);
for (i = 0; i < byte_cnt; i++)
if (ds_length (&lexer->tokstr) > 255)
{
msg (SE, _("String exceeds 255 characters in length (%d characters)."),
- ds_length (&lexer->tokstr));
+ (int) ds_length (&lexer->tokstr));
ds_truncate (&lexer->tokstr, 255);
}
}
else
{
- msg (SE, _("Missing argument %d to %s."), i + 1,
- function->name);
+ msg (SE, _("Missing argument %d to %s."),
+ (int) i + 1, function->name);
goto error;
}
struct dsc_proc *dsc, const char *name);
static bool generate_z_varname (const struct dictionary *dict,
struct dsc_proc *dsc, char *z_name,
- const char *name, size_t *z_cnt);
+ const char *name, int *z_cnt);
static void dump_z_table (struct dsc_proc *);
static void setup_z_trns (struct dsc_proc *, struct dataset *);
struct variable **vars = NULL;
size_t var_cnt = 0;
int save_z_scores = 0;
- size_t z_cnt = 0;
+ int z_cnt = 0;
size_t i;
bool ok;
{
if (save_z_scores)
{
- size_t gen_cnt = 0;
+ int gen_cnt = 0;
for (i = 0; i < dsc->var_cnt; i++)
if (dsc->vars[i].z_name[0] == 0)
copies the new name into Z_NAME. On failure, returns false. */
static bool
generate_z_varname (const struct dictionary *dict, struct dsc_proc *dsc, char *z_name,
- const char *var_name, size_t *z_cnt)
+ const char *var_name, int *z_cnt)
{
char name[LONG_NAME_LEN + 1];
if ( n_vlist1 != n_vlist2)
msg (SE, _("PAIRED was specified but the number of variables "
"preceding WITH (%d) did not match the number "
- "following (%d)."), n_vlist1, n_vlist2);
+ "following (%d)."), (int) n_vlist1, (int) n_vlist2);
test_parameters->n_pairs = n_vlist1 ;
}
sum += subc_list_double_at(&cmd.dl_contrast[i],j);
if ( sum != 0.0 )
- msg(SW,_("Coefficients for contrast %d do not total zero"),i + 1);
+ msg(SW,_("Coefficients for contrast %d do not total zero"),
+ (int) i + 1);
}
if ( stat_tables & STAT_DESC )
for (i = 0; i < n_vars; i++)
{
- size_t n_categories = cat_get_n_categories (varlist[i]);
- size_t j;
+ int n_categories = cat_get_n_categories (varlist[i]);
+ int j;
fprintf (fp, "%s.name = \"%s\";\n\t",
var_get_name (varlist[i]),
msg (SE, _("PAIRED was specified but the number of variables "
"preceding WITH (%d) did not match the number "
"following (%d)."),
- n_before_WITH, n_after_WITH );
+ (int) n_before_WITH, (int) n_after_WITH );
return 0;
}
n_pairs_local = n_before_WITH;
fprintf (stderr, "W=%.3f", weight);
for (i = 0; i < 4; i++)
{
- fprintf (stderr, " M%d=", i + 1);
+ fprintf (stderr, " M%d=", (int) i + 1);
if (M[i] == SYSMIS)
fprintf (stderr, "sysmis");
else if (fabs (M[i]) <= 0.0005)
{
msg (SE, _("Out of memory. Could not allocate room for minimum of %d "
"cases of %d bytes each. (PSPP workspace is currently "
- "restricted to a maximum of %d KB.)"),
- min_buffers, approx_case_cost, get_workspace() / 1024);
+ "restricted to a maximum of %lu KB.)"),
+ min_buffers, approx_case_cost,
+ (unsigned long int) (get_workspace() / 1024));
return 0;
}
return 1;
number_pos = strchr (x->chart_file_name, '#') - x->chart_file_name;
ch->file_name = xasprintf ("%.*s%d%s",
number_pos, x->chart_file_name,
- x->chart_cnt,
+ (int) x->chart_cnt,
x->chart_file_name + number_pos + 1);
fp = fopen (ch->file_name, "wb");
if (fp == NULL)