diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-04-14 22:33:16 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-04-14 22:33:16 +0000 |
commit | 2ef14b987111198bdbff225245defe33b8d0b5d9 (patch) | |
tree | 5b169416f57f91bf0d989a86f70847a003915610 /usr.bin/cvs/rcsnum.c | |
parent | e3c7a96d9809317e267ede94758252b4e0f1dd08 (diff) |
- swap a hack for a slightly nicer hack using a global variable. this avoids
adding a really nasty hack to make some upcoming rlog fixes from joris work.
ok joris@
Diffstat (limited to 'usr.bin/cvs/rcsnum.c')
-rw-r--r-- | usr.bin/cvs/rcsnum.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/cvs/rcsnum.c b/usr.bin/cvs/rcsnum.c index 871d0807ec0..1063601a8d5 100644 --- a/usr.bin/cvs/rcsnum.c +++ b/usr.bin/cvs/rcsnum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsnum.c,v 1.35 2006/04/14 02:49:44 deraadt Exp $ */ +/* $OpenBSD: rcsnum.c,v 1.36 2006/04/14 22:33:15 niallo Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -34,6 +34,7 @@ static void rcsnum_setsize(RCSNUM *, u_int); static char *rcsnum_itoa(u_int16_t, char *, size_t); +int rcsnum_flags; /* * rcsnum_alloc() @@ -267,12 +268,8 @@ rcsnum_aton(const char *str, char **ep, RCSNUM *nump) * completely insane and not understandable reason in that output. * */ -#if !defined(RCSPROG) - if (nump->rn_len > 2 && nump->rn_id[nump->rn_len - 1] == 0 && - cvs_cmdop != CVS_OP_LOG) { -#else - if (nump->rn_len > 2 && nump->rn_id[nump->rn_len - 1] == 0) { -#endif + if (nump->rn_len > 2 && nump->rn_id[nump->rn_len - 1] == 0 + && !(rcsnum_flags & RCSNUM_NO_MAGIC)) { /* * Look for ".0.x" at the end of the branch number. */ |