diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-04-09 15:29:40 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-04-09 15:29:40 +0000 |
commit | 523c7db3c47602feb761c95b387c6c93138264f5 (patch) | |
tree | b36433935eca0c86910b6a754aef3fa1363fe8bb /read.c | |
parent | e99813aa631956ea6bc1323879f2817f2fe6f761 (diff) | |
download | mandoc-523c7db3c47602feb761c95b387c6c93138264f5.tar.gz |
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.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -142,7 +142,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { "tab in non-literal context", "end of line whitespace", "bad comment style", - "unknown escape sequence", + "bad escape sequence", "unterminated quoted string", "generic error", |