Up to [cvsweb.bsd.lv] / mandoc
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: VERSION_1_11_4
Revision 1.40 / (download) - annotate - [select for diffs], Sat Apr 9 15:29:40 2011 UTC (13 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_4,
VERSION_1_11_3,
VERSION_1_11_2
Changes since 1.39: +1 -238 lines
Diff to previous 1.39 (unified)
Remove a2roffdeco() and mandoc_special() functions and replace them with a public (mandoc.h) function mandoc_escape(), which merges the functionality of both prior functions. Reason: code duplication. The a2roffdeco() and mandoc_special() functions were pretty much the same thing and both quite complex. This allows one function to receive improvements in (e.g.) subexpression handling and performance, instead of having to replicate functionality. As such, the mandoc_escape() function already handles a superset of the escapes handled in previous versions and has improvements in performance (using strcspn(), for example) and reliable handling of subexpressions. This code Works For Me, but may need work to catch any regressions. Since the benefits are great (leaner code, simpler API), I'd rather have it in-tree than floating as a patch.