diff options
-rw-r--r-- | src/wrap.c | 19 | ||||
-rw-r--r-- | src/wrap.h | 1 |
2 files changed, 20 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) @@ -104,5 +104,6 @@ extern void get_cursor_pos(struct frame *fr, size_t pos, extern void wrap_line_free(struct wrap_line *l); +extern void show_boxes(struct wrap_line *boxes); #endif /* WRAP_H */ |