X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata-in.c;h=c082516d664efe45f39f6eaf31a1b439c0cdfb3b;hb=d2f8593a1f1d39a3264682af0da898a3d67b68cf;hp=586e74f37353e86f5821dce769275f07ca342340;hpb=7b98b3a4f58f6dc5a8e9cbc188b627966d5e652d;p=pspp diff --git a/src/data-in.c b/src/data-in.c index 586e74f373..c082516d66 100644 --- a/src/data-in.c +++ b/src/data-in.c @@ -19,7 +19,7 @@ #include #include "data-in.h" -#include +#include "error.h" #include #include #include @@ -64,9 +64,9 @@ dls_error (const struct data_in *i, const char *format, ...) struct error e; struct string title; - ds_init (NULL, &title, 64); + ds_init (&title, 64); if (!getl_reading_script) - ds_concat (&title, _("data-file error: ")); + ds_puts (&title, _("data-file error: ")); if (i->f1 == i->f2) ds_printf (&title, _("(column %d"), i->f1); else @@ -75,7 +75,7 @@ dls_error (const struct data_in *i, const char *format, ...) e.class = DE; err_location (&e.where); - e.title = ds_value (&title); + e.title = ds_c_str (&title); e.text = buf; err_vmsg (&e); @@ -140,16 +140,18 @@ parse_numeric (struct data_in *i) if (*i->s == '-' || *i->s == '+') i->s++; } + else + sign = 1; if (type != FMT_DOT) { - decimal = set_decimal; - grouping = set_grouping; + decimal = get_decimal(); + grouping = get_grouping(); } else { - decimal = set_grouping; - grouping = set_decimal; + decimal = get_grouping(); + grouping = get_decimal(); } i->v->f = SYSMIS; @@ -1489,7 +1491,7 @@ default_result (struct data_in *i) if (fmt->cat & FCAT_STRING) memset (i->v->s, ' ', i->format.w); else - i->v->f = set_blanks; + i->v->f = get_blanks(); } int @@ -1527,7 +1529,7 @@ data_in (struct data_in *i) if (++cp == i->e) { - i->v->f = set_blanks; + i->v->f = get_blanks(); return 1; } }