[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ann] jus-0.0.3 - like fmt but justify text at both ends
I thought you guys might like to know about a little proggie I wrote about
6 months ago called 'jus' (for JUStify). It justifies text like 'fmt' but
on *both* ends like this e-mail. Just like 'fmt' it can be invoked from
within vi like ':10,20!jus', it is even more intellegent about indentation
than 'fmt' IMO, and you can specify the number of characters per line with
-N or -w N (default 75). The code that does the justification is
librarified as the 'jus' function:
int jus(char **src, size_t sn, char **dst, size_t dn, int wn);
which could facility it's integration into other applications. I have used
this for many months now, find it quite useful, and have *never* seen it do
something unexpected.
I'm sending the link here because it supports UTF-8 and would otherwise
surely go completely unnoticed. I would be happy to hear that it indeed
works with UTF-8 in the field as I only use ISO-8859-1 regularly.
The file is attached and here's a link:
http://www.eskimo.com/~miallen/c/jus.c
Hope someone finds it useful,
Mike
--
A program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes the potential for it to be applied to tasks that are
conceptually similar and, more important, to tasks that have not
yet been conceived.
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/