From 66eebbbb0ac5b2143daec3787eb5a6c2f1e9f328 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Thu, 8 Nov 2007 20:43:43 +0000 Subject: Stick at GNU cvs output format of docdate. OK niallo@ --- usr.bin/cvs/rcs.c | 12 ++++++++++-- 1 file 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 * 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"); -- cgit v1.2.3