|
Next: Compiling VIS and Up: No Title Previous: An Example Package
Maintenance UtilitiesThe VIS environment currently has two maintanance utilities; extdoc, which extracts documentation from source code, and extproto, which automatically inserts function declarations within header and source files. VIS uses the Revision Control System, or RCS, for version control.
extprotoExtproto analyzes source code and inserts automatically-generated function declarations into the appropriate source and header files. It requires a package that follows the conventions in Chapters 2 and 3. When run on a header file named package.h (the external header file), it looks for externally-visible functions (i.e., those with the prefix Package_) and places them between the /**AutomaticStart*** and /**AutomaticEnd*** comments within the header file described in Chapter 2. When run on a header file named packageInt.h (the internal header file), it looks for internally-visible functions (i.e., those with the prefix Package) and places them between the automatic comments within the file. When run on a C source file, it looks for static functions and places them between the /**AutomaticStart** and /**AutomaticEnd comments. For example, if extproto is run on the rng example described in the previous section, then it will add lines to the files in the package as shown.
extdocExtdoc extracts documentation from packages that follow the conventions in Chapters 2 and 3. It can write both simple text files, or HTML for the World Wide Web. For example, running extdoc on the rng package of Chapter 4 in text-producing mode, % extdoc --text rng processing rngRangeIntUtil.c processing rngRangeUtil.c processing rngInt.h processing rng.h writing rngDoc.txt %creates a file rngDoc.txt that contains The rng package This package deals with functions that are used to manipulate the range (Rng_Range_t) data structure. Gitanjali Swamy ********************************************************************** Rng_RangeAlloc() Allocates memory for a Rng_Range_t. Rng_RangeFree() Free memory associated with a Rng_Range_t. Rng_RangeOrWithRange() OR two ranges. Rng_RangeReadBegin() Return the beginning of the range. Rng_RangeReadEnd() return the end of the range. Rng_RangeSetBegin() Set the beginning of the range. Rng_RangeSetEnd() Set the end of the range ********************************************************************** The basic data structure in the range package is an integer range. The range is designated as {L,U}, where L is the lower limit of the range, and U is the upper limit of the range, and includes all integers x, L =< x =< U). Rng_Range_t* Rng_RangeAlloc( ) This functions takes no inputs, and when called allocates space for and returns a new Rng_Range_t. void Rng_RangeFree( Rng_Range_t * range ) This function takes a Rng_Range_t* as input, and free the memory used by it. Side Effects: Rng_Range_t is no longer valid. Rng_Range_t * Rng_RangeOrWithRange( Rng_Range_t* range1, Rng_Range_t* range2 ) Given two ranges, this function OR's together the two, and returns the result. If the two ranges do not overlap it returns with an error flag. Rng_RangeReadBegin( range ) Given a range {L,U}, this returns the beginning value L of the range. Rng_RangeReadEnd( range ) Given a range {L,U}, this returns the ending value U of the range. Rng_RangeSetBegin( range, val ) Given a range and a value L, this sets the beginning value L of the range. Side Effects: There original beginning value of the range is lost. Rng_RangeSetEnd( range, val ) Given a range and a value L, this sets the end value L of the range. Side Effects: There original ending value of the range is lost.
RCSRCS is a file-based revision control system used within VIS. To use RCS within VIS,
The files in the packages in $VIS/common/src are not writable. All changes must be made through RCS, using the working area $VIS_USER_DIR. The Makefile in each package has 5 RCS commands defined. These commands operate on all the files of the package under RCS control, namely RCSFILES = $(SRC) $(HDR) $(MISC) $(LFILE) $(YFILE) as defined in the Makefile.
To use the commands on package pkg, first create directory pkg in
The first two commands do all the work. The last three are only for informational purposes; you can't do any harm by using them. More experienced RCS users can specify options to the RCS commands by setting the RCSFLAGS in the gmake invocation (e.g., gmake RCSFLAGS='-b -i' rcs_diff). RCS commands can be performed from the Makefile at $VIS/common/src:
For files not part of code packages but under RCS control (e.g., src/Makefile, ext/*), you must use RCS commands on individual files; there is no Makefile support for them.
Next: Compiling VIS and Up: No Title Previous: An Example Package
Tom Shiple Fri May 10 17:19:47 PDT 1996 |
Contact |
©2002-2018 U.C. Regents |