- Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2009, 2011 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
assert (fmt_check_output (format));
converters[format->type] (input, format, output);
assert (fmt_check_output (format));
converters[format->type] (input, format, output);
- char *s = recode_string (encoding, LEGACY_NATIVE, output, format->w );
+ char *s = recode_string (encoding, C_ENCODING, output, format->w );
assert (fmt_check_output (format));
converters[format->type] (input, format, output);
assert (fmt_check_output (format));
converters[format->type] (input, format, output);
t = recode_string_pool (UTF8, encoding, output, format->w, pool);
free (output);
t = recode_string_pool (UTF8, encoding, output, format->w, pool);
free (output);
*p = "}JKLMNOPQR"[*p - '0'];
}
memcpy (output, buf, format->w);
*p = "}JKLMNOPQR"[*p - '0'];
}
memcpy (output, buf, format->w);
else
output_binary_integer (number, format->w,
settings_get_output_integer_format (), output);
else
output_binary_integer (number, format->w,
settings_get_output_integer_format (), output);
output_binary_integer (number, format->w / 2, INTEGER_MSB_FIRST, tmp);
output_hex (tmp, format->w / 2, output);
}
output_binary_integer (number, format->w / 2, INTEGER_MSB_FIRST, tmp);
output_hex (tmp, format->w / 2, output);
}
}
buf_copy_lpad (output, format->w, tmp, p - tmp, ' ');
}
buf_copy_lpad (output, format->w, tmp, p - tmp, ' ');
- buf_copy_str_rpad (output, format->w, weekdays[(int) input->f - 1], ' ');
+ {
+ buf_copy_str_rpad (output, format->w,
+ weekdays[(int) input->f - 1], ' ');
+ output[format->w] = '\0';
+ }
else
{
if (input->f != SYSMIS)
msg (ME, _("Weekday number %f is not between 1 and 7."), input->f);
output_missing (format, output);
}
else
{
if (input->f != SYSMIS)
msg (ME, _("Weekday number %f is not between 1 and 7."), input->f);
output_missing (format, output);
}
- buf_copy_str_rpad (output, format->w, months[(int) input->f - 1], ' ');
+ {
+ buf_copy_str_rpad (output, format->w, months[(int) input->f - 1], ' ');
+ output[format->w] = '\0';
+ }
else
{
if (input->f != SYSMIS)
msg (ME, _("Month number %f is not between 1 and 12."), input->f);
output_missing (format, output);
}
else
{
if (input->f != SYSMIS)
msg (ME, _("Month number %f is not between 1 and 12."), input->f);
output_missing (format, output);
}
char *output)
{
memcpy (output, value_str (input, format->w), format->w);
char *output)
{
memcpy (output, value_str (input, format->w), format->w);
assert (p == buf + format->w);
memcpy (output, buf, format->w);
assert (p == buf + format->w);
memcpy (output, buf, format->w);
output_overflow (const struct fmt_spec *format, char *output)
{
memset (output, '*', format->w);
output_overflow (const struct fmt_spec *format, char *output)
{
memset (output, '*', format->w);