Jump to: navigation, search
From: VAXK::FERRON
Date: 17-NOV-1993  11:10:58
Description: procedure in use to maintain a single source code version

Version 5/18/92
 
This is a description of the procedure in use to maintain
a single version of the EFIT source code that can be used on
VMS or Unix.  This procedure has been successfully used to port
EFIT to the Sun Unix environment and is being used for the HP and SuperCard
versions of EFIT.  This procedure might also be useful for other codes
that must have versions for different machines.
----------------------------------------------------------------------
 
The maintenance procedure that has been adopted works as follows.
 
1. There is a master version of the source code in the EFIT directory
with an X suffix, e.g. EFITDX.FOR, PLTDISDX.FOR etc.
2. There is a
command procedure to convert these files to the VMS version, EFITDN.FOR etc.,
and another procedure to convert to the Unix version,  EFITDU.FOR etc.
3. To make an EFIT executable, the conversion command procedure
is first executed and then the normal compile and link command procedure
is executed.
 
The format of the X version source files is as follows:
1. The standard EFIT source code is used with a few modifications
which are marked with a specific set of characters at the beginning
of the line.  A few other modifications are also made by the
editor in the conversion command procedure.
2. The modifications change code lines that are different in Unix
and VMS.  The modifications can also add comment lines.
3. The modifications are marked as follows:
(a) Modified source code lines begin with C^*^ where * indicates one
of the following characters: o, j, u, v, b, s.  When adding these characters
they replace 4 spaces at the beginning of the line so the code
stays readable.
(b) A source code line may also begin with C^*^T where * is one
of o, j, u, v, b, s.  This string is used at the beginning of a line
that begins with a tab or which does not have at least 4 spaces at the
beginning of the line (e.g. when a statement label is present).
This is not as readable but not too bad.
(c) A source code line could also begin with CC^*^ or CC^*^T.
This type of line will become a comment line in the converted code.
 
4. There are two classes of modifications to the source code:
(a) Changes that if made permanent
in the EFIT source would compile and run under both VMS and Unix.
For these the * character is o or j.
(b) Unavoidable, permanent, differences between Unix and VMS.  For these the
* character is u, or v.
(c) Some changes are used for the vax and unix version but not the SuperCard
version. For these the * character is b.
(d) Some changes are used only for the SuperCard version. For these the
* character is s.
 
--------------------------------------------------------
Changes which should become permanent changes to EFITDX.
--------------------------------------------------------
These are changes which will not hurt the vax code and which are needed
by the unix code.
 
The original version of the code is in lines that begin with C^o^.
The recommended new code is in lines that begin with C^j^.
 
To get the original code from the X code version
do the following in the order specified:
a) Cut out all of the strings: C^o^T.
b) Replace all of the strings C^o^ with 4 spaces.
c) All lines containing the string C^j^ should be cut out (i.e. find the
   string, go back to the beginning of that line and remove the line).
d) Cut out all of the strings C^b^T.
e) Replace all of the strings C^b^ with 4 spaces.
 
To get the new code from the X code version:
a) Cut out all of the strings: C^j^T.
b) Replace all of the strings C^j^ with 4 spaces.
c) All lines containing the string C^o^ should be cut out (i.e. find the
   string, go back to the beginning of that line and remove the line).
d) Cut out all of the strings C^b^T.
e) Replace all of the strings C^b^ with 4 spaces.
 
----------------------------------------------------------------------
Changes that account for hard to avoid differences between unix and vms
----------------------------------------------------------------------
The vms version of the code is in lines beginning with C^v^.
The unix version of the code is in lines beginning with C^u^.
 
To get the vms code from the X code version
do the following in the order specified:
a) Cut out all of the strings: C^v^T.
b) Replace all of the strings C^v^ with 4 spaces.
c) All lines containing the string C^u^ should be cut out (i.e. find the
   string, go back to the beginning of that line and remove the line).
 
To get the unix code from the X code version:
a) Cut out all of the strings: C^u^T.
b) Replace all of the strings C^u^ with 4 spaces.
c) All lines containing the string C^v^ should be cut out (i.e. find the
   string, go back to the beginning of that line and remove the line).
d) Cut out all of the strings C^b^T.
e) Replace all of the strings C^b^ with 4 spaces.
 
----------------------------------------------------------------------
The SuperCard version
----------------------------------------------------------------------
a) Cut out all of the strings C^s^T.
b) Replace all of the strings C^s^ with 4 spaces.
c) Follow the procedure for the u lines in the unix version.
d) Leave all of the strings C^b^ or C^b^T present.  These will comment
out lines not needed on the supercard.