Ident(1) doesn't report SCCS what strings. +Fix
Gary Winiger
gww at beatnix.UUCP
Sun Mar 13 06:28:45 AEST 1988
Subject: Ident(1) doesn't report SCCS what strings. +Fix
Index: new/rcs/src/ident.c 4.3BSD
Description:
Berkeley distributes most routines with SCCS what strings. Many
of us use RCS to maintain the Berkeley code. It would be nice if
we could see the original what string as well as any RCS headers
that were in our maintained code.
Repeat-By:
Run ident as distributed
Procedure to repeat the problem.
Fix:
The attached code adds this feature at Elxsi.
Description of how to fix the problem.
If you don't know the fix, don't include this section or "Fix:".
Use with pleasure....
Gary..
{ucbvax!sun,uunet,lll-lcc!lll-tis,amdahl!altos86,bridge2}!elxsi!gww
--------- cut --------- snip --------- :.,$w diff -------------
Index: /usr/src/new/rcs/src/ident.c
*** /tmp/,RCSt1001229 Tue Aug 4 16:49:14 1987
--- ident.c Tue Aug 4 16:19:26 1987
***************
*** 1,10 ****
/*
* $Log: ident.c,v $
* Revision 1.1 86/12/09 17:33:50 gww
* Initial revision
*
*/
! static char *ERcsId = "$Header: ident.c,v 1.1 86/12/09 17:33:50 gww Exp $ ENIX BSD";
/*
* RCS identification operation
*/
--- 1,13 ----
/*
* $Log: ident.c,v $
+ * Revision 1.2 87/08/04 16:19:10 gww
+ * Add display of sccs what strings.
+ *
* Revision 1.1 86/12/09 17:33:50 gww
* Initial revision
*
*/
! static char *ERcsId = "$Header: ident.c,v 1.2 87/08/04 16:19:10 gww Exp $ ENIX BSD";
/*
* RCS identification operation
*/
***************
*** 69,74 ****
--- 72,79 ----
while( (c=getc(fp)) != EOF) {
if ( (char)c==KDELIM)
matchcount += match(fp);
+ else if ( (char)c=='@')
+ matchcount += what(fp);
}
if (matchcount == 0)
fprintf(stderr, "ident warning: no id keywords in %s\n", *argv);
***************
*** 132,135 ****
--- 137,161 ----
if (s[j] == VDELIM)
return(true);
return(false);
+ }
+
+
+ what(fp)
+ FILE *fp;
+
+ {
+ char line[keyvallength];
+ register int c;
+ register char * tp;
+
+ if ((getc(fp) == '(') && (getc(fp) == '#') && (getc(fp) == ')') ) {
+ tp = line;
+ while(((c = getc(fp)) != '\0') && (c != '\n') && (c != '"') &&
+ (c != EOF) && (tp <= line+keyvallength-1))
+ *tp++ = c;
+ *tp='\0';
+ fprintf(stdout," %s\n",line);
+ return(1);
+ } else
+ return(0);
}
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list