maybe set up in RCSINIT environment variable.
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: ci.1,v 1.1.1.1 1995/10/18 08:40:59 deraadt Exp $
+.Id $Id: ci.1,v 1.2 1996/04/19 12:39:59 mickey Exp $
.ds i \&\s-1ISO\s0
.ds r \&\s-1RCS\s0
.ds u \&\s-1UTC\s0
forces a deposit; the new revision is deposited even it is not different
from the preceding one.
.TP
+.BR \-L
+adds a synonym for the
+.B Id
+keyword.
+.TP
.BR \-k [\f2rev\fP]
searches the working file for keyword values to determine its revision number,
creation date, state, and author (see
/*
* $Log: ci.c,v $
+ * Revision 1.2 1996/04/19 12:40:00 mickey
+ * -L<string> option added to support LOCALID behaviour.
+ * maybe set up in RCSINIT environment variable.
+ *
* Revision 1.1.1.1 1995/10/18 08:40:59 deraadt
* initial import of NetBSD tree
*
static struct stat workstat;
static struct Symrev *assoclst, **nextassoc;
-mainProg(ciId, "ci", "$Id: ci.c,v 1.1.1.1 1995/10/18 08:40:59 deraadt Exp $")
+mainProg(ciId, "ci", "$Id: ci.c,v 1.2 1996/04/19 12:40:00 mickey Exp $")
{
static char const cmdusage[] =
"\nci usage: ci -{fIklMqru}[rev] -d[date] -mmsg -{nN}name -sstate -ttext -T -Vn -wwho -xsuff -zzone file ...";
keepflag=true;
goto revno;
+ case 'L':
+ setRCSlocalId(*argv+2);
+ break;
+
case 'm':
if (msg.size) redefined('m');
msg = cleanlogmsg(a, strlen(a));
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: co.1,v 1.1.1.1 1995/10/18 08:40:59 deraadt Exp $
+.Id $Id: co.1,v 1.2 1996/04/19 12:40:02 mickey Exp $
.ds i \&\s-1ISO\s0
.ds r \&\s-1RCS\s0
.ds u \&\s-1UTC\s0
.SM "FILE MODES"
below.
.TP
+.B \-L
+adds the synonym for the
+.BR Id
+keyword.
+.TP
.B \-kkv
Generate keyword strings using the default form, e.g.\&
.B "$\&Revision: \*(Rv $"
/*
* $Log: co.c,v $
+ * Revision 1.2 1996/04/19 12:40:04 mickey
+ * -L<string> option added to support LOCALID behaviour.
+ * maybe set up in RCSINIT environment variable.
+ *
* Revision 1.1.1.1 1995/10/18 08:41:00 deraadt
* initial import of NetBSD tree
*
static struct hshentry *targetdelta; /* final delta to be generated */
static struct stat workstat;
-mainProg(coId, "co", "$Id: co.c,v 1.1.1.1 1995/10/18 08:41:00 deraadt Exp $")
+mainProg(coId, "co", "$Id: co.c,v 1.2 1996/04/19 12:40:04 mickey Exp $")
{
static char const cmdusage[] =
"\nco usage: co -{fIlMpqru}[rev] -ddate -jjoins -ksubst -sstate -T -w[who] -Vn -xsuff -zzone file ...";
zone_set(a);
break;
+ case 'L': /* add local $Id: co.c,v 1.2 1996/04/19 12:40:04 mickey Exp $ keyword string */
+ setRCSlocalId(*argv+2);
+ break;
+
case 'k': /* set keyword expand mode */
expandarg = *argv;
if (0 <= expmode) redefined('k');
/* RCS common definitions and data structures */
-#define RCSBASE "$Id: rcsbase.h,v 1.1.1.1 1995/10/18 08:41:01 deraadt Exp $"
+#define RCSBASE "$Id: rcsbase.h,v 1.2 1996/04/19 12:40:06 mickey Exp $"
/* Copyright 1982, 1988, 1989 Walter Tichy
Copyright 1990, 1991, 1992, 1993, 1994 Paul Eggert
/*
* $Log: rcsbase.h,v $
+ * Revision 1.2 1996/04/19 12:40:06 mickey
+ * -L<string> option added to support LOCALID behaviour.
+ * maybe set up in RCSINIT environment variable.
+ *
* Revision 1.1.1.1 1995/10/18 08:41:01 deraadt
* initial import of NetBSD tree
*
#define keylength 8 /* max length of any of the above keywords */
enum markers { Nomatch, Author, Date, Header, Id,
-#ifdef LOCALID
- LocalId,
-#endif
- Locker, Log, Name, RCSfile, Revision, Source, State };
+ Locker, Log, Name, RCSfile, Revision, Source, State,
+ LocalId };
/* This must be in the same order as rcskeys.c's Keyword[] array. */
#define DELNUMFORM "\n\n%s\n%s\n"
int getoldkeys P((RILE*));
/* rcskeys */
-extern char const *const Keyword[];
+extern char const *Keyword[];
+void setRCSlocalId(char const *);
enum markers trymatch P((char const*));
/* rcslex */
/*
* $Log: rcsedit.c,v $
+ * Revision 1.2 1996/04/19 12:40:07 mickey
+ * -L<string> option added to support LOCALID behaviour.
+ * maybe set up in RCSINIT environment variable.
+ *
* Revision 1.1.1.1 1995/10/18 08:41:01 deraadt
* initial import of NetBSD tree
*
#include "rcsbase.h"
-libId(editId, "$Id: rcsedit.c,v 1.1.1.1 1995/10/18 08:41:01 deraadt Exp $")
+libId(editId, "$Id: rcsedit.c,v 1.2 1996/04/19 12:40:07 mickey Exp $")
static void editEndsPrematurely P((void)) exiting;
static void editLineNumberOverflow P((void)) exiting;
break;
case Header:
case Id:
-#ifdef LOCALID
case LocalId:
-#endif
escape_string(out,
marker!=Header || RCSv<VERSION(4)
? basename(RCSname)
/*
* $Log: rcskeep.c,v $
+ * Revision 1.2 1996/04/19 12:40:08 mickey
+ * -L<string> option added to support LOCALID behaviour.
+ * maybe set up in RCSINIT environment variable.
+ *
* Revision 1.1.1.1 1995/10/18 08:41:02 deraadt
* initial import of NetBSD tree
*
#include "rcsbase.h"
-libId(keepId, "$Id: rcskeep.c,v 1.1.1.1 1995/10/18 08:41:02 deraadt Exp $")
+libId(keepId, "$Id: rcskeep.c,v 1.2 1996/04/19 12:40:08 mickey Exp $")
static int badly_terminated P((void));
static int checknum P((char const*));
break;
case Header:
case Id:
-#ifdef LOCALID
case LocalId:
-#endif
if (!(
getval(fp, (struct buf*)0, false) &&
keeprev(fp) &&
*/
/* $Log: rcskeys.c,v $
+/* Revision 1.2 1996/04/19 12:40:09 mickey
+/* -L<string> option added to support LOCALID behaviour.
+/* maybe set up in RCSINIT environment variable.
+/*
/* Revision 1.1.1.1 1995/10/18 08:41:02 deraadt
/* initial import of NetBSD tree
/*
#include "rcsbase.h"
-libId(keysId, "$Id: rcskeys.c,v 1.1.1.1 1995/10/18 08:41:02 deraadt Exp $")
-
+libId(keysId, "$Id: rcskeys.c,v 1.2 1996/04/19 12:40:09 mickey Exp $")
-char const *const Keyword[] = {
+char local_id[keylength+1];
+char const *Keyword[] = {
/* This must be in the same order as rcsbase.h's enum markers type. */
0,
AUTHOR, DATE, HEADER, IDH,
-#ifdef LOCALID
- LOCALID,
-#endif
- LOCKER, LOG, NAME, RCSFILE, REVISION, SOURCE, STATE
+ LOCKER, LOG, NAME, RCSFILE, REVISION, SOURCE, STATE,
+ NULL,
};
+ void
+setRCSlocalId(string)
+ char const *string;
+{
+ if (strlen(string) > keylength)
+ error("LocalId is too long");
+ strcpy(local_id, string);
+ Keyword[LocalId] = local_id;
+}
enum markers
trymatch(string)
{
register int j;
register char const *p, *s;
- for (j = sizeof(Keyword)/sizeof(*Keyword); (--j); ) {
- /* try next keyword */
- p = Keyword[j];
- s = string;
- while (*p++ == *s++) {
- if (!*p)
- switch (*s) {
- case KDELIM:
- case VDELIM:
- return (enum markers)j;
- default:
- return Nomatch;
- }
- }
- }
+ for (j = sizeof(Keyword)/sizeof(*Keyword); (--j); )
+ if (Keyword[j]) {
+ /* try next keyword */
+ p = Keyword[j];
+ s = string;
+ while (*p++ == *s++) {
+ if (!*p)
+ switch (*s) {
+ case KDELIM:
+ case VDELIM:
+ return (enum markers)j;
+ default:
+ return Nomatch;
+ }
+ }
+ }
return(Nomatch);
}