09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>XENIX</strong> Programming SCCS: Source Code Control System<br />

You may give more than one file name. If you do, the command checks each file in<br />

turn. You may also give the name of a directory, in which case the command checks all<br />

files in the directory.<br />

Since failure to repair a damaged s-file can destroy the file's contents or make the file<br />

inaccessible, it is a good idea to regularly check all s-files for damage.<br />

Editing an s-file<br />

When an s-file is discovered to be damaged, it is a good idea to restore a back-up copy<br />

of the file from a back-up disk or tape rather than attempting to repair the file.<br />

(Restoring a back-up copy of a file is described in the <strong>XENIX</strong> <strong>2<strong>86</strong></strong> System<br />

Administrator's <strong>Guide</strong>.) If this is not possible, the file may be edited using a <strong>XENIX</strong> text<br />

editor.<br />

To repair a damaged s-file, use the description of an s-file given in the entry sccsfile in<br />

"File Formats" in the <strong>XENIX</strong> <strong>2<strong>86</strong></strong> C Library <strong>Guide</strong> to locate the damaged part of the<br />

file. Use extreme care when making changes; small errors can cause unwanted results.<br />

Changing an s-file's Checksum<br />

After repairing a damaged s-file, you must change the file's checksum using the -z<br />

option of the admin command. For example, to restore the checksum of the repaired<br />

file s.demo.c, type<br />

admin -z s.demo.c<br />

The command computes and saves the new checksum, replacing the old sum.<br />

Regenerating a g-file for Editing<br />

You can create a g-file for editing without affecting the current contents of the p-file<br />

by using the -k option of the get command. The option has the same effect as the -e<br />

option except that the current contents of the p-file remain unchanged. The option is<br />

typically used to regenerate a g-file that has been accidentally removed or destroyed<br />

before it has been saved using the delta command.<br />

Restoring a Damaged p-file<br />

The -g option of the get command may be used to generate a new copy of a p-file that<br />

has been accidentally removed. For example, the command<br />

get -e -g s.demo.c<br />

creates a new p-file entry for the most recent version in s.demo.c. If the file demo.c<br />

already exists, it will not be changed by this command.<br />

5-25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!