Subject: bin/2876: rcs: adding -DLOCALID="foo" does not make any effets
To: None <gnats-bugs@gnats.netbsd.org>
From: Tatoku Ogaito <tacha@tera.fukui-med.ac.jp>
List: netbsd-bugs
Date: 10/21/1996 13:55:13
>Number:         2876
>Category:       bin
>Synopsis:       rcs: adding -DLOCALID="foo" does not make any effets
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 20 22:20:01 1996
>Last-Modified:
>Originator:     Tatoku Ogaito
>Organization:
Tatoku Ogaito		| Email: tacha@tera.fukui-med.ac.jp
Department of Physics   | Fax:   +81 776-61-8141
Fukui Medical School  	| Tel:   +81 776-61-3111 ext 2446
>Release:        Oct. 16 1996
>Environment:
	
System: NetBSD tera.fukui-med.ac.jp 1.2A NetBSD 1.2A (TERA) #23: Thu Oct 17 21:20:17 JST 1996 root@tera.fukui-med.ac.jp:/usr/current/src/sys/arch/i386/compile/TERA i386


>Description:
	
	After upgrading rcs to 5.7, all "#ifdef LOCALID" wiped out 
from rcslib sources.  So even if you recompile rcs utilities with 
-DLOCALID=\"Foo\", noted in gnu/usr.bin/rcs/lib/Makefile, it does 
not make any effects.

>How-To-Repeat:
Compile rcs with -DLOCALID=\"Foo\", and check in a file with the line
$Foo$.

>Fix:
*** gnu/usr.bin/rcs/lib/rcsbase.h.orig	Tue Oct 15 20:31:16 1996
--- gnu/usr.bin/rcs/lib/rcsbase.h	Mon Oct 21 13:31:56 1996
***************
*** 435,440 ****
--- 435,443 ----
  #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 };
  	/* This must be in the same order as rcskeys.c's Keyword[] array. */
  
*** gnu/usr.bin/rcs/lib/rcsedit.c.orig	Tue Oct 15 20:31:20 1996
--- gnu/usr.bin/rcs/lib/rcsedit.c	Mon Oct 21 13:32:09 1996
***************
*** 1055,1063 ****
  		aputs(date2str(date,datebuf), out);
                  break;
  	    case Id:
  	    case Header:
  		escape_string(out,
! 			marker==Id || RCSv<VERSION(4)
  			? basefilename(RCSname)
  			: getfullRCSname()
  		);
--- 1055,1066 ----
  		aputs(date2str(date,datebuf), out);
                  break;
  	    case Id:
+ #ifdef LOCALID
+ 	    case LocalId:
+ #endif
  	    case Header:
  		escape_string(out,
! 			marker!=Header || RCSv<VERSION(4)
  			? basefilename(RCSname)
  			: getfullRCSname()
  		);
*** gnu/usr.bin/rcs/lib/rcskeep.c.orig	Tue Oct 15 20:31:31 1996
--- gnu/usr.bin/rcs/lib/rcskeep.c	Mon Oct 21 13:32:18 1996
***************
*** 197,202 ****
--- 197,205 ----
                  break;
              case Header:
              case Id:
+ #ifdef LOCALID
+ 	    case LocalId:
+ #endif
  		if (!(
  		      getval(fp, (struct buf*)0, false) &&
  		      keeprev(fp) &&
*** gnu/usr.bin/rcs/lib/rcskeys.c.orig	Tue Oct 15 20:31:31 1996
--- gnu/usr.bin/rcs/lib/rcskeys.c	Mon Oct 21 13:32:26 1996
***************
*** 76,81 ****
--- 76,84 ----
      /* 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
  };
  

>Audit-Trail:
>Unformatted: