=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/term.c,v retrieving revision 1.102 retrieving revision 1.103 diff -u -r1.102 -r1.103 --- src/usr.bin/mandoc/term.c 2014/12/24 23:31:59 1.102 +++ src/usr.bin/mandoc/term.c 2015/01/21 20:20:49 1.103 @@ -1,7 +1,7 @@ -/* $OpenBSD: term.c,v 1.102 2014/12/24 23:31:59 schwarze Exp $ */ +/* $OpenBSD: term.c,v 1.103 2015/01/21 20:20:49 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2010-2014 Ingo Schwarze + * Copyright (c) 2010-2015 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 @@ -493,6 +493,17 @@ case ESCAPE_SKIPCHAR: p->flags |= TERMP_SKIPCHAR; continue; + case ESCAPE_OVERSTRIKE: + cp = seq + sz; + while (seq < cp) { + if (*seq == '\\') { + mandoc_escape(&seq, NULL, NULL); + continue; + } + encode1(p, *seq++); + if (seq < cp) + encode(p, "\b", 1); + } default: continue; } @@ -713,6 +724,20 @@ continue; case ESCAPE_SKIPCHAR: skip = 1; + continue; + case ESCAPE_OVERSTRIKE: + rsz = 0; + rhs = seq + ssz; + while (seq < rhs) { + if (*seq == '\\') { + mandoc_escape(&seq, NULL, NULL); + continue; + } + i = (*p->width)(p, *seq++); + if (rsz < i) + rsz = i; + } + sz += rsz; continue; default: continue;