From d188baa4f65eb607975e6eac9d3709fd7724d486 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 8 Apr 2014 01:37:27 +0000 Subject: 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. --- mandoc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'mandoc.c') diff --git a/mandoc.c b/mandoc.c index be85a76d..0462134a 100644 --- a/mandoc.c +++ b/mandoc.c @@ -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 - * Copyright (c) 2011, 2012, 2013 Ingo Schwarze + * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze * * 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'): -- cgit v1.2.3