// // SHOWMARKERS2.VDM Christian Ziemski 18.05.1999 // 24.10.2000 f. 5.20 DI1 // 26.10.2000 huge file support // // Displays the used Text Markers with line number and text example. // // For huge files the preview is disabled per default but could be enabled via menu. // // Input of marker number jumps to the markers's position in the text. // // // (For the Windows version of VEDIT 5.20 only!) // #100=1 if(File_Size > 1000000){ // No preview for files greater than 1 MB #100=0 } Call("BUILD") // Show the Input Dialog Reg_Empty(104) if(#100==1){ #104=DI1(104,"'Used Text Markers','|@(103)','??Jump to marker no.: ','[OK]','[CANCEL]'",SCREEN+CENTER,0,0) } else { repeat(ALL){ #104=DI1(104,"'Used Text Markers','|@(103)','??Jump to marker no.: ','Press PREVIEW to force marker preview for the huge file.','[OK]','[PRE&VIEW]','&CANCEL'",SCREEN+CENTER,0,0) if(#104 != 2){ break } #100=1 Call("BUILD") } } if(#104 != 1){ Reg_Empty(104) return } #104=BN #103=Buf_Free(EXTRA) if(#103==-1){ // no more extra buffer? Alert() BS(#104) return } // jump to the selected marker (if one) if(Reg_Size(104)>0){ // user input? BS(#103) RI(104,BEGIN) #103=Num_Eval() // evaluate marker no. BQ(OK) BS(#104) if(Chars_Matched>0){ // numeric input? if(#103>=0 && #103<10){ // valid? if(Marker(#103)!=-1){ // used? Goto_Marker(#103) } } } } return // Build the list of used markers :BUILD: Out_Reg(103) M(" No. Line Text\n----------------------------------------------------------------------\n") for(#103=0;#103<10;#103++){ if(Marker(#103)!=-1){ NT(#103,NOCR) // marker no. M(" : ") if(#100==1){ Save_Pos() GP(Marker(#103)) NT(Cur_Line(),FORCE+NOCR) // cursor line of marker position M(" : ") #104=EoL_Pos Restore_Pos() if((Marker(#103)+20)<#104){ // text example max. to EoL #104=Marker(#103)+20 } Type_Block(Marker(#103),#104) Type_Newline() } else { M(" : ") Type_Newline() } } } Out_Reg(CLEAR) return