#include "libpspp/assertion.h"
#include "libpspp/compiler.h"
#include "libpspp/message.h"
#include "libpspp/assertion.h"
#include "libpspp/compiler.h"
#include "libpspp/message.h"
char *separator; /* Field separator (usually comma or tab). */
int quote; /* Quote character (usually ' or ") or 0. */
char *quote_set; /* Characters that force quoting. */
char *separator; /* Field separator (usually comma or tab). */
int quote; /* Quote character (usually ' or ") or 0. */
char *quote_set; /* Characters that force quoting. */
char *command_name; /* Current command. */
FILE *file; /* Output file. */
int n_items; /* Number of items output so far. */
char *command_name; /* Current command. */
FILE *file; /* Output file. */
int n_items; /* Number of items output so far. */
- output_driver_init (&csv->driver, &csv_driver_class, file_name, device_type);
+ output_driver_init (&csv->driver, &csv_driver_class, fh_get_file_name (fh), device_type);
csv->separator = parse_string (opt (d, o, "separator", ","));
quote = parse_string (opt (d, o, "quote", "\""));
csv->quote = quote[0];
free (quote);
csv->quote_set = xasprintf ("\n\r\t%s%c", csv->separator, csv->quote);
csv->separator = parse_string (opt (d, o, "separator", ","));
quote = parse_string (opt (d, o, "quote", "\""));
csv->quote = quote[0];
free (quote);
csv->quote_set = xasprintf ("\n\r\t%s%c", csv->separator, csv->quote);
csv->captions = parse_boolean (opt (d, o, "captions", "true"));
csv->captions = parse_boolean (opt (d, o, "captions", "true"));
+
+ if (csv->captions && caption != NULL)
+ {
+ csv_output_field_format (csv, "Caption: %s", caption);
+ putc ('\n', csv->file);
+ }
const char *caption = table_item_get_caption (table_item);
const struct table *t = table_item_get_table (table_item);
int footnote_idx;
const char *caption = table_item_get_caption (table_item);
const struct table *t = table_item_get_table (table_item);
int footnote_idx;
+ if (csv->captions && caption != NULL)
+ {
+ csv_output_field_format (csv, "Caption: %s", caption);
+ putc ('\n', csv->file);
+ }
+