static void write_line (struct outp_driver *d, char *s);
/* Other functions. */
-static int list_cases (struct ccase *);
+static int list_cases (struct ccase *, void *);
static void determine_layout (void);
static void clean_up (void);
static void write_header (struct outp_driver *);
-static void write_all_headers (void);
+static void write_all_headers (void *);
/* Returns the number of text lines that can fit on the remainder of
the page. */
determine_layout ();
case_num = 0;
- procedure (write_all_headers, list_cases, NULL);
+ procedure_with_splits (write_all_headers, list_cases, NULL, NULL);
free (line_buf);
clean_up ();
/* Writes headers to all devices. This is done at the beginning of
each SPLIT FILE group. */
static void
-write_all_headers (void)
+write_all_headers (void *aux UNUSED)
{
struct outp_driver *d;
{
struct html_driver_ext *x = d->ext;
- assert (d->driver_open && d->page_open);
+ assert (d->driver_open);
if (x->sequence_no == 0 && !d->class->open_page (d))
{
msg (ME, _("Cannot open first page on HTML device %s."),
}
static int
-list_cases (struct ccase *c)
+list_cases (struct ccase *c, void *aux UNUSED)
{
struct outp_driver *d;
memset(&line_buf[x], ' ', width - v->print.w);
x += width - v->print.w;
}
-
- {
- union value value;
-
- if (formats[v->print.type].cat & FCAT_STRING)
- value.c = c->data[v->fv].s;
- else if (v->fv == -1)
- value.f = case_num;
- else
- value.f = c->data[v->fv].f;
-
- data_out (&line_buf[x], &v->print, &value);
- }
+
+ if ((formats[v->print.type].cat & FCAT_STRING) || v->fv != -1)
+ data_out (&line_buf[x], &v->print, &c->data[v->fv]);
+ else
+ {
+ union value case_num_value;
+ case_num_value.f = case_num;
+ data_out (&line_buf[x], &v->print, &case_num_value);
+ }
x += v->print.w;
line_buf[x++] = ' ';
for (column = 0; column < cmd.n_variables; column++)
{
struct variable *v = cmd.v_variables[column];
- union value value;
char buf[41];
- if (formats[v->print.type].cat & FCAT_STRING)
- value.c = c->data[v->fv].s;
- else if (v->fv == -1)
- value.f = case_num;
- else
- value.f = c->data[v->fv].f;
-
- data_out (buf, &v->print, &value);
+ if ((formats[v->print.type].cat & FCAT_STRING) || v->fv != -1)
+ data_out (buf, &v->print, &c->data[v->fv]);
+ else
+ {
+ union value case_num_value;
+ case_num_value.f = case_num;
+ data_out (buf, &v->print, &case_num_value);
+ }
buf[v->print.w] = 0;
fprintf (x->file.file, " <TD ALIGN=RIGHT>%s</TD>\n",