adah1972/libunibreak — pull request #2 by filodej (2013-11-05 14:19:20+00:00)
Title: Expose low level line breaking API

Hi,
first of all I'd like to thank you for a really helpful piece of software.

To give you a context - I am implementing a text shaping engine in c++ and I was trying to implement a line breaking iterator (conceptually similar to [one implemented in ICU](http://www.icu-project.org/apiref/icu4c/classicu_1_1BreakIterator.html)).

When I was trying to utilize your library I faced a problem that it performs the line breaking algorithm all at once - in a single call while my iterator needs to process the input in small chunks (by individual code points).

So this pull request contains my approach expose the low level API (three character level functions) to client:
```
- lb_init_break_context()
- lb_handle_first_char()
- lb_handle_next_char()
```
... and re-implement the ```set_linebreaks()``` function on top of that.

Please, feel free to reject this request if my approach is too intrusive or simply does not fit to your taste.
(I'd be by no means offended and would be quite happy to stay on my fork if necessary).
Also I am a C++ programmer so my C skills may not be very good, but I tried hard to stick with your coding style.

Kind Regards
Filodej