diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-08-08 23:12:30 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-08-08 23:13:11 +0200 |
commit | fa30860b75614b715e99b2da187a71022fa01cfc (patch) | |
tree | fcab71eae26f6ffbad704af33734acad7e211a48 /src/wrap.c | |
parent | ddd6ed1288b6ac4952f61b9f3cbc40c22381ec53 (diff) |
Add show_boxes()
Diffstat (limited to 'src/wrap.c')
-rw-r--r-- | src/wrap.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1067,6 +1067,25 @@ static struct wrap_line *split_paragraph(struct wrap_line *boxes, int *n) } +void show_boxes(struct wrap_line *boxes) +{ + int i; + + if ( boxes == NULL ) { + printf("Empty line.\n"); + return; + } + + for ( i=0; i<boxes->n_boxes; i++ ) { + printf("%3i", i); + printf(" '%s'", boxes->boxes[i].text); + printf(" t=%i s=%i %i %5.2f\n", + boxes->boxes[i].type, boxes->boxes[i].space, + boxes->boxes[i].width, boxes->boxes[i].sp); + } +} + + /* Wrap the StoryCode inside "fr->sc" so that it fits within width "fr->w", * and generate fr->lines */ int wrap_contents(struct frame *fr, PangoContext *pc) |