X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fdata%2Fdata-in.c;h=0b9e0623265562229d7982cdc0d86f5b99823fc2;hb=a37754c18dee3d5941e5fe041b2c1fa1a3370157;hp=1e8fe67983350fefb5ae4ce117b312bbb0711f9f;hpb=393668423c1c9456fd82db6b30f25de078915da5;p=pspp diff --git a/src/data/data-in.c b/src/data/data-in.c index 1e8fe67983..0b9e062326 100644 --- a/src/data/data-in.c +++ b/src/data/data-in.c @@ -54,18 +54,17 @@ vdls_error (const struct data_in *i, const char *format, va_list args) if (i->flags & DI_IGNORE_ERROR) return; - ds_init (&text, 64); + ds_init_empty (&text); if (i->f1 == i->f2) - ds_printf (&text, _("(column %d"), i->f1); + ds_put_format (&text, _("(column %d"), i->f1); else - ds_printf (&text, _("(columns %d-%d"), i->f1, i->f2); - ds_printf (&text, _(", field type %s) "), fmt_to_string (&i->format)); - ds_vprintf (&text, format, args); + ds_put_format (&text, _("(columns %d-%d"), i->f1, i->f2); + ds_put_format (&text, _(", field type %s) "), fmt_to_string (&i->format)); + ds_put_vformat (&text, format, args); m.category = MSG_DATA; m.severity = MSG_ERROR; - msg_location (&m.where); - m.text = ds_c_str (&text); + m.text = ds_cstr (&text); msg_emit (&m); } @@ -572,9 +571,7 @@ parse_RB (struct data_in *i) static inline bool parse_A (struct data_in *i) { - const int bytes = width_to_bytes(i->format.w); - - copy_mangle (i->v->s, bytes, i->s, i->e - i->s); + buf_copy_rpad (i->v->s, i->format.w, i->s, i->e - i->s); return true; }