2 Some technical information about fiddling with KED2 --------------------------------------------------    E I have written the MAKE_KED file in a modular fashion, so that if you C want to change anything, you can use this procedure to compile just D the bit you want. There are 5 optional parameters you can add to the @MAKE_KED command. They are:  F    COMPILE - Creates the object file KED.OBJ_xxx from the source KED.CE    LINK    - Compiles the CLD file and link objects to create KED.EXE 5    SECTION - Creates the section file KED.TPU$SECTION +    HELP    - Creates the help file KED$HELP 2    DCLHELP - Adds the DCL help to the help library  E So if you have customised only the .TPU files, or if you have created F a new .TPU file and added it to KED_MASTER.FILE, then you only need to run the command    @MAKE_KED SECTION   A If you have a helpfile for it, then MAKE_KED will look for a file D named <filename>.HLP - where <filename> matches the file name in theC TPU file, <filename>.TPU, and if it finds it, automatically adds it - into the KED help library.  In this case use:    @MAKE_KED SECTION HELP    B Beware if you add your own extensions that you do not overwrite anA extension in the KED tpu files. You may unintentionally lose some E functionality. Check all the procedures amended by the new extension, D and if any are already in one of the KED TPU files, you will need toF amend the code to merge the changes in both versions of the procedure.    D If you decide you want to change things, or experiment with it, here8 is some information on checking out the TPU source files    C To make the TPU source file readable, I have used a standard naming 3 convention on all the names used in KED as follows:     A 1. All constant and variable names take the form: KED_ab_<xxxxxx>   9 where:    a = either "k" for constant or "x" for variable (           b = type of variable/constant:                    "a" = array                    "b" = buffer B                    "c" = character string (that is not a filename)"                    "f" = file name                     "k" = keyword6                    "l" = logical value (TRUE or FALSE)E                    "m" = message (or fao string for message template) (                    "n" = numerical value                     "p" = pattern                    "r" = range                    "w" = window A                    "x" = marker (X marks the spot, and m is gone) 2           <xxxxxx>  = A description of its purpose    A 2. All other names beginning KED_ are procedure names.  Thus, all 1    the procedure names take the form KED_<xxxxxx>   B Where:    <xxxxxx> is a symbol name descriptive of their function.    8 3. All parameters to functions take the form Pn_<xxxxxx>  , where:	n = the parameter number (1, 2, etc.)) 	<xxxxxx> = a description of its purpose.     C 4. All other symbols that are not TPU keywords are local variables.     C If you make a change that you think may be useful to others, please F contact me with it, so I can merge it into the release.  Please do notF distribute modified versions. This way we can be sure that the version7 available publicly is always the same standard version.     E If you want to try your hand at writing new stuff or enhancing KED, I C have included the ked_debug module. This contains an enhanced debug E mechanism. You need to build KED with the debug module included, then B to test any procedures you write or amend, first strip them of allD comments, and trailing spaces, then use the select key to select all4 the new or changed procedures and enter the command: DEBUG MESSAGESC This will cause the procedure to write a trail of messages out, so  E you can follow the trail through the code path, and give the value of ' any variable that gets set at the time.   F There are some other commands, like SHOW ARRAY, which shows the valuesF in an array. Check the source code to see if you find anything useful.   ---      Notes on the DIFFERENCE module  C If you read through the source in EVE_DIFFERENCE.TPU, you will find B references to a second parameter to find_next, taking values of UP@ or DOWN.  This was because I was writing some code to allow the C next diff command to work with more than 2 windows, and you specify D whether you are diff'ing against the window above or below by,  e.g.  , NEXT DIFF "" UP     or     NEXT DIFF "" DOWN  F This mostly works, but had some bugs that I never got round to fixing.F Also it looks kinda clunky with the double quotes in the middle. Plus,D it means you can only diff adjacent windows. So I wanted something aC bit slicker.  I started redesigning it slightly but never got round D to completing it. So all the documentation assumes exactly 2 windows
 for diff'ing.   C You are welcome to use the 2nd parameter, but don't get upset if it  sometimes goes wrong.    ---    Running with KHF$FIND_ALL   C If you are including a copy of Ken Fairfield's add-on KHF$FIND_ALL, @ there is another version of eve$search in that, which will clashB with the version of eve$search in BED.TPU.  You will need to mergeB the two versions.  Since BED only makes a very few changes to this@ procedure, it is simpler to take Ken's version and merge in the > changes from BED. Here is an SLP difference file that you can / apply to KHF$FIND_ALL.TPU to merge the changes.    -    5! variable bed_xl_find_at_curr_pos;  -  249 ON_ERROR)  [TPU$_NONAMES]: ! Suppress error message  ENDON_ERROR; - 1203&   if (bed_xl_find_at_curr_pos <> TRUE)   then - 1218   endif; /     + Put this in a file (DIFF.UPD, say) then run   + EDIT /SUM KHF$FIND_ALL.TPU /UPDATE=DIFF.UPD   B This will put the changes to eve$search required for BED, into the@ version in Ken's file.  You then just need to make sure that theC entry in KED_MASTER.FILE for KHF$FIND_ALL.TPU occurs after the line 4 BED.TPU - to ensure the right one will be picked up.     ---    Using KED with FLIST  E Hunter Goatley has allowed me to inveigle various pieces of code into D the FLIST source, to allow KED to interwork well with FLIST.  If youF wish to use KED as the kept editor for FLIST, ensure that the variableF 'FLIST$USE_KED' is set to the value TRUE, (either at build time, or inF the flist.init file).  This means that when you use the 'k' command toF edit a file with the kept editor, it will look for a KED subprocess to edit it.  E If you are using FLIST in a kept subprocess as well as KED, you might D wish to check that both processes are shutting down tidily when you F log out. To ensure this, I use the (long-winded, but effective) symbol  4 $ LO*GOUT == "PIPE KED /SHUTDOWN /NOWARNING && " + -`              "IF (f$TRNLNM(""FLIST_PROCESS_ID"") .EQS. """") .OR. (f$GETJPI("""",""PID"") " +  -G              ".NES. f$GETJPI("""",""MASTER_PID"")) THEN LOGOUT_ ; " + - T              "WRITE SYS$OUTPUT "" FLIST has not been shut down - logout abandoned"""  B This will shutdown the KED and the FLIST subprocesses, and if both' shutdowns were successful, will logout.      ---     A And that is KED. Enjoy. If you find any bugs, or can think of any A useful enhancements you would like to see, please contact me, and - I will happily stick them on my 'to do' list.      - Cheers, John  " (john.powers@airwidesolutions.com)  