Improve BSD-Licensed Text Processing Tools

Jesse Hagewood jesse.hagewood at gmail.com
Mon Jun 11 04:37:19 UTC 2012


This week, I started working on temporary indent as a man macro in mdocml.
I spent a lot of time studying how similar macros are implemented in man
and mdoc, and term.c and html.c.

I took a short break from mandoc earlier this week and began looking at
diff3. While studying the code, I implemented the following missing options:

--strip-trailing-cr
--help
--version

I also adapted diff3 to FreeBSD's code style guidelines.

According to my schedule, I move from working on mdocml to working on diff
on the 17th. Yesterday I began studying diff so that I can be prepared when
I start adding features. I have already began working on making the
--unified option compatible with GNU diff. At least part of the
incompatibility is in how the date is formatted when diff prints the
modification timestamp of the input files in the header. In BSD diff, it
just prints the output of ctime(), but GNU diff has several different
formats it can print the date in. I mostly have the date format fixed,
except for adding a trailing decimal after the seconds in the date/time
that's present in GNU diff. Making sure BSD diff's --unified option is
completely compatible with GNU's will be the first thing I will study and
focus on, since it is a frequently used feature in diff.

This week I'll be working as much as possible to at least get no-space
and/or temporary indent completely working as man macros in mdocml, and
also preparing for diff. If I can get these macros completely working, I
will post a patch on the freebsd-docs and mdocml mailing lists for
community testing.


More information about the soc-status mailing list