diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2007-11-08 20:43:43 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2007-11-08 20:43:43 +0000 |
commit | 66eebbbb0ac5b2143daec3787eb5a6c2f1e9f328 (patch) | |
tree | d362392824e7a2c4dc37718a1d75571ce714a905 | |
parent | cf2bfc595b3f2d1d299f37bfc55a8f6553c92e07 (diff) |
Stick at GNU cvs output format of docdate.
OK niallo@
-rw-r--r-- | usr.bin/cvs/rcs.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 5b38e0498e7..32a3cd852ac 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.226 2007/11/08 20:37:40 tobias Exp $ */ +/* $OpenBSD: rcs.c,v 1.227 2007/11/08 20:43:42 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -3219,7 +3219,15 @@ rcs_kwexp_line(char *rcsfile, struct rcs_delta *rdp, struct cvs_line *line, } if (kwtype & RCS_KW_MDOCDATE) { - fmt = "%B %e %Y "; + /* + * Do not prepend ' ' for a single + * digit, %e would do so and there is + * no better format for strftime(). + */ + if (rdp->rd_date.tm_mday < 10) + fmt = "%B%e %Y "; + else + fmt = "%B %e %Y "; if (strftime(buf, sizeof(buf), fmt, &rdp->rd_date) == 0) fatal("rcs_kwexp_line: strftime failure"); |