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 sees: Source Code Control System Creating an s-file You can create an s-file from an existing text file using the -i (for "initialize") option of the admin command. The command has the form admin -ifilename s. filename where -ifilename gives the name of the text file from which the s-file is to be created, and s.filename is the name of the new s-file. The name must begin with s. and must be unique; no other s-file in the same directory may have the same name. For example, suppose the file named demo.c contains the short C language program #include main () { printf("This is version 1.1 \n"); } To create an s-file, type admin -idemo.c s.demo.c This command creates the s-file s.demo.c and copies the first delta describing the contents of demo.c to this new file. The first delta is numbered 1.1. After creating an s-file, the original text file should be removed using the rm command. It is no longer needed. If you wish to view the text file or make changes to it, you can retrieve the file using the get command described in the next section. When you are first creating an s-file, the admin command may display the warning message No id keywords (cm7) In general, this message can be ignored unless you have specifically included keywords in your file (see the section "Using Identification Keywords" later in this chapter). Note that only a user with write permission in the directory containing the s-file may use the admin command on that file. This protects the file from adm inistration by unauthorized users. Retrieving a File for Reading You can retrieve a file for reading from a given s-file by using the get command. The command has the form get s.filename • • . 5-5
SCCS: Source Code Control System XENIX Programming where s.filename is the name of the s-file containing the text file. The command retrieves the lastest version of the text file and copies it to a regular file. The file has the same name as the s-file but with the s. removed. It also has read-only file permissions. For example, suppose the s-file s.demo.c contains the first version of the short C program shown in the previous section. To retrieve this program, type get s.demo.c The command retrieves the program and copies it to the file named demo.c. You may then display the file just as you do any other text file. The command also displays a message that describes the SID of the retrieved file and its size in lines. For example, after retrieving the short C program from s.demo.c, the command displays the message 1. 1 6 lines You may also retrieve more than one file at a time by giving multiple s-file names in the command line. For example, the command get s.demo.c s.def.h retrieves the contents of the s-files s.demo.c and s.def.h and copies them to the text files demo.c and def.h. Multiple s-file names in a command must be separated by spaces or tabs. When the get command displays information about the files, it places the corresponding file name before the relevant information. Retrieving a File for Editing You can retrieve a file for editing from a given s-file by using the -e (for "editing") option of the get command. The command has the form get -e s. filename • • • where s.filename is the name of the s-file containing the text file. You may give more than one file name if you wish. If you do, you must separate the names with spaces or tabs. get retrieves the latest version of the text file and copies it to an ordinary text file. The file has the same name as the s-file but with the s. removed. It has read and write file permissions. For example, suppose the s-file s.demo.c contains the first version of a C program. To retrieve this program, type get -e s.demo.c The command retrieves the program and copies it to the file demo.c. You may edit the file just as you do any other text file. If you give more than one file name, the command creates files for each corresponding s-file. Since the -e option applies to all the files, you may edit each one. 5-6
- Page 19 and 20: cc: C Compiler XENIX Programming Th
- Page 21 and 22: cc: C Compiler XENIX Programming Th
- Page 23 and 24: cc: C Compiler XENIX Programming Cr
- Page 25 and 26: cc: C Compiler XENIX Programming Th
- 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: 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 and 78: SCCS: Source Code Control System XE
- Page 79 and 80: 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
SCCS: Source Code Control System <strong>XENIX</strong> Programming<br />
where s.filename is the name of the s-file containing the text file. The command<br />
retrieves the lastest version of the text file and copies it to a regular file. The file has<br />
the same name as the s-file but with the s. removed. It also has read-only file<br />
permissions. For example, suppose the s-file s.demo.c contains the first version of the<br />
short C program shown in the previous section. To retrieve this program, type<br />
get s.demo.c<br />
The command retrieves the program and copies it to the file named demo.c. You may<br />
then display the file just as you do any other text file.<br />
The command also displays a message that describes the SID of the retrieved file and its<br />
size in lines. For example, after retrieving the short C program from s.demo.c, the<br />
command displays the message<br />
1. 1<br />
6 lines<br />
You may also retrieve more than one file at a time by giving multiple s-file names in<br />
the command line. For example, the command<br />
get s.demo.c s.def.h<br />
retrieves the contents of the s-files s.demo.c and s.def.h and copies them to the text<br />
files demo.c and def.h. Multiple s-file names in a command must be separated by spaces<br />
or tabs. When the get command displays information about the files, it places the<br />
corresponding file name before the relevant information.<br />
Retrieving a File for Editing<br />
You can retrieve a file for editing from a given s-file by using the -e (for "editing")<br />
option of the get command. The command has the form<br />
get -e s. filename •<br />
• •<br />
where s.filename is the name of the s-file containing the text file. You may give more<br />
than one file name if you wish. If you do, you must separate the names with spaces or<br />
tabs.<br />
get retrieves the latest version of the text file and copies it to an ordinary text file. The<br />
file has the same name as the s-file but with the s. removed. It has read and write file<br />
permissions. For example, suppose the s-file s.demo.c contains the first version of a C<br />
program. To retrieve this program, type<br />
get -e s.demo.c<br />
The command retrieves the program and copies it to the file demo.c. You may edit the<br />
file just as you do any other text file.<br />
If you give more than one file name, the command creates files for each corresponding<br />
s-file. Since the -e option applies to all the files, you may edit each one.<br />
5-6