diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-31 13:05:38 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-31 13:05:38 +0000 |
commit | efcf3b76b7316be51cb8233e0d8be7ce88122879 (patch) | |
tree | 22097ade16d8e870e6e3197c55afb3399f1e69d1 /gnu/usr.bin/rcs | |
parent | 045684ca6b1bf4feb2a1a582c4e18625ef5c9a05 (diff) |
retain -Z options to rcs commands even though they do not work (rcs
commands spawn children which do not inherit the -Z option...) but also
look in the RCSLOCALID environment variable. cvs sets this to "OpenBSD",
as read from the options file.
Diffstat (limited to 'gnu/usr.bin/rcs')
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcskeys.c | 14 | ||||
-rw-r--r-- | gnu/usr.bin/rcs/lib/rcsutil.c | 15 |
2 files changed, 25 insertions, 4 deletions
diff --git a/gnu/usr.bin/rcs/lib/rcskeys.c b/gnu/usr.bin/rcs/lib/rcskeys.c index e43546c765a..24a0c2f1ec8 100644 --- a/gnu/usr.bin/rcs/lib/rcskeys.c +++ b/gnu/usr.bin/rcs/lib/rcskeys.c @@ -27,6 +27,12 @@ Report problems and direct all questions to: */ /* $Log: rcskeys.c,v $ +/* Revision 1.3 1996/05/31 13:04:51 deraadt +/* retain -Z options to rcs commands even though they do not work (rcs +/* commands spawn children which do not inherit the -Z option...) but also +/* look in the RCSLOCALID environment variable. cvs sets this to "OpenBSD", +/* as read from the options file. +/* /* 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. @@ -69,7 +75,7 @@ Report problems and direct all questions to: #include "rcsbase.h" -libId(keysId, "$Id: rcskeys.c,v 1.2 1996/04/19 12:40:09 mickey Exp $") +libId(keysId, "$Id: rcskeys.c,v 1.3 1996/05/31 13:04:51 deraadt Exp $") char local_id[keylength+1]; char const *Keyword[] = { @@ -85,10 +91,16 @@ char const *Keyword[] = { setRCSlocalId(string) char const *string; { + static int num; + if (strlen(string) > keylength) error("LocalId is too long"); strcpy(local_id, string); Keyword[LocalId] = local_id; + + if (num++) + setenv("RCSLOCALID", local_id, 1); + } enum markers diff --git a/gnu/usr.bin/rcs/lib/rcsutil.c b/gnu/usr.bin/rcs/lib/rcsutil.c index 4f55dfcfce1..cdf2ef7f738 100644 --- a/gnu/usr.bin/rcs/lib/rcsutil.c +++ b/gnu/usr.bin/rcs/lib/rcsutil.c @@ -31,8 +31,14 @@ Report problems and direct all questions to: /* * $Log: rcsutil.c,v $ - * Revision 1.1 1995/10/18 08:41:02 deraadt - * Initial revision + * Revision 1.2 1996/05/31 13:04:52 deraadt + * retain -Z options to rcs commands even though they do not work (rcs + * commands spawn children which do not inherit the -Z option...) but also + * look in the RCSLOCALID environment variable. cvs sets this to "OpenBSD", + * as read from the options file. + * + * Revision 1.1.1.1 1995/10/18 08:41:02 deraadt + * initial import of NetBSD tree * * Revision 1.5 1995/02/24 02:25:16 mycroft * RCS 5.6.7.4 @@ -167,7 +173,7 @@ Report problems and direct all questions to: #include "rcsbase.h" -libId(utilId, "$Id: rcsutil.c,v 1.1 1995/10/18 08:41:02 deraadt Exp $") +libId(utilId, "$Id: rcsutil.c,v 1.2 1996/05/31 13:04:52 deraadt Exp $") #if !has_memcmp int @@ -1066,6 +1072,9 @@ getRCSINIT(argc, argv, newargv) register char *p, *q, **pp; size_t n; + if (q = cgetenv("RCSLOCALID")) + setRCSlocalId(q); + if (!(q = cgetenv("RCSINIT"))) *newargv = argv; else { |