diff options
author | Thomas White <taw@physics.org> | 2018-03-24 18:14:47 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-03-25 20:50:01 +0200 |
commit | a376f1015813ff097b3b4add89b62c97dd6155f6 (patch) | |
tree | 48e5d99e603068f50f8cb6fd8368f11f1ec60225 /src | |
parent | 2868d2e2648293d476911a36eb199d5caf9083a0 (diff) |
Remove merge_paragraph
Not needed any more
Diffstat (limited to 'src')
-rw-r--r-- | src/frame.c | 38 | ||||
-rw-r--r-- | src/frame.h | 1 |
2 files changed, 0 insertions, 39 deletions
diff --git a/src/frame.c b/src/frame.c index 5d9acc0..c9189d2 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1341,44 +1341,6 @@ static signed int merge_paragraph_runs(Paragraph *p1, Paragraph *p2) } -void merge_paragraphs(struct frame *fr, int para) -{ - Paragraph *p1, *p2; - int i; - SCBlock *n; - - if ( para >= fr->n_paras-1 ) { - printf("Paragraph number too high to merge.\n"); - return; - } - - p1 = fr->paras[para]; - p2 = fr->paras[para+1]; - - if ( (p1->type != PARA_TYPE_TEXT) || (p2->type != PARA_TYPE_TEXT) ) { - printf("Trying to merge non-text paragraphs.\n"); - return; - } - - /* Delete the \newpara block to unite the paragraphs */ - n = get_newline_at_end(p1); - assert(n != NULL); - - if ( sc_block_delete(&fr->scblocks, n) ) { - fprintf(stderr, "Failed to delete paragraph end sentinel.\n"); - return; - } - - merge_paragraph_runs(p1, p2); - - for ( i=para+1; i<fr->n_paras-1; i++ ) { - fr->paras[i] = fr->paras[i+1]; - } - fr->n_paras--; -} - - - static void merge_paragraphs_by_newpara(struct frame *fr, SCBlock *np) { int i; diff --git a/src/frame.h b/src/frame.h index 002d397..dece73c 100644 --- a/src/frame.h +++ b/src/frame.h @@ -197,7 +197,6 @@ extern int get_sc_pos(struct frame *fr, int pn, size_t pos, extern void *get_para_bvp(Paragraph *para); -extern void merge_paragraphs(struct frame *fr, int para); extern Paragraph *create_paragraph(struct frame *fr, SCBlock *bl, SCBlock *rbl); extern enum para_type para_type(Paragraph *para); |