-+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+ X`09`09`09`09`20+`20this_piece); X`09`09`20`20`20`20Eve$Learn_Abort; X`09`09`20`20`20`20Return`20(FALSE); X X`09`20`20`20`20Endcase; X`09`20`20`20`20Exitif`20(spc`20=`200); X`09Endloop; X`20`20`20`20Endif; X X!+ X!`20`20The`20input`20parameters,`20if`20present,`20have`20been`20parsed.`20`20 VCalculate`20the`20new X!`20`20left`20and`20right`20margins,`20and`20(absolute)`20paragraph`20indent, V`20and`20verify`20that X!`20`20they`20are`20allowable`20values. X!- X X`20`20`20`20the_left`20`20:=`20the_left`20`20-`20change_left; X`20`20`20`20the_right`20:=`20the_right`20+`20change_right; X X`20`20`20`20If`20(the_left`20<`201) X`20`20`20`20Then X`09the_left`20:=`201; X`20`20`20`20Endif; X`20`20`20`20If`20(the_right`20>`20max_right) X`20`20`20`20Then X`09the_right`20:=`20max_right; X`20`20`20`20Endif; X X`20`20`20`20If`20((the_left`20+`20par_indent)`20>=`20the_right) X`20`20`20`20Then X`09Eve$Message`20("Paragraph`20indent`20cannot`20exceed`20the`20right`20margin V"); X`09Eve$Learn_Abort; X`09Return`20(FALSE); X`20`20`20`20Else X`09If`20((the_left`20+`20par_indent)`20<=`200) X`09Then X`09`20`20`20`20Eve$Message`20(EVE$_PINDENTSMALL); X`09`20`20`20`20Eve$Learn_Abort; X`09`20`20`20`20Return`20(FALSE); X`09Endif; X`20`20`20`20Endif; X X`20`20`20`20Set`20(LEFT_MARGIN,`20`20CURRENT_BUFFER,`20the_left); X`20`20`20`20Set`20(RIGHT_MARGIN,`20CURRENT_BUFFER,`20the_right); X`20`20`20`20eve$$x_paragraph_indent`20`7BCURRENT_BUFFER`7D`20:=`20the_left`20+ V`20par_indent; X`20`20`20`20If`20(eve$$x_paragraph_indent`20`7BCURRENT_BUFFER`7D`20=`200) X`20`20`20`20Then X`09eve$$x_paragraph_indent`20`7BCURRENT_BUFFER`7D`20:=`20TPU$K_UNSPECIFIED; X`20`20`20`20Endif; X X`20`20`20`20Eve$Message`20(Fao`20( X`09"New`20margin`20settings`20are:`20Left`20!SL,`20Right`20!SL,`20Paragraph`20 VIndent`20!SL.", X`09`20`20`20`20`20`20the_left,`20the_right,`20par_indent)); X X`20`20`20`20Return`20(TRUE); X XEndprocedure;`09`09!`20Eve_Wider X X`0C X!+ X!`20`20`20This`20procedure`20loops`20through`20all`20lines`20in`20the`20range V`20provided`20and X!`20`20`20right-justifies`20each`20so`20that`20the`20last`20word`20in`20each V`20line`20is`20flush`20with X!`20`20`20the`20right`20margin. X! X!`20`20Notes: X! X!`09The`20EVE`20internal`20procedure`20Eve$End_of_Word,`20found`20in`20EVE$FOR VMAT.TPU, X!`09Version`20V02-100b,`20is`20used`20here`20to`20fill`20khf$x_word_array`20wi Vth`20MARKs X!`09corresponding`20to`20the`20beginning`20of`20each`20word`20(but`20the`20fir Vst)`20in`20a`20line. X!`09Changes`20to`20that`20procedure`20must`20be`20tracked`20here. X! X!`09Khf$Justify`20expects`20the`20range_arg`20parameter`20to`20be`20a`20typica Vl`20para- X!`09graph`20range`20as`20defined`20in,`20e.g.,`20Eve_Fill_Paragraph,`20with`20 Vthe`20end X!`09of`20the`20range`20at`20the`20LINE_END`20of`20the`20last`20line`20in`20the V`20paragraph. X!`09The`20last`20line`20is`20NOT`20justified. X! X!`09Four`20types`20of`20space-filling`20patterns`20are`20used:`20from`20the`20 Vcenter`20of X!`09the`20line`20toward`20either`20end,`20from`20both`20ends`20toward`20the`20 Vcenter,`20from X!`09the`20right`20toward`20the`20beginning`20of`20the`20line,`20and`20from`20t Vhe`20left X!`09toward`20the`20end`20of`20the`20line.`20`20The`20type`20of`20fill`20patter Vns`20used`20may`20be X!`09restricted`20by`20limiting`20the`20range`20of`20the`20variable`20fill_type V,`20e.g., X!`09at`20the`20point`20it`20is`20incremented`20following`20the`20Endcase`20sta Vtement. X!`09The`20order`20of`20fill`20patterns`20used`20may`20be`20altered`20by`20simp Vly`20changing X!`09the`20case`20labels. X! X!`20`20Acknowledgements: X! X!`09Writing`20of`20this`20procedure`20was`20motivated`20by`20previous`20justif Vying X!`09routines`20written`20by`20Hunter`20Goatley`20`20 Vand X!`09by`20Ken`20Selvia`20.`20`20In`20particular,`20I`20mad Ve`20use`20of X!`09Hunter's`20idea`20of`20alternating`20the`20fill`20pattern`20from`20left`20 Vto`20right X!`09on`20successive`20lines`20(and`20added`20center-out`20and`20outside-in), V`20and X!`09Ken's`20idea`20to`20use`20an`20array`20of`20the`20words`20on`20each`20line V,`20retrieved`20by X!`09Eve$Current_Word`20(although`20here`20I`20have`20used`20Eve$End_of_Word). V`20`20Both X!`09of`20the`20earlier`20procedures`20implemented`20appending`20a`20second`20s Vpace X!`09following`20a`20sentence`20terminator,`20but`20I`20have`20moved`20that`20t Vo`20the X!`09calling`20procedure. X! X!`20`20Author/Date:`09`09K.H.`20Fairfield,`09`0922-DEC-1992 X!`20`20 X!`20`20Revisions: X!`20`20 X!`20`20`09K.H.`20Fairfield,`2025-JAN-1993:`20Intialization`20of`20"the_fill" V`20was X!`20`20`09`09`09`09`20`20`20`20`20incorrect`20if`20"nbig"`20was`20zero`20and X!`20`20`09`09`09`09`20`20`20`20`20small_fill`20was`20greater`20than`201`20spac Ve. X!`20`20`09`09`09`09`20`20`20`20`20This`20gave`20one`20too`20many`20spaces`20pe Vr X!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20gap`20and`20the`20last`20word`20of`20the`20se Vn- X!`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20tence`20extended`20past`20the`20right`20margi Vn. X!-- X XProcedure`20Khf$Justify X!`09`20`20----------- X`09`20`20(range_arg)`09`09!`20Range`20of`20lines`20to`20justify X XLocal`09saved_position,`20!`20Save`20the`20current`20position X`09saved_mode,`09!`20Save`20the`20current`20mode`20of`20the`20buffer X`09the_end,`09!`20Mark`20at`20end_of`20the`20range X`09the_rmarg,`09!`20Right`20margin`20value X`09this_mark,`09!`20Just`20a`20mark... X`09last_column,`09!`20Column`20number`20of`20last`20character`20in`20a`20line V X`09fill_type,`09!`20Fill`20pattern,`20one`20of`20four`20types X`09nspaces,`09!`20Number`20of`20fill`20spaces`20required X`09sm_size,`09!`20Number`20of`20fill`20spaces`20for`20small`20gaps X`09nbig,`09`09!`20Number`20of`20"big"`20gaps X`09nsmall,`09`09!`20Number`20of`20"small"`20gaps X`09the_fill,`09!`20String`20of`20fill`20spaces X`09small_fill,`09!`20String`20of`20fill`20spaces`20for`20small`20gaps X`09indx,`09`09!`20Index`20into`20word_array X`09indx1,indx2,`09!`20Indices`20for`20center-out`20and`20outside-in`20filling V X`09ngaps,`09`09!`20Number`20of`20gaps,`20equals`20words`20in`20word_array`20le Vss`20one X`09temp;`09`09!`20Just`20a`20temporary`20variable... X XOn_Error X`20`20`20`20`5BOTHERWISE`5D: XEndon_Error; X X Xsaved_position`20:=`20Mark`20(NONE); Xsaved_mode`20:=`20Get_Info`20(CURRENT_BUFFER,`20"mode"); Xthe_rmarg`20`20:=`20Get_Info`20(CURRENT_BUFFER,`20"right_margin"); Xthe_end`20`20`20`20:=`20End_Of`20(range_arg); Xfill_type`20`20:=`201; X X!+ X!`20`20Create`20khf$x_word_array`20on`20first`20use.`20`20Should`20be`20big`20 Venough`20for`20most`20lines; X!`20`20will`20be`20extended`20on`20the`20fly`20otherwise. X!- XIf`20(khf$x_word_array`20=`20TPU$K_UNSPECIFIED) XThen X`20`20khf$x_word_array`20:=`20Create_Array`20(40); XEndif; X X!+ X!`20`20Do`20a`20TRIM_TRAILING`20edit`20on`20range_arg`20since`20there`20could V`20be`20some X!`20`20leftovers`20from`20the`20Fill`20following`20Khf$Fill_Edit. X!- XEdit`20(range_arg,`20TRIM_TRAILING,`20OFF); XSet`20(INSERT,`20CURRENT_BUFFER); XPosition`20(Beginning_Of`20(range_arg)); X X!+ X!`20`20Start`20loop`20over`20lines`20within`20range_arg. X!- XLoop X`20`20`20`20Position`20(LINE_END); X`20`20`20`20this_mark`20:=`20Mark`20(NONE); X`20`20`20`20Exitif`20(this_mark`20>=`20the_end); X`20`20`20`20last_column`20:=`20Get_Info`20(this_mark,`20"offset_column")`20- V`201; X`20`20`20`20If`20(last_column`20<`20the_rmarg) X`20`20`20`20Then X`09Position`20(LINE_BEGIN); X`09nspaces`20:=`20the_rmarg`20-`20last_column; X`09indx`09:=`200; X!+ X!`20`20Loop`20over`20words`20in`20the`20current`20line,`20fill`20khf$x_word_ar Vray`20with`20marks X!`20`20corresponding`20to`20the`20beginning`20each`20word`20except`20the`20fir Vst.`20`20Note`20that X!`20`20Eve$End_of_Word`20positions`20to`20the`20_start_`20of`20the`20_next_`20 Vword. X!- X`09Loop X`09`20`20`20`20temp`20:=`20Eve$End_of_Word; X`09`20`20`20`20Exitif`20(CURRENT_CHARACTER`20=`20"");`09`20`20`20`20!`20Line_e Vnd`20condition. X`09`20`20`20`20indx`20:=`20indx`20+`201; X`09`20`20`20`20khf$x_word_array`20`7Bindx`7D`20:=`20Mark`20(NONE); X`09Endloop; X X`09ngaps`20:=`20indx;`09`09`09`09`20`20`20`20!`20Number`20of`20gaps X`09Exitif`20(ngaps`20<=`200);`09`09`09`20`20`20`20!`20Can't`20justify`20one`20 Vword... X`09If`20(nspaces`20<=`20ngaps) X`09Then X`09`20`20`20`20nsmall`20:=`20nspaces; X`09`20`20`20`20nbig`20`20`20:=`200; X`09`20`20`20`20small_fill`20:=`20"`20"; X`09`20`20`20`20the_fill`20`20`20:=`20"`20"; X`09Else X`09`20`20`20`20sm_size`20`20`20`20:=`20nspaces`20/`20ngaps;`09`20`20`20`20!`20 VSize`20of`20small_fill X`09`20`20`20`20nbig`20`20`20`20`20`20`20:=`20nspaces`20-`20(sm_size`20*`20ngap Vs); X`09`20`20`20`20nsmall`20`20`20`20`20:=`20ngaps`20-`20nbig;`09`09`20`20`20`20! V`20Number`20of`20small_fill`20gaps X`09`20`20`20`20If`20(nbig`20>`200) X`09`20`20`20`20Then X`09`20`20`20`20`09the_fill`20:=`20Substr`20(eve$kt_spaces,`201,`20(sm_size+1)) V; X`09`20`20`20`20Else X`09`20`20`20`20`09the_fill`20:=`20Substr`20(eve$kt_spaces,`201,`20sm_size); X`09`20`20`20`20Endif; X`09`20`20`20`20small_fill`20:=`20Substr`20(eve$kt_spaces,`201,`20`20sm_size); V X`09Endif; X X!+ X!`20`20Choose`20the`20filling`20pattern`20based`20on`20the`20variable`20fill_t Vype.`20`20Patterns X!`20`20are`20from`20the`20center`20outward,`20from`20the`20outside`20towards V`20the`20center,`20from X!`20`20the`20right`20towards`20the`20beginning`20of`20the`20line,`20and`20from V`20the`20left`20towards X!`20`20the`20end`20of`20the`20line. X!- X`09Case`20fill_type`20From`201`20To`204 X X`09`20`20`20`20`5B1`5D:`09`09`09`20`20`20`20!`20Fill`20type`201:`20`20Fill`20g Vaps`20starting X`09`09indx1`20:=`20(ngaps/2)`20+`201;`20`20`20`20`20!`09at`20the`20center`20of V`20the`20line`20and X`09`09indx2`20:=`20indx1;`09`09`20`20`20`20!`09working`20outward.`20`20Variabl Ve X`09`09indx`20`20:=`201;`09`09`20`20`20`20!`09"indx"`20is`20just`20a`20counter V`20here. X`09`09Loop X`09`09`20`20`20`20Exitif`20(indx`20>`20(nsmall+nbig)); X`09`09`20`20`20`20Position`20(khf$x_word_array`20`7Bindx1`7D); X`09`09`20`20`20`20Copy_Text`20(the_fill); X`09`09`20`20`20`20indx`20`20:=`20indx`20+`201; X`09`09`20`20`20`20indx2`20:=`20indx2`20-`201; X`09`09`20`20`20`20If`20(indx`20=`20(nbig+1)) X`09`09`20`20`20`20Then X`09`09`09the_fill`20:=`20small_fill; X`09`09`20`20`20`20Endif; X`09`09`20`20`20`20Exitif`20(indx`20>`20(nsmall+nbig)); X`09`09`20`20`20`20Position`20(khf$x_word_array`20`7Bindx2`7D); X`09`09`20`20`20`20Copy_Text`20(the_fill); X`09`09`20`20`20`20indx`20:=`20indx`20+`201; X`09`09`20`20`20`20indx1`20:=`20indx1`20+`201; X`09`09`20`20`20`20If`20(indx`20=`20(nbig+1)) X`09`09`20`20`20`20Then X`09`09`09the_fill`20:=`20small_fill; X`09`09`20`20`20`20Endif; X`09`09Endloop; X X`09`20`20`20`20`5B2`5D:`09`09`09`20`20`20`20!`20Fill`20type`202:`20`20Fill`20g Vaps`20starting X`09`09indx1`20:=`201;`09`09`20`20`20`20!`09both`20ends`20of`20the`20line`20and V`20work X`09`09indx2`20:=`20ngaps;`09`09`20`20`20`20!`09toward`20the`20center.`20`20Var Viable X`09`09indx`20`20:=`201;`09`09`20`20`20`20!`09"indx"`20is`20just`20a`20counter V`20here. X`09`09Loop X`09`09`20`20`20`20Exitif`20(indx`20>`20(nsmall+nbig)); X`09`09`20`20`20`20Position`20(khf$x_word_array`20`7Bindx1`7D); X`09`09`20`20`20`20Copy_Text`20(the_fill); X`09`09`20`20`20`20indx`20`20:=`20indx`20`20+`201; X`09`09`20`20`20`20indx1`20:=`20indx1`20+`201; X`09`09`20`20`20`20If`20(indx`20=`20(nbig+1)) X`09`09`20`20`20`20Then X`09`09`09the_fill`20:=`20small_fill; X`09`09`20`20`20`20Endif; X`09`09`20`20`20`20Exitif`20(indx`20>`20(nsmall+nbig)); X`09`09`20`20`20`20Position`20(khf$x_word_array`20`7Bindx2`7D); X`09`09`20`20`20`20Copy_Text`20(the_fill); X`09`09`20`20`20`20indx`20`20:=`20indx`20+`201; X`09`09`20`20`20`20indx2`20:=`20indx2`20-`201; X`09`09`20`20`20`20If`20(indx`20=`20(nbig+1)) X`09`09`20`20`20`20Then X`09`09`09the_fill`20:=`20small_fill; X`09`09`20`20`20`20Endif; X`09`09Endloop; X`09`09`09`09`09`20`20`20`20!`20Fill`20type`203:`20`20Fill`20gaps`20starting X`09`20`20`20`20`5B3`5D:`09`09`09`20`20`20`20!`09from`20the`20right,`20working V`20toward X`09`09indx`20:=`20ngaps;`09`09`20`20`20`20!`09the`20beginning`20of`20the`20lin Ve. X`09`09Loop X`09`09`20`20`20`20Exitif`20(indx`20<=`20(ngaps-nsmall-nbig)); X`09`09`20`20`20`20Position`20(khf$x_word_array`20`7Bindx`7D); X`09`09`20`20`20`20Copy_Text`20(the_fill); X`09`09`20`20`20`20indx`20:=`20indx`20-`201; X`09`09`20`20`20`20If`20(indx`20=`20(ngaps-nbig)) X`09`09`20`20`20`20Then X`09`09`09the_fill`20:=`20small_fill; X`09`09`20`20`20`20Endif; X`09`09Endloop; X`09`09`09`09`09`20`20`20`20!`20Fill`20type`204:`20`20Fill`20gaps`20starting X`09`20`20`20`20`5B4`5D:`09`09`09`20`20`20`20!`09from`20the`20left,`20working V`20toward X`09`09indx`20:=`201;`09`09`20`20`20`20!`09the`20end`20of`20the`20line. X`09`09Loop X`09`09`20`20`20`20Exitif`20(indx`20>`20(nsmall+nbig)); X`09`09`20`20`20`20Position`20(khf$x_word_array`20`7Bindx`7D); X`09`09`20`20`20`20Copy_Text`20(the_fill); X`09`09`20`20`20`20If`20(indx`20=`20(nbig)) X`09`09`20`20`20`20Then X`09`09`09the_fill`20:=`20small_fill; X`09`09`20`20`20`20Endif; X`09`09`20`20`20`20indx`20:=`20indx`20+`201; X`09`09Endloop; X`09`09fill_type`20:=`200;`09`09!`20Reset`20so`20it's`201`20next`20time`20throu Vgh X`09Endcase; X`09fill_type`20:=`20fill_type`20+`201; X`20`20`20`20Endif; X X`20`20`20`20Move_Vertical`20(1); XEndloop; X XSet`20(saved_mode,`20CURRENT_BUFFER); XPosition`20(saved_position); X XReturn`20(TRUE); X XEndprocedure;`09`09!`20Khf$Justify X X`0C X!++ X!`20`20`20This`20procedure`20prepares`20a`20range`20for`20(paragraph)`20fillin Vg`20and`20possibly X!`20`20`20justifying.`20`20All`20leading`20and`20trailing`20spaces`20are`20tri Vmmed,`20and`20sentences X!`20`20`20have`20an`20additional`20space`20appended`20to`20their`20ends. X! X!`20`20Author/Date:`09`09K.H.`20Fairfield,`09`0917-DEC-1992 X!-- X XProcedure`20Khf$Fill_Edit X!`09`20`20------------- X`09`20`20`20(range_arg)`09`09!`20Range`20to`20edit. X XLocal`09saved_mode,`09!`20Save`20current`20mode`20of`20the`20buffer X`09end_mark,`09!`20End`20of`20range_arg X`09found_range,`09!`20An`20end`20of`20sentence X`09term_patt;`09!`20Pattern`20of`20sentence`20terminators X Xsaved_mode`20:=`20Get_Info`20(CURRENT_BUFFER,`20"mode"); XSet`20(INSERT,`20CURRENT_BUFFER); X X!+ X!`20`20Following`20pattern`20assignment`20will`20match`20an`20end-of-sentence V`20within`20a X!`20`20line`20or`20at`20the`20end`20of`20a`20line. X!- Xterm_patt`20:=`20("."`20`7C`20"!"`20`7C`20"?")`20+`20("`20"`20`7C`20LINE_END); V X X!+ X!`20`20Squeeze`20out`20excess`20spaces. X!- XEdit`20(range_arg,`20COMPRESS,`20TRIM,`20OFF); X X!+ X!`20`20Find`20sentence`20terminators`20and`20add`20a`20space. X!- Xend_mark`20:=`20End_Of`20(range_arg); XPosition`20(range_arg); XLoop X`20`20`20`20found_range`20:=`20Search_Quietly`20(term_patt,`20FORWARD); X`20`20`20`20Exitif`20(found_range`20=`200); X`20`20`20`20Position`20(End_Of`20(found_range)); X`20`20`20`20Exitif`20(Mark`20(NONE)`20>`20end_mark); X`20`20`20`20Copy_Text`20("`20"); XEndloop; X X!+ X!`20`20If`20there's`20a`20trailing`20final`20space`20at`20the`20end`20of`20ran Vge_arg`20(the`20usual`20case), X!`20`20erase`20it. X!- XPosition`20(end_mark); XMove_Horizontal`20(-1); XIf`20CURRENT_CHARACTER`20=`20"`20" XThen X`20`20`20`20Erase_Character`20(1); XEndif; X XSet`20(saved_mode,`20CURRENT_BUFFER); X XReturn`20(TRUE); X XEndprocedure;`09`09!`20Khf$Fill_Edit $ call unpack KHF$FORMAT.KHF;1 490322435 "" 52 4 6 $! $ create 'f' X`20`20`20`20KHF$FORMAT.TPU`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20February`207, V`201994 X X`20`20`20`20`20`20`20`20A`20description`20of`20`20the`20`20procedures`20`20JUS VTIFY`20`20and`20UNJUSTIFY,`20etc., X`20`20`20`20appears`20`20at`20`20the`20`20bottom`20`20of`20this`20file`20as`20 Vthe`20`20"release`20`20notes"`20`20for X`20`20`20`20version`20V02-001`20of`20KHF$FORMAT.TPU,`20so`20I`20will`20not`20d Vescribe`20them`20here. X`20`20`20`20Earlier`20notes`20`20documenting`20`20subsequent`20`20updates`20 V`20appear`20`20in`20`20reverse X`20`20`20`20chronological`20`20order`20`20following`20`20the`20`20introductory V`20`20text.`20`20`20As`20noted X`20`20`20`20below,`20complete`20documentation`20of`20`20the`20`20various`20JUS VTIFY`20and`20UNJUSTIFY X`20`20`20`20commands,`20and`20NARROWER`20and`20WIDER,`20can`20be`20found`20in V`20KHF$FORMAT.HLP. X X X`20`20`20`20EVE`20Versions`20Supported X`20`20`20`20---------------------- X`20`20`20`20`20`20`20`20This`20distribution`20contains`20TPU`20`20source`20`20 Vcode`20which`20is`20compatible X`20`20`20`20with`20`20EVE`20`20V2.6`20`20(VMS`20V5.4`20through`20V5.5-2),`20an Vd`20with`20EVE`20`20V3.1`20`20(VMS X`20`20`20`20V6.0+`20and`20`20OpenVMS/AXP`20`20V1.5+).`20`20`20Since`20`20KHF$F VORMAT`20`20includes`20`20three X`20`20`20`20procedures`20`20modified`20`20from`20the`20original`20EVE$FORMAT.T VPU`20sources,`20I've X`20`20`20`20included`20separate`20`20modified`20`20versions`20`20for`20`20both V`20`20V2.6`20`20and`20V3.1,`20in X`20`20`20`20addition`20to`20the`20new`20TPU`20code`20which`20forms`20the`20cor Ve`20of`20KHF$FORMAT.TPU. X X`20`20`20`20`20`20`20`20The`20versions`20of`20`20KHF$FORMAT.TPU`20`20contained V`20`20in`20this`20distribution X`20`20`20`20are`20`20known`20to`20work`20under`20EVE`20V2.6`20and`20V3.1`20(VM VS`20V5.4`20to`20V5.5-2,`20`20and X`20`20`20`20V6.0).`20`20While`20I`20have`20not`20tested`20them,`20these`20`20p Vrocedures`20`20_may_`20`20work X`20`20`20`20with`20`20VMS`20`20versions`20`20as`20early`20as`20V5.0,`20at`20wh Vich`20point`20the`20FILL`20RANGE X`20`20`20`20and`20FILL`20PARAGRAPH`20commands`20were`20`20added`20`20to`20EVE; V`20however`20the`20various X`20`20`20`20BOX`20`20commands`20were`20added`20at`20VMS`20V5.4`20and`20imposed V`20a`20number`20of`20changes X`20`20`20`20on`20the`20FILL`20command`20procedures.`20`20Since`20DEC`20has`20 V`20stopped`20`20development X`20`20`20`20work`20on`20EVE,`20I`20expect`20these`20procedures`20to`20continue V`20to`20work`20under`20VMS X`20`20`20`20versions`20subsequent`20to`20V6.0. X X X`20`20`20`20Incorporating`20KHF$FORMAT`20in`20a`20Section`20File X`20`20`20`20------------------------------------------ X`20`20`20`20`20`20`20`20KHF$FORMAT.TPU`20`20is`20`20designed`20`20to`20`20`20b Ve`20`20used`20`20with`20`20SYS$EXAMPLES: X`20`20`20`20EVE$BUILD.TPU.`20`20`20While`20you`20_may_`20do`20an`20"EXTEND`20T VPU`20*"`20within`20EVE`20`20to X`20`20`20`20compile`20`20KHF$FORMAT.TPU,`20`20and`20`20"SAVE"`20`20a`20`20new V`20`20section`20`20`20file,`20`20`20the X`20`20`20`20initialization`20`20procedure`20`20will`20`20_not_`20`20be`20calle Vd`20when`20you`20start`20EVE X`20`20`20`20using`20the`20new`20section`20file,`20which`20will`20`20lead`20to V`20errors`20if`20you`20try`20to X`20`20`20`20use`20NARROWER`20and/or`20WIDER. X X`20`20`20`20`20`20`20`20There`20are`20four`20steps`20`20required`20`20to`20use V`20EVE$BUILD`20with`20KHF$FORMAT X`20`20`20`20and/or`20other`20packages`20designed`20to`20be`20built`20with`20EV VE$BUILD: X X`20`20`20`20`20`20`20`201)`20Choose`20`20a`20`20"facility`20`20name"`20`20for V`20`20your`20`20section`20file,`20for X`20`20`20`20`20`20`20`20`20`20`20example,`20`20your`20`20initials.`20`20In`20t Vhis`20description,`20I'll`20`20use X`20`20`20`20`20`20`20`20`20`20`20the`20facility`20"XYZ".`20`20Where"XYZ"`20app Vears`20below,`20substitute X`20`20`20`20`20`20`20`20`20`20`20the`20name`20you've`20chosen. X X`20`20`20`20`20`20`20`202)`7ECreate`20`20the`20`20file:`20`20XYZ$VERSION.DAT. V`20`20`20This`20`20file`20`20should X`20`20`20`20`20`20`20`20`20`20`20contain`20`20a`20single`20line`20giving`20the V`20version`20number`20with`20`20no X`20`20`20`20`20`20`20`20`20`20`20embedded`20spaces.`20`20You`20may`20wish`20to V`20use`20a`20combination`20of`20`20a X`20`20`20`20`20`20`20`20`20`20`20major`20and`20a`20minor`20revision`20number, V`20for`20example,`2003-002. X X`20`20`20`20`20`20`20`203)`7ECreate`20`20the`20`20file:`20`20XYZ$MASTER.FILE. V`20`20`20This`20`20file`20`20should X`20`20`20`20`20`20`20`20`20`20`20contain`20a`20list`20of`20all`20the`20TPU`20s Vource`20files`20which`20you`20want X`20`20`20`20`20`20`20`20`20`20`20to`20`20incorporate`20in`20your`20new`20secti Von`20file,`20one`20source`20file X`20`20`20`20`20`20`20`20`20`20`20per`20line.`20`20At`20minimum,`20it`20should V`20contain`20the`20line: X X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20dev: V`5Bdir`5DKHF$FORMAT.TPU X X`20`20`20`20`20`20`20`204)`20Build`20the`20`20new`20`20section`20`20file`20`20 Vusing`20`20the`20`20following`20`20DCL X`20`20`20`20`20`20`20`20`20`20`20command: X X`20`20`20`20$`20EDIT/TPU/NODISP/SECT=EVE$SECTION/COM=SYS$EXAMPLES:EVE$BUILD/NO VINIT`20XYZ X X`20`20`20`20`20`20`20`20`20`20`20I`20`20define`20`20the`20`20symbol`20`20"buil Vd"`20`20in`20`20my`20`20LOGIN.COM`20`20to`20be X`20`20`20`20`20`20`20`20`20`20`20"EDIT/TPU.../NOINIT",`20`20as`20above,`20so V`20that`20I`20don't`20have`20`20to X`20`20`20`20`20`20`20`20`20`20`20remember,`20nor`20type,`20this`20long`20DCL V`20command.`20`20`20I`20`20can`20`20then X`20`20`20`20`20`20`20`20`20`20`20use: X X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20$`20BUILD`20XYZ X X X`20`20`20`20Preparing`20a`20Version`20KHF$FORMAT.TPU`20to`20Use`20With`20EVE$B VUILD X`20`20`20`20-------------------------------------------------------- X`20`20`20`20`20`20`20`20This`20distribution`20does`20`20not`20`20contain`20KHF V$FORMAT.TPU,`20but`20rather, X`20`20`20`20the`20`20files`20required`20to`20create`20a`20version`20of`20KHF$F VORMAT.TPU`20that`20works X`20`20`20`20with`20the`20version`20of`20EVE`20installed`20on`20your`20system. V`20`20You`20may`20`20do`20`20this X`20`20`20`20manually`20`20by`20`20selecting`20`20the`20appropriate`20version V`20of`20the`20modified`20EVE X`20`20`20`20sources,`20and`20appending`20`20to`20`20that`20`20the`20`20"core" V`20KHF$FORMAT`20code.`20`20I've X`20`20`20`20included`20`20a`20`20command`20file`20which`20makes`20the`20approp Vriate`20selection`20`20and X`20`20`20`20creates`20the`20appended`20file`20for`20you,`20to`20ease`20this`20 Vjob`20`20and`20`20lower`20`20the X`20`20`20`20confusion`20level.`20`20One`20simply`20uses`20MAKE_FORMAT.COM`20li Vke`20so: X X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20$`20@MAKE_FORMAT X X`20`20`20`20This`20will`20`20create`20`20the`20`20output`20`20file`20`20KHF$FO VRMAT.TPU`20`20in`20the`20current X`20`20`20`20directory.`20`20MAKE_FORMAT.COM`20uses`20two`20of`20the`20followin Vg`20three`20files`20as X`20`20`20`20input: X X`20`20`20`20`20`20`20`20`20`20`20`20EVE$FORMAT.EVE_V26`20`20<--`20Modified`20E VVE$FORMAT,`20V2.6`20source X`20`20`20`20`20`20`20`20`20`20`20`20EVE$FORMAT.EVE_V31`20`20<--`20Modified`20E VVE$FORMAT,`20V3.1`20source X`20`20`20`20`20`20`20`20`20`20`20`20KHF$FORMAT.KHF`20`20`20`20`20`20<--`20New, V`20"core"`20KHF$FORMAT`20source`20code X X`20`20`20`20After`20creating`20KHF$FORMAT.TPU,`20MAKE_FORMAT.COM`20`20will`20a Vsk`20whether`20you X`20`20`20`20want`20to`20delete`20the`20above`20files`20(and`20MAKE_FORMAT`20it Vself),`20since`20these X`20`20`20`20are`20`20no`20`20longer`20needed.`20`20You`20may`20wish`20to`20ans Vwer`20"NO"`20and`20retain`20`20the X`20`20`20`20above`20files`20if`20you're`20currently`20running`20with`20EVE`20V V2.6`20but`20expect`20`20to X`20`20`20`20upgrade`20`20VMS`20`20later.`20`20If`20you`20have`20systems`20runn Ving`20both`20the`20older`20and X`20`20`20`20newer`20versions`20of`20EVE,`20you`20can`20either`20execute`20MAKE V_FORMAT`20separately X`20`20`20`20on`20the`20newer`20and`20older`20systems`20to`20`20create`20the`20 Vnewer`20or`20older`20version X`20`20`20`20of`20`20KHF$FORMAT.TPU,`20`20or`20`20you`20can`20create`20two`20 V`20different`20`20versions`20`20of X`20`20`20`20KHF$FORMAT.TPU,`20appropriate`20for`20the`20different`20systems, V`20by`20doing`20`20the X`20`20`20`20APPEND`20by`20hand. X X`20`20`20`20`20`20`20`20On`20systems`20using`20`20EVE`20`20V2.6,`20`20version V`20`20V02-004`20of`20KHF$FORMAT.TPU X`20`20`20`20will`20`20be`20created;`20on`20systems`20using`20EVE`20V3.1,`20ver Vsion`20V03-001`20will`20be X`20`20`20`20created. X X X`20`20`20`20Section`20File`20Compatibility X`20`20`20`20-------------------------- X`20`20`20`20`20`20`20`20Note`20that`20section`20files`20built`20`20under`20`20 VEVE`20`20V2.6`20will`20continue`20to X`20`20`20`20run`20under`20TPU`20V3.1.`20`20Section`20`20files`20`20built`20und Ver`20EVE`20V3.1`20_probably_ X`20`20`20`20won't`20`20work`20under`20TPU`20V2.6`20(although`20I`20haven't`20t Vried).`20`20When`20you`20use X`20`20`20`20EVE$BUILD`20to`20rebuild`20your`20section`20file,`20you`20_must_ V`20use`20`20the`20`20version X`20`20`20`20of`20`20KHF$FORMAT.TPU`20`20which`20`20corresponds`20`20to`20the V`20version`20of`20EVE`20you're X`20`20`20`20under`20which`20you're`20doing`20`20the`20`20build`20`20due`20`20t Vo`20`20changes`20in`20the`20global X`20`20`20`20variables,`20`20`20etc.,`20`20`20which`20`20are`20`20referenced`20 V`20by`20`20the`20`20modified`20`20`20EVE X`20`20`20`20procedures. X X X`20`20`20`20Customization X`20`20`20`20------------- X`20`20`20`20`20`20`20`20There`20is`20a`20single`20global`20variable,`20"khf$x_ Vmargin_change_amount", X`20`20`20`20which`20is`20initialized`20with`20`20the`20`20value`20"4"`20in`20K VHF$FORMAT_MODULE_INIT. X`20`20`20`20This`20`20is`20the`20_default_`20number`20of`20columns`20by`20whic Vh`20the`20left`20and`20right X`20`20`20`20margins`20are`20changed`20by`20the`20NARROWER`20and`20`20WIDER`20 V`20commands.`20`20`20You`20`20may X`20`20`20`20feel`20`20free`20`20to`20`20change`20`20this`20to`20any`20(reasona Vble)`20positive`20value,`20for X`20`20`20`20instance`20"3",`20or`20even`20"8". X X`20`20`20`20`20`20`20`20You`20may`20simply`20modify`20`20the`20`20assignment V`20`20statement`20`20at`20Line`2054`20of X`20`20`20`20KHF$FORMAT.TPU`20so`20that`20everyone`20accessing`20your`20section V`20file`20uses`20the X`20`20`20`20same`20`20default`20`20value`20`20that`20`20you've`20`20chosen.`20 V`20`20Alternatively,`20`20or`20`20in X`20`20`20`20addition,`20users`20who`20want`20a`20`20different`20`20default`20 V`20value`20`20may`20`20add`20`20the X`20`20`20`20assignment`20statement`20to`20their`20private`20TPU$COMMAND`20file V,`20e.g.: X X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20khf$x_margin_change_amount`20: V=`203;`20`20!`20Default X X X X`20`20`20`20Command`20Documentation X`20`20`20`20--------------------- X`20`20`20`20`20`20`20`20This`20`20distribution`20`20`20includes`20`20`20the`20 V`20`20file`20`20`20KHF$FORMAT.HLP`20`20`20as X`20`20`20`20documentation`20`20for`20`20the`20`20new`20`20commands.`20`20This V`20file`20is`20`20in`20`20VMS`20`20HELP X`20`20`20`20format.`20`20If`20you`20have`20modified`20`20your`20`20version`20 V`20of`20`20EVE`20`20to`20`20access`20`20a X`20`20`20`20"private"`20`20HELP`20`20library,`20you`20can`20add`20KHF$FORMAT.H VLP`20to`20that`20library X`20`20`20`20making`20the`20documentation`20available`20within`20EVE.`20`20If V`20you're`20the`20system X`20`20`20`20manager`20(or`20a`20good`20"friend"`20of`20`20the`20`20system`20ma Vnager`20:-),`20you`20can`20add X`20`20`20`20KHF$FORMAT.HLP`20`20to`20SYS$HELP:EVE$HELP.HLB.`20`20If`20neither V`20of`20these`20is`20an X`20`20`20`20option,`20simply`20refer`20your`20`20users`20`20to`20`20the`20`20f Vile`20`20as`20`20a`20`20"flat"`20`20text X`20`20`20`20document.`20`20`20While`20`20EVE$BUILD`20supports`20adding`20user V`20HELP`20libraries,`20it X`20`20`20`20does`20`20not`20`20provide`20`20a`20`20method`20`20for`20`20_trans Vparently_`20`20accessing`20`20such X`20`20`20`20libraries,`20`20which`20`20can`20be`20confusing`20for`20users.`20 V`20While`20I`20`20and`20`20others X`20`20`20`20have`20been`20able`20to`20modify`20EVE's`20HELP`20procedures`20to V`20make`20`20this`20`20access X`20`20`20`20transparent,`20it`20is`20beyond`20the`20scope`20of`20this`20README V`20file`20to`20describe, X`20`20`20`20and`20is`20not`20for`20the`20faint`20of`20heart... X X X`20`20`20`20Release`20Notes X`20`20`20`20------------- X X---------------------------------------------------------------------------- X`20`20`20`20KHF$FORMAT`20V03-001`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`2027-JAN V-1994 X X`20`20`20`20`20`20`20`20Version`20V03-001`20replaces`20modified`20`20EVE`20`20 Vprocedures`20from`20EVE`20V2.6 X`20`20`20`20with`20`20the`20`20same`20procedures`20modified`20from`20the`20EVE V`20V3.1`20source.`20`20`20This X`20`20`20`20version`20of`20KHF$FORMAT.TPU`20is`20compatible`20`20with`20`20EVE V`20`20V3.1,`20`20which`20`20is X`20`20`20`20present`20`20under`20`20OpenVMS/VAX`20V6.0`20and`20OpenVMS/AXP`20V V1.5`20and`20above,`20and X`20`20`20`20on`20`20earlier`20`20OpenVMS/VAX`20`20versions`20`20where`20`20the V`20`20system`20`20manager`20`20has X`20`20`20`20installed`20CSCPAT_1049010`20(EVE`20and`20TPU`20V3.1). X X---------------------------------------------------------------------------- X`20`20`20`20KHF$FORMAT`20V02-004`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`2022-JAN V-1994 X X`20`20`20`20`20`20`20`20This`20version`20of`20KHF$FORMAT`20`20adds`20`20two`20 Vnew`20EVE`20commands,`20NARROWER X`20`20`20`20and`20`20WIDER,`20`20which`20`20allow`20one`20to`20change`20the`20 Vleft`20`20and`20`20right`20`20margin X`20`20`20`20settings,`20and,`20optionally,`20the`20paragraph`20indent,`20with V`20a`20`20single`20`20EVE X`20`20`20`20command.`20`20`20This`20aids`20in`20formatting`20lists`20and`20"qu Voted`20passages",`20etc. X`20`20`20`20The`20.HLP`20file`20contains`20`20usage`20`20details.`20`20`20Ther Ve`20`20are`20no`20bug`20fixes`20in X`20`20`20`20this`20release. X X---------------------------------------------------------------------------- X X`20`20`20`20KHF$FORMAT`20V02-002`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`2025-JAN V-1993 X X`20`20`20`20`20`20`20`20I`20discovered`20a`20bug`20in`20`20the`20`20procedure V`20Khf$Justify`20which`20has`20been X`20`20`20`20corrected`20`20in`20`20this`20version.`20`20The`20bug`20is`20obvio Vus`20when`20it`20`20occurs`20`20(a X`20`20`20`20line`20in`20which`20the`20last`20word`20extends`20`20past`20`20the V`20`20right`20`20margin),`20`20but X`20`20`20`20generally`20`20only`20`20occurs`20`20if`20`20the`20paragraph`20or V`20box`20being`20justified`20is X`20`20`20`20relatively`20narrow. X X`20`20`20`20`20`20`20`20The`20following`20conditions`20are`20necessary`20for V`20the`20bug`20to`20occur: X X`20`20`20`20`20`20`20`20o`20Given`20a`20line`20`20being`20`20justified`20`20th Vat`20`20(1)`20needed`20to`20have`20M X`20`20`20`20`20`20`20`20`20`20spaces`20`20added,`20`20and`20`20(2)`20`20there V`20were`20`20N`20`20word`20`20gaps`20`20where X`20`20`20`20`20`20`20`20`20`20additional`20spaces`20could`20be`20added; X X`20`20`20`20`20`20`20`20o`20M`20was`20exactly`20divisible`20by`20N`20(`20MOD V`20(M,N)`20=`200`20); X X`20`20`20`20`20`20`20`20o`20M/N`20was`20greater`20than`20one. X X`20`20`20`20If`20all`20these`20conditions`20were`20met,`20then`20one`20too`20m Vany`20spaces`20was`20added X`20`20`20`20in`20each`20word`20`20gap.`20`20`20This`20`20results`20`20in`20`20 Vthe`20`20last`20`20word`20`20of`20the`20line X`20`20`20`20extending`20past`20the`20right`20margin. X X`20`20`20`20`20`20`20`20The`20problem`20was`20a`20logic`20error`20(mine`20:-( V`20)`20which`20led`20to`20incorrect X`20`20`20`20initialization`20of`20the`20variable`20`20"the_fill"`20`20when`20t Vhe`20variable`20"nbig" X`20`20`20`20was`20zero`20and`20"small_spaces"`20was`20longer`20than`20one`20sp Vace. X X`20`20`20`20`20`20`20`20Version`202-002`20corrects`20this`20`20problem`20`20an Vd`20incorporates`20two`20other X`20`20`20`20minor`20changes`20with`20respect`20to`20the`20initial`20release. X X---------------------------------------------------------------------------- X X`20`20`20`20`20`20`20`20As`20noted`20`20in`20`20the`20`20original`20`2018-DEC- V1992`20`20announcement`20`20of`20`20this X`20`20`20`20package,`20`20I`20`20have`20chosen`20to`20use`20slightly`20modifie Vd`20versions`20of`20`20EVE's X`20`20`20`20procedures`20EVE_FILL_PARAGRAPH`20`20and`20`20EVE$FILL_RANGE`20`20 Vwhile`20`20retaining X`20`20`20`20their`20`20original`20`20names.`20`20`20I`20`20did`20this`20to`20a Vvoid`20unnecessary`20duplicate X`20`20`20`20code`20in`20an`20already`20large`20section`20file. X X`20`20`20`20`20`20`20`20Some`20people`20have`20informed`20me`20`20privately`20 V`20that`20they`20prefer`20a`20more X`20`20`20`20modular`20`20`20approach`20`20(I`20`20wonder`20`20why?`20`20`20:-) V`20`20which`20`20makes`20`20them`20`20less X`20`20`20`20susceptible`20to`20EVE`20version`20`20changes.`20`20`20If`20`20you V`20`20wish`20`20to`20`20take`20`20this X`20`20`20`20approach,`20simply`20do`20the`20following: X X`20`20`20`20o`20Change`20all`20occurrences`20of`20EVE$FILL_RANGE`20to`20KHF$FI VLL_RANGE. X`20`20`20`20o`20Change`20all`20occurrences`20of`20EVE$FILL_PARAGRAPH`20to`20KH VF$FILL_PARAGRAPH. X`20`20`20`20o`20Delete`20procedure`20EVE_FILL_PARAGRAPH`20from`20this`20module V. X X X`20`20`20`20`20`20`20`20Ken`20Fairfield`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20`20`20`20January`2023,`201993 X X`20`20`20`20`20`20`20`20Stanford`20Linear`20Accelerator`20Center X`20`20`20`20`20`20`20`20P.O.Box`204349,`20M/S`2098 X`20`20`20`20`20`20`20`20Stanford,`20CA`20`2093409 X`20`20`20`20`20`20`20`20USA X X`20`20`20`20`20`20`20`20Internet:`20Fairfield@Slac.Stanford.Edu X`20`20`20`20`20`20`20`20DECnet:`20`20`2045537::FAIRFIELD`20(45537=SLACVX) X`20`20`20`20`20`20`20`20BITNET`20`20`20`20Fairfield@Slacvx X`20--------------------------------------------------------------------------- V- X X`20`20`20`20KHF$FORMAT`20V02-001`20UPD`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`2022-DEC-1992 V X X`20`20`20`20Well,`20I`20can't`20seem`20to`20leave`20well`20enough`20alone... X X`20`20`20`20`20`20`20`20In`20looking`20at`20the`20Khf$Justify`20procedure`20in V`20KHF$FORMAT.TPU,`20which X`20`20`20`20I`20posted`20a`20few`20days`20ago,`20I`20got`20to`20thinking`20abo Vut`20all`20the`20unnecessary X`20`20`20`20work`20the`20Eve$Current_Word`20is`20doing`20`20in`20`20terms`20 V`20of`20creating`20marks`20and X`20`20`20`20ranges.`20`20`20Since`20`20DEC`20TPU`20developers`20have`20noted V`20on`20this`20list`20`20in`20`20the X`20`20`20`20past`20that`20creating`20marks`20and`20ranges`20is`20"expensive" V`20in`20TPU,`20and`20since X`20`20`20`20the`20JUSTIFY`20command`20takes`20a`20noticeable`20amount`20of`20 V`20time`20`20to`20`20complete X`20`20`20`20(compared`20`20to`20`20a`20`20simple`20`20FILL`20`20for`20example) V,`20I've`20replaced`20calls`20to X`20`20`20`20Eve$Current_Word`20`20by`20`20Eve$End_of_Word.`20`20`20`20I`20`20 V`20won't`20`20`20say`20`20that`20`20the X`20`20`20`20performance`20is`20noticeably`20better,`20but`20it`20_is_`20an`20i Vmprovement. X X`20`20`20`20`20`20`20`20Below`20`20is`20`20a`20`20VMS_SHARE`20`20`20file`20`20 Vwhich`20`20contains`20`20KHF$FORMAT.UPD. X`20`20`20`20Extract`20the`20VMS_SHARE`20file`20(into`20something`20like`20FORM VAT.SHARE),`20strip X`20`20`20`20out`20`20this`20message`20down`20to`20the`20"CUT`20HERE"`20line, V`20and`20@FORMAT.SHARE`20the X`20`20`20`20resulting`20`20file.`20`20`20`20Then`20`20`20use`20`20`20the`20`20 V`20SUMSLP`20`20`20editor`20`20`20to`20`20`20update X`20`20`20`20KHF$FORMAT.TPU: X X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20$`20EDIT/SUM`20KHF$FORMAT.TPU V`20/UPDATE=KHF$FORMAT.UPD X X`20`20`20`20`20`20`20`20-Ken X X`20--------------------------------------------------------------------------- V- X X`20`20`20`20KHF$FORMAT`20V02-001`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20 V`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`2018- VDEC-1992 X X`20`20`20`20Greetings`20All! X X`20`20`20`20`20`20`20`20Here's`20a`20Holiday`20gift`20for`20`20everyone`20`20i Vn`20INFO-TPU`20land.`20`20I've`20been X`20`20`20`20stimulated`20`20by`20`20both`20`20Hunter`20Goatley's`20and`20Ken V`20Selvia's`20`20EVE`20`20Justify X`20`20`20`20procedures`20to`20merge`20paragraph`20justification`20with`20the V`20FILL,`20FILL`20RANGE X`20`20`20`20and`20FILL`20PARAGRAPH`20commands`20in`20the`20current`20`20versio Vn`20`20of`20`20EVE.`20`20`20Also, X`20`20`20`20there's`20`20new`20`20functionality`20`20in`20TPU`20that`20wasn't V`20available`20when`20Hunter X`20`20`20`20and`20Ken`20wrote`20their`20versions,`20so`20`20hopefully,`20this V`20version`20is`20a`20little X`20`20`20`20more`20compact`20(e.g.,`20compare`20Hg$Squeeze_Range`20and`20Khf$F Vill_Edit). X X`20`20`20`20`20`20`20`20First,`20I`20took`20Hunter's`20idea`20of`20`20alternat Vely`20filling`20out`20the`20lines X`20`20`20`20from`20`20the`20`20right`20and`20then`20from`20the`20left,`20and V`20supplemented`20`20that`20`20with X`20`20`20`20filling`20from`20the`20center`20of`20the`20line`20outward,`20and V`20from`20`20both`20`20ends`20`20of X`20`20`20`20the`20`20line`20`20towards`20`20the`20`20center.`20`20`20Thus,`20 V`20on`20`20successive`20`20lines`20`20in`20a X`20`20`20`20paragraph`20or`20range,`20lines`20`20are`20`20filled`20`20from`20 V`20the`20center-out`20from`20the X`20`20`20`20outside-in,`20`20from`20`20the`20`20right`20`20towards`20the`20lef Vt,`20and`20`20from`20`20the`20`20left X`20`20`20`20towards`20the`20right.`20`20This`20alternation`20of`20filling`20 V`20patterns`20`20helps`20`20the X`20`20`20`20paragraph`20appear`20more`20balanced. X X`20`20`20`20`20`20`20`20Second,`20I`20took`20Ken's`20idea`20`20of`20`20using V`20Eve$Current_Word`20to`20pick`20out X`20`20`20`20each`20`20word`20`20in`20a`20line`20and`20store`20the`20results`20 Vin`20an`20array.`20`20I`20`20use`20`20the X`20`20`20`20ranges`20as`20returned`20`20from`20`20Eve$Current_Word`20`20rather V`20`20than`20`20the`20`20corre- X`20`20`20`20sponding`20`20string`20`20that`20`20Ken`20uses,`20but`20that's`20a V`20detail.`20`20I`20also`20imple- X`20`20`20`20mented`20the`20`20"extra`20`20space`20`20following`20`20a`20`20sen Vtence"`20`20which`20`20both`20these X`20`20`20`20gentlemen`20had`20done,`20if`20in`20a`20slightly`20different`20way V. X X`20`20`20`20`20`20`20`20Third,`20and`20`20perhaps`20`20most`20`20important,`20 V`20I`20`20integrated`20`20the`20justify X`20`20`20`20procedure`20`20`20within`20`20`20EVE's`20`20FILL,`20`20FILL`20`20P VARAGRAPH`20`20and`20`20FILL`20`20`20RANGE X`20`20`20`20procedures.`20`20To`20do`20this,`20I`20split`20the`20original`20Ev Ve_Fill_Paragraph`20into X`20`20`20`20two`20`20`20routines,`20`20`20a`20`20`20"stub"`20`20`20Eve_Fill_Pa Vragraph,`20`20`20`20and`20`20`20`20a`20`20`20`20new X`20`20`20`20Eve$Fill_Paragraph.`20`20The`20latter`20contains`20all`20of`20the V`20old`20code,`20with`20my X`20`20`20`20the`20`20small`20`20additions,`20`20including`20`20optional`20inpu Vt`20parameters,`20which`20I X`20`20`20`20required`20in`20order`20to`20implement`20the`20`20justification. V`20`20Thus`20I`20have`20added X`20`20`20`20just`20`20a`20handful`20of`20lines`20to`20Eve$Fill_Range`20and`20E Vve$Fill_Paragraph`20and X`20`20`20`20have`20avoided`20the`20need`20to`20add`20`20duplicate`20`20code`20 V`20in`20`20the`20`20justification X`20`20`20`20procedure`20just`20to`20find`20and`20fill`20paragraphs. X X`20`20`20`20`20`20`20`20The`20result`20is`20three`20new`20EVE`20commands:`20JU VSTIFY,`20JUSTIFY`20PARAGRAPH, X`20`20`20`20and`20JUSTIFY`20RANGE.`20`20The`20`20three`20`20are`20`20entirely V`20`20analogous`20to`20the`20three X`20`20`20`20corresponding`20FILL`20commands.`20`20For`20instance,`20JUSTIFY`20 Vand`20JUSTIFY`20RANGE X`20`20`20`20will`20`20work`20`20on`20`20a`20BOX`20selection`20in`20addition`20 Vto`20`20a`20`20normal`20`20selection. X`20`20`20`20Paragraph`20indention,`20positive`20or`20negative,`20_is_`20respec Vted`20by`20JUSTIFY. X X`20`20`20`20`20`20`20`20Finally,`20I`20found`20`20there`20`20were`20`20times V`20`20I`20`20might`20`20want`20`20to`20undo`20the X`20`20`20`20spacing`20`20that`20`20JUSTIFY`20had`20done.`20`20Unlike`20earlier V`20versions`20of`20EVE`20`20and X`20`20`20`20TPU,`20the`20current`20version`20of`20`20FILL`20`20leaves`20`20emb Vedded`20`20spacing`20`20intact. X`20`20`20`20Thus`20`20I`20`20have`20supplied`20three`20corresponding`20UNJUSTI VFY`20commands.`20`20These X`20`20`20`20use`20the`20same`20procedure`20that`20JUSTIFY`20`20uses`20before V`20filling`20out`20lines`20to X`20`20`20`20first`20`20compress`20out`20extra`20spaces,`20and`20then`20add`20o Vne`20extra`20space`20at`20the X`20`20`20`20end`20of`20each`20`20sentence.`20`20`20The`20`20effect`20`20is`20 V`20like`20`20Ken's`20`20"ragged-right" X`20`20`20`20justification`20(I`20call`20that`20NO`20justification`20:-). X X`20`20`20`20`20`20`20`20I`20have`20packaged`20the`20modified`20and`20`20new`20 VFILL,`20JUSTIFY`20and`20UNJUSTIFY X`20`20`20`20procedures`20`20into`20a`20single`20module,`20KHF$FORMAT,`20which V`20can`20be`20used`20as-is X`20`20`20`20to`20EXTEND`20TPU`20*,`20or`20can`20be`20included`20in`20your`20xx Vx$MASTER.FILE`20`20for`20`20use X`20`20`20`20with`20`20EVE$BUILD.`20`20`20I`20`20will`20`20send`20`20out`20KHF$ VFORMAT`20in`20three`20VMS_SHARE'd X`20`20`20`20parts`20following`20this`20note.`20`20As`20I`20`20comment`20in`20t Vhat`20file,`20modifications X`20`20`20`20to`20`20EVE`20`20procedures`20are`20clearly`20labeled`20with`20"! V`20KHF"`20at`20`20the`20`20end`20`20of X`20`20`20`20affected`20lines.`20`20`20Furthermore,`20`20comments`20`20at`20`20 Vthe`20`20beginning`20`20of`20`20the X`20`20`20`20procedure`20Khf$Justify`20outline`20ways`20the`20user`20can`20modi Vfy`20the`20pattern`20of X`20`20`20`20filling,`20etc.,`20to`20suit`20an`20individual's`20taste`20or`20ne Veds. X X`20`20`20`20`20`20`20`20Use`20and`20enjoy!`20`20Comments`20are`20hereby`20soli Vcited`20;-) X X`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20`20Cheers,`20Ken X-- X`20Dr.`20Kenneth`20H.`20Fairfield`20`20`20`20`7C`20`20Internet:`20Fairfield@Sl Vac.Stanford.Edu X`20SLAC,`20P.O.Box`204349,`20MS`2098`20`20`20`7C`20`20DECnet:`20`20`2045537::F VAIRFIELD`20(45537=SLACVX) X`20Stanford,`20CA`20`20`2094309`20`20`20`20`20`20`20`20`7C`20`20BITNET`20`20 V`20`20Fairfield@Slacvx $ call unpack KHF$FORMAT.README;1 1629307621 "" 34 5 6 $! $ create 'f' X$`20Set`20Noon X$ X$!+ X$!`20Try`20to`20determine`20which`20version`20of`20EVE`20is`20being`20run`20on V`20this`20machine. X$!`20First`20try`20to`20read`20SYS$EXAMPLES:EVE$VERSION.DAT`20for`20a`20defini Vtive`20answer, X$!`20then`20fall`20back`20to`20the`20VMS`20version`20(or`20AXP`20hardware)`20a Vs`20a`20softer X$!`20determinate.`20`20No`20check`20is`20made`20for`20older`20VMS`20or`20EVE V`20versions. X$!- X$`20 X$`20vfile`20=`20"" X$`20vfile`20=`20F$Search`20("SYS$EXAMPLES:EVE$VERSION.DAT") X$`20If`20vfile`20.Nes.`20"" X$`20Then X$`20`20`20`20`20Open/Read/Error=R_Err`20ff`20'vfile X$`20`20`20`20`20Read`20ff`20vers X$`20`20`20`20`20Close`20ff X$`20`20`20`20`20 X$`20`20`20`20`20If`20F$Extract`20(0,`202,`20vers)`20.Eqs.`20"V3" X$`20`20`20`20`20Then X$`09`20`20ftype`20=`20".EVE_V31" X$`20`20`20`20`20Else X$`09`20`20ftype`20=`20".EVE_V26" X$`20`20`20`20`20Endif X$`20Else X$`20`20`20`20`20vers`20`20=`20F$GetSyi`20("VERSION") X$`20`20`20`20`20alpha`20=`20F$GetSyi`20("HW_MODEL")`20.Ge.`201024 X$`20`20`20`20`20If`20(alpha)`20.Or.`20(F$Extract`20(0,`202,`20vers)`20.Eqs.`20 V"V6") X$`20`20`20`20`20Then X$`09`20`20ftype`20=`20".EVE_V31" X$`20`20`20`20`20Else X$`09`20`20ftype`20=`20".EVE_V26" X$`20`20`20`20`20Endif X$`20Endif X$`20 X$!+ X$!`20Protect`20against`20earlier`20invocations`20of`20this`20procedure,`20and V`20against`20 X$!`20an`20existing`20version`20of`20KHF$FORMAT.TPU,`20by`20removing`20any`20co Vpies`20of`20 X$!`20KHF$FORMAT.TMP`20and`20doing`20an`20APPEND/NEW`20to`20_that_`20file`20nam Ve,`20followed X$!`20by`20a`20RENAME`20to`20.TPU. X$!- X$`20 X$`20If`20F$Search`20("KHF$FORMAT.TMP")`20.Nes.`20""`20Then`20Delete`20KHF$FORM VAT.TMP;* X$`20 X$`20Append/New`20`20`20EVE$FORMAT'ftype',KHF$FORMAT.KHF`20`20`20KHF$FORMAT.TMP V X$`20Rename`20`20`20KHF$FORMAT.TMP`20`20KHF$FORMAT.TPU; X$ X$!+ X$!`20Ask`20whether`20to`20DELETE`20the`20source`20files. X$!- X$`20Inquire/NoPunc`20yn`20`20- X`20`20"Delete`20the`20files`20EVE$FORMAT.*,`20KHF$FORMAT.KHF,`20and`20MAKE_FOR VMAT.COM?`20(y/n)`20" X$`20 X$`20If`20yn`20Then`20Delete`20EVE$FORMAT.EVE_V%%;*,KHF$FORMAT.KHF;*,MAKE_FORMA VT.COM;* X$`20 X$`20Exit X$`20 X$`20R_Err: X$`20 X$`20Write`20Sys$Output`20`20- X`20`20"`20*****`20Error`20opening`20''vfile'`20for`20READ`20access,`20aborting V`20*****" X$`20 X$`20Exit`200 $ call unpack MAKE_FORMAT.COM;1 1745342093 "" 4 6 6 $ v=f$verify(v) $ exit