summaryrefslogtreecommitdiff
path: root/usr.bin/rcs
diff options
context:
space:
mode:
authorNiall O'Higgins <niallo@cvs.openbsd.org>2006-03-11 22:51:14 +0000
committerNiall O'Higgins <niallo@cvs.openbsd.org>2006-03-11 22:51:14 +0000
commit545c378ba22f72ae4e34d8cd277b929061f12f49 (patch)
tree1e499bb5a828c971a9ae44525d9d3ca7611c04f1 /usr.bin/rcs
parent9a4a5d9cb58c5304eb8795365177865551d75569 (diff)
Now that the last diff went in, we just have to remove some checks in
rcs_set_rev() to get the GNU-like behaviour for ci -l0, ci -u0 etc (admittedly its weird behaviour...but hey, we should support it) ok joris@
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r--usr.bin/rcs/rcsprog.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index 1e6d9c7ed2b..99e91afb488 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.68 2006/03/08 20:19:39 joris Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.69 2006/03/11 22:51:13 niallo Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -80,8 +80,6 @@ sighdlr(int sig)
void
rcs_set_rev(const char *str, RCSNUM **rev)
{
- RCSNUM *t;
-
if (str == NULL)
return;
@@ -90,23 +88,6 @@ rcs_set_rev(const char *str, RCSNUM **rev)
if ((*rev = rcsnum_parse(str)) == NULL)
fatal("bad revision number '%s'", str);
- /*
- * If 0 is specified as a revision number, exit and warn the user.
- * This differs from GNU ci's plainly buggy behaviour, where 0 ends up
- * being 0.1 and other weird stuff.
- */
- t = rcsnum_parse("0");
- if (rcsnum_cmp(*rev, t, 0) == 0)
- fatal("0 is not a valid revision number");
- rcsnum_free(t);
- /*
- * If 1 is specified as revision number, silently assume 1.1.
- * This is what GNU ci does.
- */
- t = rcsnum_parse(RCS_HEAD_INIT);
- if (rcsnum_cmp(*rev, t, 0) > 0)
- rcsnum_cpy(t, *rev, 0);
- rcsnum_free(t);
}
/*