-/* Outputs FORMAT with the given ARGS as a warning for input
- I. */
-static void
-vdata_warning (const struct data_in *i, const char *format, va_list args)
-{
- struct msg m;
- struct string text;
-
- ds_init_empty (&text);
- ds_put_char (&text, '(');
- if (i->first_column != 0)
- {
- if (i->first_column == i->last_column - 1)
- ds_put_format (&text, _("column %d"), i->first_column);
- else
- ds_put_format (&text, _("columns %d-%d"),
- i->first_column, i->last_column - 1);
- ds_put_cstr (&text, ", ");
- }
- ds_put_format (&text, _("%s field) "), fmt_name (i->format));
- ds_put_vformat (&text, format, args);
-
- m.category = MSG_C_DATA;
- m.severity = MSG_S_WARNING;
- m.text = ds_cstr (&text);
- m.where.file_name = NULL;
- m.where.line_number = 0;
-
- msg_emit (&m);
-}
-
-/* Outputs FORMAT with the given ARGS as a warning for input
- I. */
-static void
-data_warning (const struct data_in *i, const char *format, ...)
-{
- va_list args;
-
- va_start (args, format);
- vdata_warning (i, format, args);
- va_end (args);
-}
-
-/* Apply implied decimal places to output. */
-static void
-apply_implied_decimals (struct data_in *i)
-{
- if (i->implied_decimals > 0)
- i->output->f /= pow (10., i->implied_decimals);
-}
-