Certain keywords will be automatically expanded in source files:
- $Id$ -- filename, revision, date, author, state
- $Date$ -- date and time the file was checked in
- $Author$ -- author of the file
- $Revision$ -- revision of the file
- $Log$ -- causes log entries to be appended
An example:
/* $Id: hello.c,v 1.3 1996/11/15 22:14:05 swetland Exp $
* $Date: 1996/11/15 22:14:05 $
* $Author: swetland $
* $Revision: 1.3 $
*/
main()
{
printf("Hello World");
}
If you embed this strings in a string constant, the rcs ident
command can be used to get the version of an executable. Example, hello.c:
static char *id = "$Id: hello.c,v 1.3 1996/11/15 22:14:05 swetland Exp $";
main()
{
printf("Hello, World!");
}
|