02111-1307, USA. */
#include <config.h>
-#include <assert.h>
+#include "data-in.h"
+#include "error.h"
#include <math.h>
#include <ctype.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-#include "data-in.h"
#include "error.h"
#include "getline.h"
#include "julcal/julcal.h"
#include "str.h"
#include "var.h"
\f
-#undef DEBUGGING
-/*#define DEBUGGING 1 */
#include "debug-print.h"
\f
/* 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, ...)
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
e.class = DE;
err_location (&e.where);
- e.title = ds_value (&title);
+ e.title = ds_c_str (&title);
e.text = buf;
err_vmsg (&e);
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;
{
const unsigned char *cp;
+ i->v->f = 0;
for (cp = i->s; cp < i->e; cp++)
{
if (!isdigit (*cp))
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;
}
}
if (fmt->cat & FCAT_STRING)
memset (i->v->s, ' ', i->format.w);
else
- i->v->f = set_blanks;
+ i->v->f = get_blanks();
}
int
if (++cp == i->e)
{
- i->v->f = set_blanks;
+ i->v->f = get_blanks();
return 1;
}
}