Format Keywords

See Also

By default, VSS replaces the space between a keyword and the subsequent dollar sign with the value you've specified. This can, however, make it difficult to create an attractive columnar display.

To fix this, you can place two colons instead of one after the keyword and then add the amount of space that you want displayed. This tells VSS that the dollar sign after the keyword is exactly where you want it: VSS either adds space or truncates the value to ensure that the columns stay intact.

Binary Files

In addition to creating attractive columns, this feature is very useful when you want to embed keyword information in binary files (such as executable files), where the exact length of the data is important.

For example:

$Revision::     $

VSS expands the keyword with the version number of the file, and keeps the extra space you added inside the dollar sign character so that the revision number column maintains its width.

Formatting the History and Log Keywords

The History and Log keywords instruct VSS to put history information after the keyword. VSS places the file name between the colon and the dollar sign; in the lines following the keyword, it places the latest entry in the file's history.

To make sure the history is read as comments (to keep code compilable), your VSS administrator can define comment characters that VSS places before and after the History and Log lines.

Each file extension is associated with a string that is placed before every line, followed, optionally, by a string to be placed after every line. Both strings are in quotes, separated by commas.

Important   If no keyword comments are specified, the following comments are assumed:

*.asm = "; "

*.bas = "rem "

*.bat = "rem "

*.s = "; "

<All others> = "* "

Suppose your administrator does not have a setting for *.c in your SRCSAFE.INI file. VSS uses its default, which is an asterisk. You could then put the following into the header of your SS.INI file:

/*
 * $History: $
 */

Expanding this, VSS would place an asterisk before each line, and nothing after. The resulting file, after you add it to VSS, might look like the following:

/*
 * $History: IDRANGE.TXT $
 * 
 * ***** Version 1 *****
 * User:mariaj Date:8/01/92 Time:11:02a
 * Created
 * Comment: Defined ranges for IDs.
 */