=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mandoc.c,v retrieving revision 1.35 retrieving revision 1.36 diff -c -r1.35 -r1.36 *** src/usr.bin/mandoc/mandoc.c 2012/07/07 18:27:36 1.35 --- src/usr.bin/mandoc/mandoc.c 2013/06/20 22:29:38 1.36 *************** *** 1,4 **** ! /* $Id: mandoc.c,v 1.35 2012/07/07 18:27:36 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012 Ingo Schwarze --- 1,4 ---- ! /* $Id: mandoc.c,v 1.36 2013/06/20 22:29:38 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011, 2012 Ingo Schwarze *************** *** 428,444 **** pairs = 0; white = 0; for (cp = start; '\0' != *cp; cp++) { ! /* Move left after quoted quotes and escaped backslashes. */ if (pairs) cp[-pairs] = cp[0]; if ('\\' == cp[0]) { ! if ('\\' == cp[1]) { ! /* Poor man's copy mode. */ pairs++; cp++; ! } else if (0 == quoted && ' ' == cp[1]) /* Skip escaped blanks. */ ! cp++; } else if (0 == quoted) { if (' ' == cp[0]) { /* Unescaped blanks end unquoted args. */ --- 428,462 ---- pairs = 0; white = 0; for (cp = start; '\0' != *cp; cp++) { ! ! /* ! * Move the following text left ! * after quoted quotes and after "\\" and "\t". ! */ if (pairs) cp[-pairs] = cp[0]; + if ('\\' == cp[0]) { ! /* ! * In copy mode, translate double to single ! * backslashes and backslash-t to literal tabs. ! */ ! switch (cp[1]) { ! case ('t'): ! cp[0] = '\t'; ! /* FALLTHROUGH */ ! case ('\\'): pairs++; cp++; ! break; ! case (' '): /* Skip escaped blanks. */ ! if (0 == quoted) ! cp++; ! break; ! default: ! break; ! } } else if (0 == quoted) { if (' ' == cp[0]) { /* Unescaped blanks end unquoted args. */