Text-only Table of Contents (frame/ no frame)
(11) RCS keyword substitution Previous Top Next

RCS keyword substitution

Strings of the form $keyword$ or $keyword:... are replaced with the form $keyword:value$ when a file is checked out. These are typically placed in comments or literal strings. The format for a "comment" is derived from the syntax of the line containing the keyword -- RCS does not know the syntax of any particular programming language
e.g.
Fortran:
  C Fortran program last modified by $Author$ on $Date$

  C Fortran program last modified by $Author:richard$ on $Date:2006/02/02 21:38:40$
$

C/C++:
  /*
   * $Header$
   *
   */
  static char *rcsid="$Header$";
   
  /*
   * $Header: /home/richard/projects/simulation/RCS/main.c,v 1.18 2006/02/02 21:38:40 richard Exp richard $"
   *
   */
   static char *rcsid="$Header: /home/richard/projects/simulation/RCS/main.c,v 1.18 2006/02/02 21:38:40 richard Exp richard $";

Shell, perl etc.:
  #!/bin/sh
  # $Header$
  #
  # Revision history:
  # $Log$

  #!/bin/sh
  # $Header: /afs/northstar/ufac/richard/projects/class-web-builder/RCS/buildhtml,v 1.18 2006/02/02 21:38:40 richard Exp richard $
  #
  # Revision history:
  # $Log: buildhtml,v $
  # revision 1.2
  # date: 2003/10/30 17:27:06;  author: richard;  state: Exp;  lines: +9 -69
  # Added processing of  tags with optional material.
  # ----------------------------
  # revision 1.1
  # date: 2003/10/30 17:21:57;  author: richard;  state: Exp;
  # Initial revision

Previous Top Next


RCS-keywords.src  last modified Sep 20, 2007 Introduction Table of Contents
(frame/no frame)
Printable
(single file)
© Dartmouth College