next up previous contents
Next: Program Structure Up: Source Code Style Previous: Naming conventions

Creating new files

When new files are to be added to VMD , for any of the different subdirectories, the following steps should be followed:

  1. Once an initial version of the file is ready, it must be formatted properly to conform to the standards used by files similar to it, i.e., to be similar to other .h files if the file is a C/C++ header. The rules for formatting each type of file are given in the following section.
  2. If RCS is being used, then after formatting for almost all cases the file must be put in the RCS system. The only type of files which should NOT be placed in the RCS are the following: To put a file in RCS, follow the steps in section 2.2.
  3. Once placed in the RCS, the configure script must be updated, if necessary, to include the name of the new file in the appropriate list. For example, if a new C++ object is being added and there are two new files newobj.C and newobj.h, the names of these files would go into the lists of VMD C++ source code and header files in the configure script.

File formats

There are several types of files which may be added to the whole set of VMD working files. This section describes how to format them, and where to put them.

Many types of files (particularly, C/C++/Fortran source code or header files, Latex documentation files, and shell script files) require an RCS header at the beginning of the file. This header should be placed at the very beginning, before any other text in the file. It consists of a set of comment lines which describe the name, purpose, and history of revisions to the file. This is done by using RCS keywords embedded in the comments, which are replaced by the proper values when the file is checked out, and by having a section in the comments for a basic description of the purpose of the file. Templates of RCS headers for each of the different file types which require them are provided in the directory RCS. When a new file is created, a copy of the relevant header template should be placed at the top of the file, and the file description inserted as comments in the section of the template provided for this purpose. The descriptions below of how to format each file also describe the name of the RCS template to use.



next up previous contents
Next: Program Structure Up: Source Code Style Previous: Naming conventions



Andrew Dalke
Wed May 15 02:25:03 CDT 1996