diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-08 01:37:27 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-08 01:37:27 +0000 |
commit | d188baa4f65eb607975e6eac9d3709fd7724d486 (patch) | |
tree | dc15a5178b9f83e919f95bc29024e089f1d62625 /mandoc.c | |
parent | 7dcbb6ff063b997d62c7738d0904f8e0d6fdfc79 (diff) | |
download | mandoc-d188baa4f65eb607975e6eac9d3709fd7724d486.tar.gz mandoc-d188baa4f65eb607975e6eac9d3709fd7724d486.tar.zst mandoc-d188baa4f65eb607975e6eac9d3709fd7724d486.zip |
Fully implement the \B (validate numerical expression) and
partially implement the \w (measure text width) escape sequence
in a way that makes them usable in numerical expressions and in
conditional requests, similar to how \n (interpolate number register)
and \* (expand user-defined string) are implemented.
This lets mandoc(1) handle the baroque low-level roff code
found at the beginning of the ggrep(1) manual.
Thanks to pascal@ for the report.
Diffstat (limited to 'mandoc.c')
-rw-r--r-- | mandoc.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -1,7 +1,7 @@ -/* $Id: mandoc.c,v 1.77 2014/04/07 17:51:10 schwarze Exp $ */ +/* $Id: mandoc.c,v 1.78 2014/04/08 01:37:27 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -161,21 +161,18 @@ mandoc_escape(const char **end, const char **start, int *sz) /* * These escapes are of the form \X'Y', where 'X' is the trigger * and 'Y' is any string. These have opaque sub-strings. + * The \B and \w escapes are handled in roff.c, roff_res(). */ case ('A'): /* FALLTHROUGH */ case ('b'): /* FALLTHROUGH */ - case ('B'): - /* FALLTHROUGH */ case ('D'): /* FALLTHROUGH */ case ('o'): /* FALLTHROUGH */ case ('R'): /* FALLTHROUGH */ - case ('w'): - /* FALLTHROUGH */ case ('X'): /* FALLTHROUGH */ case ('Z'): |