From 6d26ea13466c1d5399b0330bbde1b497edc63f24 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 1 Oct 2019 20:20:50 +0200 Subject: write_item: Use write_para --- libstorycode/storycode.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/libstorycode/storycode.c b/libstorycode/storycode.c index 7b8b464..18e5270 100644 --- a/libstorycode/storycode.c +++ b/libstorycode/storycode.c @@ -254,37 +254,26 @@ static int write_slide(GOutputStream *fh, Slide *s) static int write_item(GOutputStream *fh, struct narrative_item *item) { - int i; - switch ( item->type ) { case NARRATIVE_ITEM_TEXT: /* FIXME: separate alignment */ if ( write_string(fh, ": ") ) return 1; - for ( i=0; in_runs; i++ ) { - /* FIXME: Run markers (e.g. '*') */ - if ( write_string(fh, item->runs[i].text) ) return 1; - } + write_para(fh, item->runs, item->n_runs); if ( write_string(fh, "\n") ) return 1; break; case NARRATIVE_ITEM_PRESTITLE: /* FIXME: separate alignment */ if ( write_string(fh, "PRESTITLE: ") ) return 1; - for ( i=0; in_runs; i++ ) { - /* FIXME: Run markers (e.g. '*') */ - if ( write_string(fh, item->runs[i].text) ) return 1; - } + write_para(fh, item->runs, item->n_runs); if ( write_string(fh, "\n") ) return 1; break; case NARRATIVE_ITEM_BP: /* FIXME: separate alignment */ if ( write_string(fh, "BP: ") ) return 1; - for ( i=0; in_runs; i++ ) { - /* FIXME: Run markers (e.g. '*') */ - if ( write_string(fh, item->runs[i].text) ) return 1; - } + write_para(fh, item->runs, item->n_runs); if ( write_string(fh, "\n") ) return 1; break; -- cgit v1.2.3