X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata-in.c;h=3a15f89612bc5048a1e7d2c13c888e8c98f9d3d5;hb=ca1feaeed4961242699d0b7ba61def0c58515ddd;hp=9bdda48cf3113877ee3f4c8c982522df17cac8fb;hpb=2e0595dd8e344dbdcab740d7d2a3b67d153d6b39;p=pspp-builds.git diff --git a/src/data-in.c b/src/data-in.c index 9bdda48c..3a15f896 100644 --- a/src/data-in.c +++ b/src/data-in.c @@ -18,6 +18,7 @@ 02111-1307, USA. */ #include +#include "data-in.h" #include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include "data-in.h" #include "error.h" #include "getline.h" #include "julcal/julcal.h" @@ -36,15 +36,13 @@ #include "str.h" #include "var.h" -#undef DEBUGGING -/*#define DEBUGGING 1 */ #include "debug-print.h" /* Specialized error routine. */ static void dls_error (const struct data_in *, const char *format, ...) - __attribute__ ((format (printf, 2, 3))); + PRINTF_FORMAT (2, 3); static void dls_error (const struct data_in *i, const char *format, ...) @@ -142,6 +140,8 @@ parse_numeric (struct data_in *i) if (*i->s == '-' || *i->s == '+') i->s++; } + else + sign = 1; if (type != FMT_DOT) { @@ -288,6 +288,7 @@ parse_N (struct data_in *i) { const unsigned char *cp; + i->v->f = 0; for (cp = i->s; cp < i->e; cp++) { if (!isdigit (*cp)) @@ -382,9 +383,10 @@ parse_Z (struct data_in *i) if (!warned) { - msg (MW, _("Quality of zoned decimal (Z) input format code is " - "suspect. Check your results three times, report bugs " - "to author.")); + msg (MW, + _("Quality of zoned decimal (Z) input format code is " + "suspect. Check your results three times. Report bugs " + "to %s."),PACKAGE_BUGREPORT); warned = 1; } } @@ -574,11 +576,6 @@ parse_A (struct data_in *i) memset (i->v->s + len, ' ', i->format.w - len); } -#if __CHECKER__ - memset (i->v->s + i->format.w, '%', - REM_RND_UP (i->format.w, MAX_SHORT_STRING)); -#endif - return 1; } @@ -613,11 +610,6 @@ parse_AHEX (struct data_in *i) memset (i->v->s + (i->e - i->s) / 2, ' ', (i->format.w - (i->e - i->s)) / 2); } -#if __CHECKER__ - memset (i->v->s + i->format.w / 2, '%', - REM_RND_UP (i->format.w / 2, MAX_SHORT_STRING)); -#endif - return 1; } @@ -1497,13 +1489,7 @@ default_result (struct data_in *i) /* Default to SYSMIS or blanks. */ if (fmt->cat & FCAT_STRING) - { -#if __CHECKER__ - memset (i->v->s, ' ', ROUND_UP (i->format.w, MAX_SHORT_STRING)); -#else - memset (i->v->s, ' ', i->format.w); -#endif - } + memset (i->v->s, ' ', i->format.w); else i->v->f = set_blanks; }