// // Block-Norm.vdm Christian Ziemski 14.01.2004 // 11.05.2004 // // Normalizes a highlighted block // #104=1 // 0 = debugging off // For debugging: if (#104) { M("BB/BBN/CB:") Num_Type(BB, NOCR) Num_Type(BB_Normal, NOCR) Num_Type(Column_Begin, NOCR) M(" BE/BEN/CE:") Num_Type(BE, NOCR) Num_Type(BE_Normal, NOCR) Num_Type(Column_End, NOCR) M(" (before macro)") TN(1) } if ((BB == -1) && (BE == -1)) { return } // can not occur!? // if (BB == -1) { // BB(Cur_Pos) // } if (BE == -1) { BE(Cur_Pos) } // for all types of blocks: sort BB/BE #103 = Min(BB, BE) BE(Max(BB, BE)) BB(#103) // // or use // BB_Normal // BE_Normal // then check special block types if (Block_Mode == LINEBLOCK) { Save_Pos() Goto_Pos(BB) BoL BB(Cur_Pos) Goto_Pos(BE) EoL // BE_Normal is set 2 character (CR/LF) further: into the following line! // Why?!?! Isn't that inconsistent? BE(Cur_Pos) Restore_Pos } if (Block_Mode == COLUMN) { // sort Block Columns #103 = Min(Column_Begin, Column_End) Column_End(Max(Column_Begin, Column_End)) Column_Begin(#103) // why the following; I can't remember Save_Pos() Goto_Pos(BB) if (Column_Begin != Cur_Col) { BB(Cur_Pos-Cur_Col+Column_Begin) Goto_Pos(BE) BE(Cur_Pos-Cur_Col+Column_End) } Restore_Pos } // For debugging: if (#104) { M("BB/BBN/CB:") Num_Type(BB, NOCR) Num_Type(BB_Normal, NOCR) Num_Type(Column_Begin, NOCR) M(" BE/BEN/CE:") Num_Type(BE, NOCR) Num_Type(BE_Normal, NOCR) Num_Type(Column_End, NOCR) M(" (after macro)") TN(2) }