summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/rcs.c14
-rw-r--r--usr.bin/cvs/rcs.h3
2 files changed, 15 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 230f6b09cab..7dc2ddcf7f8 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.15 2004/12/07 17:10:56 tedu Exp $ */
+/* $OpenBSD: rcs.c,v 1.16 2004/12/16 17:16:18 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -624,6 +624,18 @@ rcs_getrev(RCSFILE *rfp, RCSNUM *rev)
/*
+ * rcs_gethead()
+ *
+ * Get the head revision for the RCS file <rf>.
+ */
+BUF*
+rcs_gethead(RCSFILE *rf)
+{
+ return rcs_getrev(rf, rf->rf_head);
+}
+
+
+/*
* rcs_getrevbydate()
*
* Get an RCS revision by a specific date.
diff --git a/usr.bin/cvs/rcs.h b/usr.bin/cvs/rcs.h
index d6ace23f5bd..2a1c17c3574 100644
--- a/usr.bin/cvs/rcs.h
+++ b/usr.bin/cvs/rcs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.h,v 1.3 2004/12/15 05:09:06 jfb Exp $ */
+/* $OpenBSD: rcs.h,v 1.4 2004/12/16 17:16:18 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -131,6 +131,7 @@ int rcs_write (RCSFILE *);
int rcs_addsym (RCSFILE *, const char *, RCSNUM *);
int rcs_rmsym (RCSFILE *, const char *);
BUF* rcs_getrev (RCSFILE *, RCSNUM *);
+BUF* rcs_gethead (RCSFILE *);
RCSNUM* rcs_getrevbydate (RCSFILE *, struct tm *);
BUF* rcs_patch (const char *, const char *);