Intel XENIX 286 Programmers Guide (86) - Tenox.tc
Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc
XENIX Programming SCCS: Source Code Control System Using Identification Keywords sees provides several special symbols, called identification keywords, that can be used in the text of a program or document to represent predefined values. Keywords represent values ranging from the creation date and time of a given file to the name of the module containing the keyword. When a user retrieves the file for reading, sees automatically replaces each keyword it finds in a given version of a file with the keyword's value. This section explains how keywords are treated by the various SCCS commands and how you may use the keywords in your own files. Only a few keywords are described in this section. For a complete list of the keywords, see get in Appendix B, "Programming Commands." Inserting a Keyword into a File You may insert a keyword into any text file. A keyword is simply an uppercase letter enclosed in percent signs {%}. For example, 96196 is the keyword representing the SID of the current version, and 96H96 is the keyword representing the current date. When a file is retrieved for reading using the get command, the keywords are replaced by their current values. For example, if the 96M96, 96196, and 96H96 keywords are used in place of the module name, the SID, and the current date in the program statement char header( 100) = {" %M% %1% %H% "}; then these keywords are expanded in the retrieved version of the program char header( 1 00) = {" MODNAME 2.3 07107177 "}; The get command does not replace keywords when retrieving a version for editing. SCCS assumes that you wish to keep the keywords (and not their values) when you save the new version of the file. To indicate that a file has no keywords, the get, delta, and admin commands display the message No id keywords (cm7) This message is normally treated as a warning, letting you know that no keywords are present. However, you may change the operation of the system to make this a fatal error as explained later in this chapter. 5-13
SCCS: Source Code Control System XENIX Programming Assigning Values to Keywords The values of most keywords are predefined by the system, but some, such as the value for the 96M96 keyword, can be explicitly defined by the user. To assign a value to a keyword, you must set the corresponding s-file flag to the desired value. You can do this by using the -f option of the admin command. For example, to set the 96M96 keyword to "cdemo", set the m flag as in the command admin -fmcdemo s.demo.c This command records "cdemo" as the current value of the 96M96 keyword. Note that if you do not set the m flag, SCCS uses the name of the original text file for 96M96 by default. The t and q flags are also associated with keywords. A description of these flags and the corresponding keywords can be found in the entry get in Appendix B, "Programming Commands." You can change keyword values at any time. Forcing Keywords You can force a fatal error if a version is found to contain no keywords by setting the i flag in the given s-file. The flag causes the delta and admin commands to stop processing of the given version and report an error if no keywords are found. The flag is useful for ensuring that keywords are used properly in a given file. To set the i flag, you must use the -f option of the admin command. For example, the command admin -fi s.demo.c sets the i flag in the s-file s.demo.c. Subsequent delta or admin commands that access this file print an error message if the given version does not contain keywords. Note that if you attempt to set the i flag at the same time you create an s-file and if the initial text file contains no keywords, the admin command displays a fatal error message and stops without creating the s-file. Using s-file Flags An s-file flag is a special value that defines how SCCS will operate on the corresponding s-file. The s-file flags are stored in the s-file and are read by each SCCS command before it operates on the file. The s-file flags affect keyword checking, keyword replacement values, and default values for commands. This section explains how to set and use s-file flags. It also describes the action of commonly used flags. For a complete description of all flags, see the entry admin in Appendix B, "Programming Commands." 5-14
- Page 27 and 28: cc: C Compiler XENIX Programming Co
- Page 29 and 30: cc: C Compiler XENIX Programming Sa
- Page 31 and 32: cc: C Compiler XENIX Programming Us
- Page 33 and 34: cc: C Compiler XENIX Programming Wh
- Page 35 and 36: cc: C Compiler XENIX Programming Co
- Page 37 and 38: cc: C Compiler XENIX Programming d
- Page 39 and 40: cc: C Compiler XENIX Programming Se
- Page 41 and 42: lint: C Program Checker XENIX Progr
- Page 43 and 44: lint: C Program Checker XENIX Progr
- Page 45 and 46: lint: C Program Checker XENIX Progr
- Page 47 and 48: lint: C Program Checker XENIX Progr
- Page 49 and 50: lint: C Program Checker XENIX Progr
- Page 51 and 52: lint: C Program Checker XENIX Progr
- Page 53 and 54: make: Program Maintainer XENIX Prog
- Page 55 and 56: make: Program Maintainer XENIX Prog
- Page 57 and 58: make: Program Maintainer XENIX Prog
- Page 59 and 60: make: Program Maintainer XENIX Prog
- Page 61 and 62: make: Program Maintainer XENIX Prog
- Page 63 and 64: make: Program Maintainer XENIX Prog
- Page 65 and 66: make: Program Maintainer print: $(F
- Page 67 and 68: SCCS: Source Code Control System XE
- Page 69 and 70: SCCS: Source Code Control System XE
- Page 71 and 72: SCCS: Source Code Control System XE
- Page 73 and 74: SCCS: Source Code Control System XE
- Page 75 and 76: SCCS: Source Code Control System XE
- Page 77: SCCS: Source Code Control System XE
- Page 81 and 82: SCCS: Source Code Control System XE
- Page 83 and 84: SCCS: Source Code Control System XE
- Page 85 and 86: SCCS: Source Code Control System XE
- Page 87 and 88: SCCS: Source Code Control System XE
- Page 89 and 90: SCCS: Source Code Control System XE
- Page 91 and 92: SCCS: Source Code Control System XE
- Page 93 and 94: SCCS: Source Code Control System XE
- Page 95 and 96: SCCS: Source Code Control System XE
- Page 98 and 99: CHAPTER 6 adb: PROGRAM DEBUGGER adb
- Page 100 and 101: XENIX Programming adb: Program Debu
- Page 102 and 103: XENIX Programming adb: Program Debu
- Page 104 and 105: XENIX Programming adb: Program Debu
- Page 106 and 107: XENIX Programming adb: Program Debu
- Page 108 and 109: XENIX Programming adb: Program Debu
- Page 110 and 111: XENIX Programming adb: Program Debu
- Page 112 and 113: XENIX Programming adb: Program Debu
- Page 114 and 115: XENIX Programming adb: Program Debu
- Page 116 and 117: XENIX Programming int fcnt,gcnt,hcn
- Page 118 and 119: XENIX Programming adb: Program Debu
- Page 120 and 121: XENIX Programming adb: Program Debu
- Page 122 and 123: XENIX Programming adb: Program Debu
- Page 124 and 125: XENIX Programming adb: Program Debu
- Page 126 and 127: XENIX Programming adb: Program Debu
<strong>XENIX</strong> Programming SCCS: Source Code Control System<br />
Using Identification Keywords<br />
sees provides several special symbols, called identification keywords, that can be used<br />
in the text of a program or document to represent predefined values. Keywords<br />
represent values ranging from the creation date and time of a given file to the name of<br />
the module containing the keyword. When a user retrieves the file for reading, sees<br />
automatically replaces each keyword it finds in a given version of a file with the<br />
keyword's value.<br />
This section explains how keywords are treated by the various SCCS commands and how<br />
you may use the keywords in your own files. Only a few keywords are described in this<br />
section. For a complete list of the keywords, see get in Appendix B, "Programming<br />
Commands."<br />
Inserting a Keyword into a File<br />
You may insert a keyword into any text file. A keyword is simply an uppercase letter<br />
enclosed in percent signs {%}. For example, 96196 is the keyword representing the SID of<br />
the current version, and 96H96 is the keyword representing the current date.<br />
When a file is retrieved for reading using the get command, the keywords are replaced<br />
by their current values. For example, if the 96M96, 96196, and 96H96 keywords are used in<br />
place of the module name, the SID, and the current date in the program statement<br />
char header( 100) = {" %M% %1% %H% "};<br />
then these keywords are expanded in the retrieved version of the program<br />
char header( 1 00) = {" MODNAME 2.3 07107177 "};<br />
The get command does not replace keywords when retrieving a version for editing. SCCS<br />
assumes that you wish to keep the keywords (and not their values) when you save the<br />
new version of the file.<br />
To indicate that a file has no keywords, the get, delta, and admin commands display the<br />
message<br />
No id keywords (cm7)<br />
This message is normally treated as a warning, letting you know that no keywords are<br />
present. However, you may change the operation of the system to make this a fatal<br />
error as explained later in this chapter.<br />
5-13