Trailing-Edge
-
PDP-10 Archives
-
cuspmar86binsrc_2of2_bb-fp63a-sb
-
10,7/dil/dilsrc/versio.req
There are 5 other files named versio.req in the archive. Click here to see a list.
!++
! .chapter version
!
! Facility: DIX (used in DIL, DIT)
!
! Author: David Dyer-Bennet, 23-Aug-82
!
! .HL 1 Revision history
! This is the only bliss module that uses a straight text revision history.
! This is because the macros for doing it more neatly are later in the file.
!
! .hl 1 Description
!
! This require file (or library) defines the macros for easy edit
! history and version number definition in the style chosen for the
! facilities listed above.
!--
!++
! .hl 1 The edit history
!
! Edit (%O'22', '29-Oct-82', 'David Dyer-Bennet')
! %( Add an optional trailing field to the EDIT macro to hold "reason".
! Put in proper edit history!!!!!
! Files: VERSION.REQ
! )%
!
! new_version (2, 0)
!
! Edit (%O'36', '11-Apr-84', 'Sandy Clemens')
! %( Put all Version 2 DIX development files under edit control. Some of
! the files listed below have major code edits, or are new modules. Others
! have relatively minor changes, such as cleaning up a comment.
! FILES: COMDIX.VAX-COM, COMPDX.CTL, DIXCST.BLI, DIXDEB.BLI,
! DIXDN.BLI (NEW), DIXFBN.BLI, DIXFP.BLI, DIXGBL.BLI, DIXGEN.BLI,
! DIXHST.BLI, DIXINT.PR1, DIXINT.PR2, DIXLIB.BLI, DIXPD.BLI (NEW),
! DIXREQ.REQ, DIXSTR.BLI, DIXUTL.BLI, DXCM10.10-CTL, MAKDIXMSG.BLI,
! STAR36.BLI, VERSION.REQ.
! )%
!--
!++
! .hl 1 Edit history standards
!
! The DIL consists primarily of calls on two other facilities, the DIX
! and the DIT. Each of the three facilities will have its own revision
! history and version number. This is desirable because the DIX and DIT
! will be used independently of the DIL (in particular, they will
! probably be the basis for the Data Interchange Utility).
!
! Each source file including batch control files and command procedures
! will contain comments identifying which facility it belongs to, what
! edits have been installed in it, and its current edit level. Putting
! the build procedures under edit control should reduce the number of
! times they are mysteriously broken. Auxiliary source files, things
! like the DIL interface support files and the program to produce the
! DIX interface support files, will also be included under the facility
! edit history.
!
! Edit history information should be stored in chronological
! order (oldest first). The new_version macro should be used to show
! which edit levels correspond to which major and minor version numbers.
!
! Source files for program modules need some additional edit
! information: they must produce a word containing their edit number in
! OWN storage, called MODVER or fac$g_module_version (only use the long
! name if long names are fully supported on the system in use).
!
! Edit history information and version numbers should be extracted into
! the internals document from each file.
!
! Each facility will have a master revision history module (called
! xxxhst.bli, where xxx is the facility code) which produces a global
! literal containing the full version number (in the DEC-20 version
! number format, since VAX doesn't have one). This global literal will
! be called xxx$k_version, with a pseudonym of XXX%VE.
!
! All possible subsets of modules that might be loaded must declare an
! OWN word that is initialized to this version information. This word
! should be called xxxver or xxx$g_version, where xxx is the facility
! name. The easiest way to achieve this is to put it into each module.
! Each module should put in own storage both its own latest revision and
! the overall version of the facility that it was part of.
!
! The macro mark_versions (facility) defined below will make the
! two own variables described above for you. To use pseudonyms, declare
! the long names to be macros expanding to the short names.
!
! The test systems will have their own edit histories. This will be
! maintained in a handy text file. The test systems don't require the
! same level of care in this as the released software, because we do not
! have the requirement of being able to determine what version is being
! run from an EXE file some customer produced.
!
! BLISS modules must declare their IDENT to be the revision level they
! represent.
!
! The text string **edit_version** (or **EDIT**) should be used to flag
! each location in each file where version information is likely to have
! to be changed (the IDENT attribute, the start of the revision history).
!
! When making edits, be sure to update the idents on the files. Be sure
! to put in comments showing what edit you're making (use the number).
! Be sure to list the modules changed in the edit history comment. Be
! sure to use the edit number in giving ALU the reason for touching sources.
!--
!++
! .hl 1 Library files
!--
LIBRARY 'FIELDS'; ! \\
!++
! .hl 1 Version number definitions
!
! The concept of version numbers doesn't seem to exist on VMS and therefore
! is not defined in STARLET. Therefore, there is no point in putting the TOPS
! side of the version definitions into STAR36. Instead, the definitions for
! both systems appear in this module.
!--
LITERAL
ver$m_who_updated = make_mask (%BLISS36 (33, 3) %BLISS32 (27, 5)),
ver$m_major_version = make_mask (%BLISS36 (24, 9) %BLISS32 (21, 6)),
ver$m_minor_version = make_mask (%BLISS36 (18, 6) %BLISS32 (15, 6)),
ver$m_edit = make_mask (%BLISS36 (0, 18) %BLISS32 (0, 15));
!++
! .hl 1 Parameters and switches
!--
COMPILETIME
sequence_check_edits = 0; ! \.p;\By default, no sequence checking.
!++ .hl 1 Updating version information
! The following macro should be used, interspersed with the edit
! number information, to indicate the various points where major and
! minor version information changes. This will keep as the final
! definitions the last definition encountered, and provide some error
! checking.
!--
MACRO
new_version (major, minor) = ! \.p;\used to indicate major/minor edit number information.
%IF NOT (%DECLARED (major_version) AND %DECLARED (minor_version)) %THEN
COMPILETIME major_version = 0, minor_version = 0;
%FI
%IF major LSS major_version %THEN
%ERROR ('Attempt to decrease major version number: ', %NUMBER (major_version))
%FI
%IF major EQL major_version AND minor LEQ minor_version %THEN
%ERROR ('Version number must increase: ', %NUMBER (major_version), ', ',
%NUMBER (minor_version))
%FI
%ASSIGN (major_version, major)
%ASSIGN (minor_version, minor)
%;
!++
! .hl 2 The edit history
!--
MACRO
edit ! \.hl 3 \MACRO
!++
! This macro declares an edit for this module. A little checking
! is done for validity. If the compile-time sequence_check_edits is
! true, a warning is issued if the edits aren't at intervals of one.
!
! Formals:
!--
( ! ;.s 1.list 1
new_edit, ! \.le;\: Decimal edit number
edit_date, ! \.le;\: Date of edit, as a string (Ex: 4-Aug-82)
edit_maker, ! \.le;\: [%O'22'] Name of person making edit (full name please)
edit_reason ! \.le;\: [%O'22'] Reason for edit, like QAR, SPR, development, etc.
) = ! ;.end list
%IF (new_edit) LEQ EDIT_NUMBER %THEN
%ERROR ('Edit number mistyped or entered out of sequence')
%ELSE
%IF (((new_edit) - EDIT_NUMBER) NEQ 1) AND sequence_check_edits %THEN
%WARN ('Edit number sequence broken after edit ', %NUMBER (EDIT_NUMBER))
%FI
%FI
%ASSIGN (EDIT_NUMBER, (new_edit))
%IF NOT %ISSTRING (edit_date) OR %CHARCOUNT (edit_date) LSS 8 %THEN
%ERROR ('Edit date in incorrect format or mistyped: ', edit_date)
%FI
%IF NOT %ISSTRING (edit_maker) OR %CHARCOUNT (edit_maker) LSS 5 %THEN
%ERROR ('Edit maker in incorrect format or mistyped: ', edit_maker)
%FI
% ;
COMPILETIME
edit_number = 0;
!edit (0, '4-aug-82', 'David Dyer-Bennet')
!%( This is an example of the correct format for edit history information.
! Please use the DEC standard date format (dd-mon-yy). Please use
! full names for maintainer, not just initials. Please give a full
! explanation of the edit in your comment. Please list all files
! affected by your edit.)%
!++
! .hl 2 Make Version number word
! .index version number
! .index version_number
!--
KEYWORDMACRO
version_number (who = 0, major, minor, ! \.p;Keyword Macro \
edit_no) = ! \\MACRO to make version number word
%IF major EQL 0 AND minor EQL 0 %THEN
%PRINT ('Major and minor versions not set yet: ', %NUMBER (major),
', ', %NUMBER (minor))
%FI
%EXPAND position_field (ver$m_who_updated, who) OR
%EXPAND position_field (ver$m_major_version, major) OR
%EXPAND position_field (ver$m_minor_version, minor) OR
%EXPAND position_field (ver$m_edit, edit_no) % ;
!++
! .hl 2 Macro to simplify information in programs
!--
MACRO
mark_versions (facility) = ! \\MACRO to define
EXTERNAL LITERAL
%NAME (facility, '$k_version'); ! ;<facility'>$k_version and
OWN
%NAME (facility, '$module_version'): INITIAL ! ;<facility'>$module_version
(version_number
(major = major_version,
minor = minor_version,
edit_no = edit_number)
),
%NAME (facility, '$g_version'): INITIAL
(%NAME
(facility, '$k_version')
)
; % ;