View Single Post
Old 05-29-2009, 04:35 PM   #5
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 3,463
Karma: 10684861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Have a look at the
http://www.nicemice.net/par/
program

par is a paragraph reformatter that does remarkably clever job reformatting lines. It can recognize and properly wrap mails with multi level quotes, C comments, numbered lists, lists, bordered paragraphs, weirdly formatted text.

the [uncomplete] documentation is at http://www.nicemice.net/par/par-doc.var

Par is Unix prorgam written in pure C, and I was able to compile it on Windows (using Borland free C compiler)
I am pretty sure you can borrow an idea or two by studying the code ;-)
kacir is offline   Reply With Quote