=================================================================== RCS file: /cvs/mandoc/mandoc.c,v retrieving revision 1.61 retrieving revision 1.63 diff -u -p -r1.61 -r1.63 --- mandoc/mandoc.c 2011/11/06 14:43:14 1.61 +++ mandoc/mandoc.c 2012/05/31 22:29:13 1.63 @@ -1,7 +1,7 @@ -/* $Id: mandoc.c,v 1.61 2011/11/06 14:43:14 kristaps Exp $ */ +/* $Id: mandoc.c,v 1.63 2012/05/31 22:29:13 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2011 Ingo Schwarze + * Copyright (c) 2011, 2012 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 @@ -143,6 +143,16 @@ mandoc_escape(const char **end, const char **start, in break; /* + * The \z escape is supposed to output the following + * character without advancing the cursor position. + * Since we are mostly dealing with terminal mode, + * let us just skip the next character. + */ + case ('z'): + (*end)++; + return(ESCAPE_SKIPCHAR); + + /* * Handle all triggers matching \X(xy, \Xx, and \X[xxxx], where * 'X' is the trigger. These have opaque sub-strings. */ @@ -623,9 +633,10 @@ mandoc_normdate(struct mparse *parse, char *in, int ln mandoc_msg(MANDOCERR_NODATE, parse, ln, pos, NULL); time(&t); } + else if (a2time(&t, "%Y-%m-%d", in)) + t = 0; else if (!a2time(&t, "$" "Mdocdate: %b %d %Y $", in) && - !a2time(&t, "%b %d, %Y", in) && - !a2time(&t, "%Y-%m-%d", in)) { + !a2time(&t, "%b %d, %Y", in)) { mandoc_msg(MANDOCERR_BADDATE, parse, ln, pos, NULL); t = 0; }