~vcs-imports-ii/pspp/master

« back to all changes in this revision

Viewing changes to src/output/csv.c

  • Committer: Ben Pfaff
  • Date: 2021-01-25 04:51:49 UTC
  • Revision ID: git-v1:507ebaea36737618ef8265a60cd3e9005d9f3457
output: Make groups contain their subitems, and get rid of spv_item.

Until now, the output subsystem has had two different ideas for output
items: struct output_item, which is the primary representation, and
struct spv_item, which represents an output item read from an .spv file.
The biggest difference, until now, has been that spv_item contains its
children, whereas output_item bracketed children inside open/close pairs.
This commit unifies them under output_item, making output_item adopt the
container abstraction.

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
    case OUTPUT_ITEM_CHART:
246
246
      break;
247
247
 
248
 
    case OUTPUT_ITEM_GROUP_OPEN:
249
 
      break;
250
 
 
251
 
    case OUTPUT_ITEM_GROUP_CLOSE:
252
 
      break;
 
248
    case OUTPUT_ITEM_GROUP:
 
249
      NOT_REACHED ();
253
250
 
254
251
    case OUTPUT_ITEM_IMAGE:
255
252
      break;
296
293
 
297
294
static const struct output_driver_class csv_driver_class =
298
295
  {
299
 
    "csv",
300
 
    csv_destroy,
301
 
    csv_submit,
302
 
    csv_flush,
 
296
    .name = "csv",
 
297
    .destroy = csv_destroy,
 
298
    .submit = csv_submit,
 
299
    .flush = csv_flush,
303
300
  };