Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: WSPOPUP.MNU
;========================================================================= ; Three simple tools for WinBatch Scripts ; Version 0.99a world wide beta test ; d = Droplist Generator ; b = Beautifier/Formatter ; c = Crossreference List Generator ;========================================================================= ; usage (1) on commandline: ; winbatch.exe ddbeauty.wbt [d|b|bc|c] [infile.wbt outfile.wbt] ; or usage (2) in WinBatch Studio Environment directly ;========================================================================= ; For proper use in WinBatch Studio by using right click mouse menu, ; you have to copy the menu section "_DD.BeautyTools" into the file ; WSPOPUP.MNU, e.g. right after the section "_Undo". ; example: ; --- snip --- ; ;_Undo ; Undoes the last editing action ; wEdUndo() ; ;_DD.BeautyTools ; call the beautiful tools ; DropMaker ; call("%yourWBTfolder%\ddbeauty.wbt","d") ; ; Beautify ; call("%yourWBTfolder%\ddbeauty.wbt","b") ; ; CrossRef ; call("%yourWBTfolder%\ddbeauty.wbt","c") ; ; --- snip --- ;========================================================================= ; author: Detlev Dalitz.20010401 mailto:dd@dalitz-im-netz.de ;========================================================================= ; For using the "DropMaker" tool in WinBatch Studio environment you have to mark ; some area of WinBatch code and then use "DropMaker" from the right click menu. ; "DropMaker" will insert a "drop()" statement into the code, ; including all variables collected out of the marked area. ; For applying "Beautify" or "Crossreference" you also can use the mouse. ; Enjoy! Viel Spass! ;========================================================================= ; InStudio = (rtStatus() == 10) ;rtStatus() ==> 0 = interpreted 1=compiled 5=Compiled WinBatch Service (EXS file) 10=Winbatch Studio For i=0 to 9 CallParam%i% = "" If IsDefined(Param%i%) then CallParam%i% = Param%i% Next i ;------------------------------------------------------------------------- ; --- test stuff begin --- If (CallParam0 == 0) ; only for debugging and testing in WinBatch Studio Editor ; cmdLine="bc ""W:\WINBATCH\2001\Test\test.wbt"" ""W:\WINBATCH\2001\Test\test.txt""" ; cmdLine="b ""W:\WINBATCH\2001\WinBatch UDF\FileToItemlist_UDF.wbt"" ""W:\WINBATCH\2001\WinBatch UDF\FileToItemlist_UDF.wbt""" ; cmdLine="bc" ; cmdLine="d" If IsDefined(cmdLine) ParseData(cmdLine) For i=0 to 9 CallParam%i% = "" If IsDefined(Param%i%) then CallParam%i% = Param%i% Next i EndIf EndIf ; --- test stuff end --- ;------------------------------------------------------------------------- gosub Beauty_DefineGlobalVar If (CallParam0 > 1) StringArr = ItemReplace(CallParam2,30,StringArr,@TAB) ; TheFileIn, no check, file must exist StringArr = ItemReplace(CallParam3,29,StringArr,@TAB) ; TheFileOut, no check, existing file will be overwritten InStudio = @FALSE Else If InStudio If wGetSelState() wEdCopy() IsClipSelAll = @FALSE Else wSelectAll() wEdCopy() IsClipSelAll = @TRUE EndIf SelInfo = wSelInfo() StringArr = ItemReplace(wGetFileName(),30,StringArr,@TAB) ; TheFileIn EndIf EndIf Select (CallParam0 > 0) Case @FALSE ; gosub Beauty_InteractiveMenu ; not present in this version pause(ItemExtract(1,StringArr,@TAB),StrCat("No Parameters specified",@CRLF,"Usage: WinBatch.exe ddbeauty.wbt [d|b|bc|c infile.wbt outfile.wbt]")) Break Case @TRUE CallParam1 = StrLower(CallParam1) gosub Beauty_DefineUDFs Continue Case (CallParam1 == "d") If InStudio then gosub Beauty_DropMaker Else pause(ItemExtract(1,StringArr,@TAB),"Please use DropMaker in WinBatch Studio Editor") Break Case (CallParam1 == "b") gosub Beauty_Beautifier Break Case (CallParam1 == "c") gosub Beauty_CrossReferencer Break Case (CallParam1 == "bc") Case (CallParam1 == "cb") gosub Beauty_Beautifier gosub Beauty_CrossReferencer Break EndSelect Exit ;========================================================================= :Beauty_DropMaker ; gosub Beauty_InitDropMaker If InStudio then gosub Beauty_OpenClip Else gosub Beauty_OpenFile gosub Beauty_CleanupPre gosub Beauty_DeleteComments gosub Beauty_DeleteLiterals gosub Beauty_DeleteCommentsInLine gosub Beauty_DeleteComparators gosub Beauty_CreateDropList gosub Beauty_DeleteDupDrops gosub Beauty_FormatDropStatement gosub Beauty_PasteDropList gosub Beauty_MessageClose Return ; Return ; from gosub Beauty_DropListMaker ;========================================================================= :Beauty_Beautifier ; gosub Beauty_InitBeautifier If InStudio then gosub Beauty_OpenClip Else gosub Beauty_OpenFile gosub Beauty_CleanupPre gosub Beauty_Tokenize gosub Beauty_Indentation gosub Beauty_CleanupPost If !InStudio then gosub Beauty_AddLogo If InStudio then gosub Beauty_CloseClip Else gosub Beauty_CloseFile gosub Beauty_MessageClose ; Return ; from gosub Beauty_Beautifier ;========================================================================= :Beauty_CrossReferencer ; gosub Beauty_InitCrossRef If InStudio then gosub Beauty_OpenClip Else gosub Beauty_OpenFile gosub Beauty_CleanupPre gosub Beauty_MarkComments If ShowLiterals then gosub Beauty_MarkLiterals Else gosub Beauty_DeleteLiterals gosub Beauty_MarkCommentsInLine gosub Beauty_ReplaceOperators gosub Beauty_OneSpaceCleaning gosub Beauty_MarkEmptyLines gosub Beauty_PrepareSort gosub Beauty_Sort gosub Beauty_CreateReport gosub Beauty_AppendReportToScript gosub Beauty_MessageClose ; Return ; from gosub Beauty_CrossReferencer ;========================================================================= ;------------------------------------------------------------------------- :Beauty_OpenFile ; TheFileIn = ItemExtract(30,StringArr,@TAB) WorkMark = @CRLF ; important crlf WorkMarkSize = StrLen(WorkMark) num = FileSize(TheFileIn) bbtemp = BinaryAlloc(num) num = BinaryRead(bbtemp,TheFileIn) Lines = BinaryStrCnt(bbtemp, 0, num - 1, @CRLF) AppSize = (num + 2*WorkMarkSize + Lines * (LeftMargin + IndentTab + 4)) AppSize = max(2048,AppSize) bb = BinaryAlloc(AppSize) BinaryEodSet(bb,0) BinaryPokeStr(bb,0,WorkMark) BinaryCopy(bb,WorkMarkSize,bbtemp,0,num) BinaryPokeStr(bb,BinaryEodGet(bb),WorkMark) BinaryFree(bbtemp) Drop(AppSize,bbtemp,Lines,num,WorkMark,WorkMarkSize,TheFileIn) Return ;------------------------------------------------------------------------- :Beauty_OpenClip ; WorkMark = @CRLF ; important crlf WorkMarkSize = StrLen(WorkMark) num = BinaryClipGet(0,1) bbtemp = BinaryAlloc(num) num = BinaryClipGet(bbtemp,1) Lines = BinaryStrCnt(bbtemp, 0, num - 1, @CRLF) AppSize = (num + 2*WorkMarkSize + Lines * (LeftMargin + IndentTab + 4)) AppSize = max(2048,AppSize) bb = BinaryAlloc(AppSize) BinaryEodSet(bb,0) BinaryPokeStr(bb,0,WorkMark) BinaryCopy(bb,WorkMarkSize,bbtemp,0,num) BinaryPokeStr(bb,BinaryEodGet(bb),WorkMark) BinaryFree(bbtemp) Drop(AppSize,bbtemp,Lines,num,WorkMark,WorkMarkSize) Return ;------------------------------------------------------------------------- :Beauty_CloseClip ; BinaryClipPut(bb,1) If IsClipSelAll then wSelectAll() wEdPaste() BinaryFree(bb) Drop(bb) Return ;------------------------------------------------------------------------- :Beauty_CloseFile ; BinaryWrite(bb, ItemExtract(29,StringArr,@TAB)) ; TheFileOut BinaryFree(bb) Drop(bb) Return ;------------------------------------------------------------------------- :Beauty_InitBeautifier ; --- user configurable --- IndentTab = 3 ; (caution: Linelength max. 255 Byte!) LeftMargin = 0 ShiftCommentToLeftMargin = @FALSE UseTabs = @FALSE ; ---------------------- StringArr = ItemReplace(ItemExtract(23,StringArr,@TAB),28,StringArr,@TAB) TheFileIn = FileMapName(ItemExtract(30,StringArr,@TAB),"*.*") TheLogo = ItemExtract(1,StringArr,@TAB) While @TRUE OutStr1 = "" OutStr1 = StrCat(OutStr1,TheFileIn,@CRLF) OutStr1 = StrCat(OutStr1,"adjust Parameters:",@CRLF) OutStr1 = StrCat(OutStr1,"LeftMargin (0..20) Indentation (0..20)") OutStr2 = StrCat(LeftMargin,StrFill(" ",5),IndentTab) Params = askLine(TheLogo,OutStr1,OutStr2) Params = StrTrim(Params) ParseData(Params) If !IsDefined(Param2) then continue If !IsDefined(Param1) then continue If !IsInt(Param2) then continue If !IsInt(Param1) then continue If (Param1 < 0) then continue If (Param2 < 0) then continue Break EndWhile IndentTab = Param2 ; (caution: Linelength overall max. 255 Byte!) LeftMargin = Param1 Drop(OutStr1,OutStr2,Params,TheFileIn) Return ;------------------------------------------------------------------------- :Beauty_CleanupPre ; UDF_Beauty_Message(StringArr,2,"","") ; change tab in white space num = BinaryReplace(bb, @TAB, " ", @FALSE) ; unify EOL num = BinaryReplace(bb, @CRLF, @CR, @FALSE) num = BinaryReplace(bb, @LF, @CR, @FALSE) num = BinaryReplace(bb, @CR, @CRLF, @FALSE) ; leftadjust BinaryEodSet(bb,BinaryEodGet(bb)-1) ; workaround bug in BinaryReplace While @TRUE num = BinaryReplace(bb, StrCat(@LF," "), @LF, @FALSE) If (num < 1 ) then break EndWhile BinaryEodSet(bb,BinaryEodGet(bb)+1) ; workaround bug in BinaryReplace ; delete trailing blanks While @TRUE num = BinaryReplace(bb, StrCat(" ",@CR), @CR, @FALSE) If (num < 1 ) then break EndWhile ; insert one white space before eol num = BinaryReplace(bb, @CR, StrCat(" ",@CR), @FALSE) Lines = num Drop(num) Return ;------------------------------------------------------------------------- :Beauty_CleanupPost ; UDF_Beauty_Message(StringArr,3,"","") ; delete trailing blanks While @TRUE num = BinaryReplace(bb, StrCat(" ",@CR), @CR, @FALSE) If (num < 1 ) then break EndWhile ; delete WorkMarks structure = BinaryTagInit(bb,@CR,@LF) structure = BinaryTagFind(structure) If (structure <> "") then structure = BinaryTagRepl(structure,"") num = BinaryEodSet(bb, BinaryEodGet(bb)-2) Drop(num,structure) Return ;------------------------------------------------------------------------- :Beauty_AddLogo ; OutStr = StrCat("; ", TimeYmdHms()," ",ItemExtract(1,StringArr,@TAB),@CRLF) BinaryPokeStr(bb,BinaryEodGet(bb),OutStr) Drop(OutStr) Return ;------------------------------------------------------------------------- :Beauty_InitDropMaker ; ; --- hands off! --- IndentTab = 0 LeftMargin = 0 StringArr = ItemReplace(ItemExtract(22,StringArr,@TAB),28,StringArr,@TAB) Return ;------------------------------------------------------------------------- :Beauty_InitCrossRef ; ; --- user configurable --- ShowLiterals = @TRUE ShortenLiterals = @FALSE ; ---------------------- StringArr = ItemReplace(ItemExtract(24,StringArr,@TAB),28,StringArr,@TAB) bb_buf1 = BinaryAlloc(5) bb_buf2 = BinaryAlloc(5) BinaryPokeStr(bb_buf1,0,"00000") BinaryPokeStr(bb_buf2,0,"@@@@@") IndentTab = 0 LeftMargin = 0 LitList = "" Return ;------------------------------------------------------------------------- :Beauty_Tokenize ; num = BinaryReplace(bb, @LF, StrCat(@LF,"1",@TAB),@FALSE) If (IndentTab == 0) then return List1 = "" List1 = StrCat(List1,"3,If,While,For,Select,Switch/") List1 = StrCat(List1,"2,EndIf,Return,Exit,Next,EndSelect,EndWhile/") List1 = StrCat(List1,"1,Break,Continue/") List1 = StrCat(List1,"4,Case/") List1 = StrCat(List1,"5,Then/") List1 = StrCat(List1,"6,#DefineFunction,#EndFunction,#Include") List0 = "7,:,;" ; very special keywords Count = 1 For ii = 0 to 1 Tokens = ItemCount(List%ii%,"/") For it = 1 to Tokens sublist = ItemExtract(it,List%ii%,"/") subs = ItemCount(sublist,",") Token = ItemExtract(1,sublist,",") For is = 2 to subs sub = ItemExtract(is,sublist,",") If ii then sub = StrCat(sub," ") search = StrCat(@LF,"1",@TAB,sub) replace= StrCat(@LF,Token,@TAB,sub) num = BinaryReplace(bb, search, replace, @FALSE) Count = Count + num UDF_Beauty_Message(StringArr,18,lines,Count) Next Next Next :SpecialIfThen starttag = StrCat("3",@TAB,"If ") structure = BinaryTagInit(bb, starttag, @CR) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break TokenOffset = BinaryTagIndex(structure,1) ifthenLine = BinaryTagExtr(structure,1) ifthenLine = StrLower(ifthenLine) If (StrIndex(ifthenLine, " then ", 1, @FWDSCAN) > 0) then num = BinaryPokeStr(bb, TokenOffset, "1") Count = Count + num EndWhile UDF_Beauty_Message(StringArr,18,lines,Count) :SpecialElse starttag = StrCat("1",@TAB,"Else ") structure = BinaryTagInit(bb, starttag, @CR) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break TokenOffset = BinaryTagIndex(structure,1) ElseLine = BinaryTagExtr(structure,1) If UDF_Beauty_IsEmptyLine(ElseLine) then num = BinaryPokeStr(bb, TokenOffset, "4") Else num = BinaryPokeStr(bb, TokenOffset, "5") Count = Count + num EndWhile UDF_Beauty_Message(StringArr,18,lines,Count) Drop(Count,ElseLine,ifthenLine,ii,is,it,List0,List1,num,replace) Drop(search,starttag,structure,sub,sublist,subs,Token,TokenOffset,Tokens) Return ;------------------------------------------------------------------------- :Beauty_Indentation ; Indent = 0 structure = BinaryTagInit(bb, @LF, @TAB) i = 1 While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break Token = BinaryTagExtr(structure,1) prozent = 100 * i / Lines If ((prozent mod 10) == 0) UDF_Beauty_Message(StringArr,19,lines,i) EndIf i = i + 1 Select Token Case 1 ; NN Fill = Indent Break Case 2 ; LN Indent = max(0,Indent - IndentTab) Fill = Indent Break Case 3 ; NR Fill = Indent Indent = Indent + IndentTab Break Case 4 ; LR Indent = max(0,Indent - IndentTab) Fill = Indent Indent = Indent + IndentTab Break Case 5 ; RL Indent = Indent + IndentTab Fill = Indent Indent = max(0,Indent - IndentTab) Break Case 6 ; LF Indent = 0 Fill = 0 Break Case 7 ; LL If ShiftCommentToLeftMargin then Fill = 0 Else Fill = Indent Break EndSelect FillStr = StrFill(" ",LeftMargin) If UseTabs then IndentStr = StrFill(@TAB,(Fill/IndentTab)) Else IndentStr = StrFill(" ",Fill) FillStr = StrCat(FillStr,IndentStr) structure = BinaryTagRepl(structure,StrCat(@LF,FillStr)) EndWhile Drop(Fill,FillStr,i,Indent,IndentStr,prozent,structure,Token) Return ;------------------------------------------------------------------------- :Beauty_DeleteComments ; delete Comments UDF_Beauty_Message(StringArr,4,"","") structure = BinaryTagInit(bb, StrCat(@LF,";"), @CR) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break structure = BinaryTagRepl(structure,StrCat(@LF," ",@CR)) EndWhile Drop(structure) Return ;------------------------------------------------------------------------- :Beauty_DeleteLiterals ; delete literals UDF_Beauty_Message(StringArr,5,"","") OpList = """\`\'" OpItemCount = ItemCount(OpList,"\") For i=1 to OpItemCount OpItem = ItemExtract(i,OpList,"\") structure = BinaryTagInit(bb, OpItem, OpItem) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break structure = BinaryTagRepl(structure,"") EndWhile Next i Drop(i,OpItem,OpItemCount,OpList,structure) Return ;------------------------------------------------------------------------- :Beauty_MarkLiterals ; mark literals UDF_Beauty_Message(StringArr,6,"","") OpList = """\`\'" OpItemCount = ItemCount(OpList,"\") For i=1 to OpItemCount OpItem = ItemExtract(i,OpList,"\") structure = BinaryTagInit(bb, OpItem, OpItem) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break LitStr = BinaryTagExtr(structure,1) LitStr = StrCat(OpItem,LitStr,OpItem) If ShortenLiterals LitStrLen = StrLen(LitStr) LitStrFixLen = 26 If ((LitStrLen / 2) > LitStrFixLen) LitStr = StrCat(StrSub(LitStr,1,LitStrFixLen),"<.>",StrSub(LitStr,LitStrLen-LitStrFixLen+1,LitStrFixLen)) EndIf EndIf LitList = ItemInsert(LitStr,-1,LitList,@TAB) LitItemCount = ItemCount(LitList,@TAB) LitItemCount = StrFixLeft(LitItemCount,"0",5) BinaryPokeStr(bb_buf1,0,LitItemCount) BinaryOr(bb_buf1, 0, bb_buf2, 0, 5) LitStr = BinaryPeekStr(bb_buf1,0,5) LitStr = StrCat(" ","#_$_",LitStr," ") structure = BinaryTagRepl(structure,LitStr) EndWhile Next i Drop(i,LitItemCount,LitStr,LitStrFixLen,LitStrLen,OpItem,OpItemCount,OpList,structure) Return ;------------------------------------------------------------------------- :Beauty_DeleteCommentsInLine ; delete inLine Comments UDF_Beauty_Message(StringArr,7,"","") structure = BinaryTagInit(bb, ";", @CR) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break structure = BinaryTagRepl(structure,StrCat(" ",@CR)) EndWhile Drop(structure) Return ;------------------------------------------------------------------------- :Beauty_DeleteComparators ; delete comparison operators UDF_Beauty_Message(StringArr,8,"","") OpList = "==,=<,=>,<=,>=" OpItemCount = ItemCount(OpList,",") For i=1 to OpItemCount num = BinaryReplace(bb,ItemExtract(i,OpList,","),"",@FALSE) Next i Drop(i,num,OpList,OpItemCount) Return ;------------------------------------------------------------------------- :Beauty_CreateDropList ; create Droplist UDF_Beauty_Message(StringArr,9,"","") DropStr = "" DropItem_old = "" eqPos = -1 While @TRUE eqPos = BinaryIndexEx(bb,eqPos + 1,"=",@FWDSCAN,0) If (eqPos == -1) then break i = 0 While @TRUE i = i + 1 char = BinaryPeekStr(bb,eqPos - i,1) If (char <> " ") then break EndWhile RightPos = eqPos - i While @TRUE i = i + 1 char = BinaryPeekStr(bb,eqPos - i,1) If (char == @LF) then break If (char == " ") then break EndWhile LeftPos = eqPos - i + 1 DropItem = BinaryPeekStr(bb,LeftPos,RightPos-LeftPos+1) DropItem = StrTrim(DropItem) If (DropItem == DropItem_old) then continue DropStr = ItemInsert(DropItem,-1,DropStr,",") DropItem_old = DropItem EndWhile DropStr = ItemSort (DropStr,",") Drop(char,DropItem,DropItem_old,eqPos,i,LeftPos,RightPos) Return ;------------------------------------------------------------------------- :Beauty_DeleteDupDrops ;delete duplicates i=1 While (i < ItemCount(DropStr,",")) If (ItemExtract(i,DropStr,",") == ItemExtract(i+1,DropStr,",")) DropStr = ItemRemove(i+1,DropStr,",") Else i = i + 1 EndIf EndWhile Drop(i) Return ;------------------------------------------------------------------------- :Beauty_FormatDropStatement ;order Drop statements by DropItems Per Line DropItemCount = ItemCount(DropStr,",") If (DropItemCount == 0) DropStr = StrCat(@CRLF,"; nothing to drop") DropStrLines = 1 Drop(DropItemCount) Return EndIf ItemsPerDrop = 8 Comment = " ; auto Drop" i = 1 While (i <= DropItemCount) DropItem = ItemExtract(i,DropStr,",") DropItem = StrCat("Drop(",DropItem) DropStr = ItemReplace(DropItem,i,DropStr,",") i = i + ItemsPerDrop - 1 If (i <= DropItemCount) DropItem = ItemExtract(i,DropStr,",") DropItem = StrCat(DropItem,")",Comment,@CRLF) DropStr = ItemReplace(DropItem,i,DropStr,",") Else DropStr = StrCat(DropStr,")",Comment,@CRLF) EndIf i = i + 1 EndWhile DropStr = StrReplace(DropStr,StrCat(@CRLF,","),@CRLF) DropStr = StrCat(@CRLF,DropStr) DropStrLines = (DropItemCount/ItemsPerDrop) + 1 Drop(Comment,DropItem,DropItemCount,DropItemsPerLine,i) Return ;------------------------------------------------------------------------- :Beauty_PasteDropList ClipPut(DropStr) If InStudio If wGetSelState() wClearSel() GotoLine = ItemExtract(3,SelInfo,@TAB) GotoCol = ItemExtract(4,SelInfo,@TAB) If (GotoCol == 1) GotoLine = GotoLine - 1 EndIf wGotoLine(GotoLine) wEnd() wPaste() wHome() wGotoLine(GotoLine + DropStrLines) EndIf EndIf Drop(GotoCol,GotoLine) Return ;------------------------------------------------------------------------- :Beauty_MarkComments ; mark Comments UDF_Beauty_Message(StringArr,10,"","") structure = BinaryTagInit(bb, StrCat(@LF,";"), @CR) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break structure = BinaryTagRepl(structure,StrCat(@LF,"#_Comment_Line ",@CR)) EndWhile Drop(structure) Return ;------------------------------------------------------------------------- :Beauty_MarkCommentsInLine ; mark inLine Comments UDF_Beauty_Message(StringArr,11,"","") structure = BinaryTagInit(bb, ";", @CR) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break structure = BinaryTagRepl(structure,StrCat(" #_Comment_InLine ",@CR)) EndWhile Drop(structure) Return ;------------------------------------------------------------------------- :Beauty_ReplaceOperators ; replace operators UDF_Beauty_Message(StringArr,12,"","") OpList = "-\+\=\!\<\>\&\|\^\*\/\%%\~\(\)\,\." OpItemCount = ItemCount(OpList,"\") BinaryEodSet(bb,BinaryEodGet(bb)-1) ; workaround bug in BinaryReplace For i=1 to OpItemCount While @TRUE num = BinaryReplace(bb,ItemExtract(i,OpList,"\")," ",@FALSE) If (num < 1) then break EndWhile Next i BinaryEodSet(bb,BinaryEodGet(bb)+1) ; workaround bug in BinaryReplace Drop(i,num,OpItemCount,OpList) Return ;------------------------------------------------------------------------- :Beauty_OneSpaceCleaning ; cleaning While @TRUE num = BinaryReplace(bb," "," ",@FALSE) If (num < 1) then break EndWhile Drop(num) Return ;------------------------------------------------------------------------- :Beauty_MarkEmptyLines ; mark Empty Lines UDF_Beauty_Message(StringArr,13,"","") structure = BinaryTagInit(bb, StrCat(@LF," "), @CR) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break structure = BinaryTagRepl(structure,StrCat(@LF,"#_Empty_Line ",@CR)) EndWhile Drop(structure) Return ;------------------------------------------------------------------------- :Beauty_PrepareSort ; copy words and Linenumbers to buffer2 For sorting and reporting ; somewhat slow, but works ... UDF_Beauty_Message(StringArr,14,"","") words_sum = BinaryStrCnt(bb,0,BinaryEodGet(bb)-1," ") bb2_NameSize = 30 bb2_LineSize = 5 bb2_RecSize = bb2_NameSize + bb2_LineSize bb2_Size = words_sum * bb2_RecSize bb2 = BinaryAlloc(bb2_Size) bb2_Offset = 0 Eow = " " EowLen = StrLen(Eow) Eol = @CRLF EolLen = StrLen(Eol) Line = 0 wordbegin = 0 words = 0 While @TRUE wordend = BinaryIndexEx(bb,wordbegin,Eow,@FWDSCAN,@FALSE) If (wordend == -1) then break prozent = 100 * words / words_sum If ((prozent mod 10) == 0) UDF_Beauty_Message(StringArr,20,words_sum,words) EndIf words = words + 1 wordlen = wordend - wordbegin LineStr = StrFixLeft(Line," ",bb2_LineSize) BinaryCopy(bb2,bb2_Offset,bb,wordbegin,wordlen) BinaryPokeStr(bb2,bb2_Offset + bb2_NameSize,LineStr) bb2_Offset = bb2_Offset + bb2_RecSize wordbegin = wordend + EowLen If (BinaryPeekStr(bb,wordbegin,EolLen) == Eol) Line = Line + 1 wordbegin = wordbegin + EolLen EndIf EndWhile num = BinaryReplace(bb2,""," ",@FALSE) Drop(Eol,EolLen,Eow,EowLen) Drop(Line,LineStr,num,wordbegin,wordend,wordlen,words) Return ;------------------------------------------------------------------------- :Beauty_Sort ; do the beautiful sort UDF_Beauty_Message(StringArr,15,"","") BinarySort(bb2,bb2_RecSize,0,bb2_RecSize,@STRING|@ASCENDING) Return ;------------------------------------------------------------------------- :Beauty_CreateReport ; create report UDF_Beauty_Message(StringArr,16,"","") LitTag = "#_$_" LitCodeTag = StrCat(LitTag,"?????") words = 1 ReportStr = "" bb2_Offset = bb2_RecSize ; skip over workmark Line=0 Name = BinaryPeekStr(bb2,bb2_Offset,bb2_NameSize) While (bb2_Offset < bb2_Size) literal = (StrSub(Name,1,4) == LitTag) If literal LitCode = StrSub(Name,5,5) BinaryPokeStr(bb_buf1,0,LitCode) BinaryXor(bb_buf1, 0, bb_buf2, 0, 5) LitNr = BinaryPeekStr(bb_buf1,0,5) Name = StrFix(StrCat(LitTag,LitNr)," ",30) LitStr = ItemExtract(LitNr,LitList,@TAB) While @TRUE LitNestedPos = StrIndexWild(LitStr,LitCodeTag,1) If (LitNestedPos == 0) then break LitNestedCode = StrSub(LitStr,LitNestedPos+StrLen(LitTag),5) BinaryPokeStr(bb_buf1,0,LitNestedCode) BinaryXor(bb_buf1, 0, bb_buf2, 0, 5) LitNestedNr = BinaryPeekStr(bb_buf1,0,5) replace = ItemExtract(LitNestedNr,LitList,@TAB) search = StrCat(" ",LitTag,LitNestedCode," ") LitStr = StrReplace(LitStr, search, replace) EndWhile EndIf ReportStr = StrCat(ReportStr,Name,@TAB) Name_old = Name LineList = "" Line_old = "" ic=0 While @TRUE Line = BinaryPeekStr(bb2,bb2_Offset+bb2_NameSize,bb2_LineSize) prozent = 100 * words / words_sum If ((prozent mod 10) == 0) UDF_Beauty_Message(StringArr,21,words_sum,words) EndIf words = words + 1 If (Line <> Line_old) Line_old = Line LineList = ItemInsert(Line,-1,LineList,",") ic = ic + 1 EndIf bb2_Offset = bb2_Offset + bb2_RecSize If !(bb2_Offset < bb2_Size) then break Name = BinaryPeekStr(bb2,bb2_Offset,bb2_NameSize) If (Name <> Name_old) then break EndWhile Items = ItemCount(LineList,",") If (Items == 1) If literal LineList = StrCat(LineList,@TAB,LitStr) EndIf Else it = 11 While (it <= Items) Item = ItemExtract(it,LineList,",") Item = StrCat(@CR,StrFill(" ",bb2_NameSize),@TAB,Item) LineList = ItemReplace(Item,it,LineList,",") it = it + 10 EndWhile EndIf ReportStr = StrCat(ReportStr, LineList, @CR) EndWhile BinaryFree(bb2) Drop(bb2_Offset,ic,it,Item,Items,Line,Line_old,LineList,Name,Name_old) Return ;------------------------------------------------------------------------- :Beauty_AppendReportToScript ; UDF_Beauty_Message(StringArr,17,"","") TheFileIn = ItemExtract(30,StringArr,@TAB) TheFileOut = ItemExtract(29,StringArr,@TAB) ReportStr = StrCat(TheFileIn,@CR,@CR,ReportStr) ReportStr = StrCat(@CR,StrFill("-",100),@CR,ReportStr) ReportStr = StrCat(ReportStr,@CR,TimeYmdHms()," ",ItemExtract(1,StringArr,@TAB)) ReportStr = StrCat(ReportStr,@CR,StrFill("-",100)) ReportStr = StrReplace(ReportStr,@CR,StrCat(@CRLF,";",@TAB)) If InStudio ClipPut(ReportStr) wClearSel() wEndOfFile() wPaste() Else handle = FileOpen(TheFileOut, "APPEND") ; TheFileOut FileWrite(handle,ReportStr) FileClose(handle) EndIf Drop(handle,ReportStr,TheFileIn,TheFileOut) Return ;------------------------------------------------------------------------- :Beauty_MessageClose ; If InStudio wStatusMsg("") Else BoxShut() EndIf Return ;------------------------------------------------------------------------- :Beauty_DefineGlobalVar ; I use this way of a string list because of issues while using arrays in WinBatch Studio ; StringArr = "" ; 30 Items StringArr = ItemInsert("BeautyTools For WinBatch 0.99a - Detlev Dalitz 20010401",-1,StringArr,@TAB) StringArr = ItemInsert("Cleanup Pre ...",-1,StringArr,@TAB) StringArr = ItemInsert("Cleanup Post ...",-1,StringArr,@TAB) StringArr = ItemInsert("Deleting Comments ...",-1,StringArr,@TAB) StringArr = ItemInsert("Deleting Literals ...",-1,StringArr,@TAB) StringArr = ItemInsert("Marking Literals ...",-1,StringArr,@TAB) StringArr = ItemInsert("Deleting InLine Comments ...",-1,StringArr,@TAB) StringArr = ItemInsert("Deleting Operators ...",-1,StringArr,@TAB) StringArr = ItemInsert("Creating Droplist ...",-1,StringArr,@TAB) StringArr = ItemInsert("Marking Comments ...",-1,StringArr,@TAB) StringArr = ItemInsert("Marking InLine Comments ...",-1,StringArr,@TAB) StringArr = ItemInsert("Replacing Operators ...",-1,StringArr,@TAB) StringArr = ItemInsert("Marking Empty Lines ...",-1,StringArr,@TAB) StringArr = ItemInsert("Preparing ...",-1,StringArr,@TAB) StringArr = ItemInsert("Sorting ...",-1,StringArr,@TAB) StringArr = ItemInsert("Reporting ...",-1,StringArr,@TAB) StringArr = ItemInsert("Writing ...",-1,StringArr,@TAB) StringArr = ItemInsert("Tokenize ... # ",-1,StringArr,@TAB) StringArr = ItemInsert("Indentation ... # ",-1,StringArr,@TAB) StringArr = ItemInsert("Preparing ... # ",-1,StringArr,@TAB) StringArr = ItemInsert("Reporting ... # ",-1,StringArr,@TAB) StringArr = ItemInsert("DropMaker",-1,StringArr,@TAB) StringArr = ItemInsert("Beautify",-1,StringArr,@TAB) StringArr = ItemInsert("CrossRef",-1,StringArr,@TAB) StringArr = ItemInsert(".",-1,StringArr,@TAB) ; free StringArr = ItemInsert(".",-1,StringArr,@TAB) ; free StringArr = ItemInsert(".",-1,StringArr,@TAB) ; free StringArr = ItemInsert(".",-1,StringArr,@TAB) ; reserved for actual modul StringArr = ItemInsert("",-1,StringArr,@TAB) ; reserved for TheFileOut StringArr = ItemInsert("",-1,StringArr,@TAB) ; reserved for TheFileIn Return ;------------------------------------------------------------------------- ;========================================================================= :Beauty_DefineUDFs ;------------------------------------------------------------------------- #DefineFunction UDF_Beauty_IsEmptyLine(SearchStr) ; Len = StrLen(SearchStr) If (Len == 0) then return @TRUE SearchStr = StrReplace(SearchStr, " ", "") Len = StrLen(SearchStr) If (Len == 0) then return @TRUE bb = BinaryAlloc(Len + 2) BinaryPokeStr(bb,0,SearchStr) BinaryPokeStr(bb,Len,@CRLF) ; delete literals OpList = """\`\'" OpItemCount = ItemCount(OpList,"\") For i=1 to OpItemCount OpItem = ItemExtract(i,OpList,"\") structure = BinaryTagInit(bb, OpItem, OpItem) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break structure = BinaryTagRepl(structure,"") EndWhile Next i ; delete inLine Comment structure = BinaryTagInit(bb, ";", @CRLF) While @TRUE structure = BinaryTagFind(structure) If (structure == "") then break structure = BinaryTagRepl(structure,"") EndWhile Result = (BinaryEodGet(bb)==0) BinaryFree(bb) Return (Result) #EndFunction ;------------------------------------------------------------------------- #DefineFunction UDF_Beauty_Message(StringArr,StringNr,MaxCount,Count) ; OutStr = "" If (IsInt(MaxCount) && IsInt(Count)) If (Count > 0) then OutStr = StrCat(MaxCount,"/",Count) EndIf OutStr = StrCat(ItemExtract(StringNr,StringArr,@TAB),OutStr) ; actual task OutStr = StrCat(ItemExtract(28,StringArr,@TAB)," ",OutStr) ; actual modul If (rtStatus() == 10) ; InStudio wStatusMsg(OutStr) Else OutStr = StrCat("out:",@TAB,ItemExtract(29,StringArr,@TAB),@CRLF,@CRLF,OutStr) OutStr = StrCat("in:",@TAB,ItemExtract(30,StringArr,@TAB),@CRLF,OutStr) BoxOpen(ItemExtract(1,StringArr,@TAB),OutStr) EndIf Return #EndFunction ;------------------------------------------------------------------------- Return ; from gosub BeautyDefineUDFs ;========================================================================= ; ---------------------------------------------------------------------------------------------------- ; W:\WINBATCH\2001\WinBatch Test\DDBEAUTY.wbt ; ; ; 990 ; #_$_00001 45 "" ; #_$_00002 59 "" ; #_$_00003 90 "No Parameters specified" ; #_$_00004 90 "Usage: WinBatch.exe ddbeauty.wbt [d|b|bc|c infile.wbt outfile.wbt]" ; #_$_00005 96 "d" ; #_$_00006 98 "Please use DropMaker in WinBatch Studio Editor" ; #_$_00007 100 "b" ; #_$_00008 103 "c" ; #_$_00009 106 "bc" ; #_$_00010 107 "cb" ; #_$_00011 240 "*.*" ; #_$_00012 243 "" ; #_$_00013 245 "adjust Parameters:" ; #_$_00014 246 "LeftMargin (0..20) Indentation (0..20)" ; #_$_00015 247 " " ; #_$_00016 268 "" ; #_$_00017 268 "" ; #_$_00018 270 " " ; #_$_00019 278 " " ; #_$_00020 284 " " ; #_$_00021 288 " " ; #_$_00022 296 "" ; #_$_00023 296 "" ; #_$_00024 299 " " ; #_$_00025 305 "" ; #_$_00026 305 "" ; #_$_00027 313 "; " ; #_$_00028 313 " " ; #_$_00029 337 "00000" ; #_$_00030 338 "@@@@@" ; #_$_00031 341 "" ; #_$_00032 347 "1" ; #_$_00033 350 "" ; #_$_00034 351 "3,If,While,For,Select,Switch/" ; #_$_00035 352 "2,EndIf,Return,Exit,Next,EndSelect,EndWhile/" ; #_$_00036 353 "1,Break,Continue/" ; #_$_00037 354 "4,Case/" ; #_$_00038 355 "5,Then/" ; #_$_00039 356 "6,#DefineFunction,#EndFunction,#Include" ; #_$_00040 357 "7,:,;" ; #_$_00041 361 "/" ; #_$_00042 363 "/" ; #_$_00043 364 "," ; #_$_00044 365 "," ; #_$_00045 367 "," ; #_$_00046 368 " " ; #_$_00047 369 "1" ; #_$_00048 379 "3" ; #_$_00049 379 "If " ; #_$_00050 383 "" ; #_$_00051 387 " then " ; #_$_00052 387 "1" ; #_$_00053 393 "1" ; #_$_00054 393 "Else " ; #_$_00055 397 "" ; #_$_00056 400 "4" ; #_$_00057 401 "5" ; #_$_00058 417 "" ; #_$_00059 457 " " ; #_$_00060 459 " " ; #_$_00061 469 "" ; #_$_00062 469 "" ; #_$_00063 470 ";" ; #_$_00064 473 "" ; #_$_00065 474 " " ; #_$_00066 482 "" ; #_$_00067 482 "" ; #_$_00068 483 "" ; #_$_00069 483 "\`\'" ; #_$_00070 484 "\" ; #_$_00071 486 "\" ; #_$_00072 490 "" ; #_$_00073 491 "" ; #_$_00074 500 "" ; #_$_00075 500 "" ; #_$_00076 501 "" ; #_$_00077 501 "\`\'" ; #_$_00078 502 "\" ; #_$_00079 504 "\" ; #_$_00080 508 "" ; #_$_00081 515 "<.>" ; #_$_00082 520 "0" ; #_$_00083 524 " " ; #_$_00084 524 "#_$_" ; #_$_00085 524 " " ; #_$_00086 534 "" ; #_$_00087 534 "" ; #_$_00088 535 ";" ; #_$_00089 538 "" ; #_$_00090 539 " " ; #_$_00091 547 "" ; #_$_00092 547 "" ; #_$_00093 548 "==,=<,=>,<=,>=" ; #_$_00094 549 "," ; #_$_00095 551 "," ; #_$_00096 551 "" ; #_$_00097 559 "" ; #_$_00098 559 "" ; #_$_00099 560 "" ; #_$_00100 561 "" ; #_$_00101 564 "=" ; #_$_00102 571 " " ; #_$_00103 579 " " ; #_$_00104 586 "," ; #_$_00105 590 "," ; #_$_00106 598 "," ; #_$_00107 599 "," ; #_$_00108 599 "," ; #_$_00109 600 "," ; #_$_00110 611 "," ; #_$_00111 613 "; nothing to drop" ; #_$_00112 620 " ; auto Drop" ; #_$_00113 623 "," ; #_$_00114 624 "Drop(" ; #_$_00115 625 "," ; #_$_00116 628 "," ; #_$_00117 629 ")" ; #_$_00118 630 "," ; #_$_00119 632 ")" ; #_$_00120 636 "," ; #_$_00121 666 "" ; #_$_00122 666 "" ; #_$_00123 667 ";" ; #_$_00124 670 "" ; #_$_00125 671 "#_Comment_Line " ; #_$_00126 679 "" ; #_$_00127 679 "" ; #_$_00128 680 ";" ; #_$_00129 683 "" ; #_$_00130 684 " #_Comment_InLine " ; #_$_00131 692 "" ; #_$_00132 692 "" ; #_$_00133 693 "-\+\=\!\<\>\&\|\^\*\/\%%\~\(\)\,\." ; #_$_00134 694 "\" ; #_$_00135 699 "\" ; #_$_00136 699 " " ; #_$_00137 711 " " ; #_$_00138 711 " " ; #_$_00139 720 "" ; #_$_00140 720 "" ; #_$_00141 721 " " ; #_$_00142 724 "" ; #_$_00143 725 "#_Empty_Line " ; #_$_00144 734 "" ; #_$_00145 734 "" ; #_$_00146 735 " " ; #_$_00147 742 " " ; #_$_00148 758 " " ; #_$_00149 768 "" ; #_$_00150 768 " " ; #_$_00151 776 "" ; #_$_00152 776 "" ; #_$_00153 783 "" ; #_$_00154 783 "" ; #_$_00155 784 "#_$_" ; #_$_00156 785 "?????" ; #_$_00157 787 "" ; #_$_00158 799 " " ; #_$_00159 809 " " ; #_$_00160 809 " " ; #_$_00161 816 "" ; #_$_00162 817 "" ; #_$_00163 828 "," ; #_$_00164 836 "," ; #_$_00165 844 "," ; #_$_00166 845 " " ; #_$_00167 846 "," ; #_$_00168 859 "" ; #_$_00169 859 "" ; #_$_00170 863 "-" ; #_$_00171 864 " " ; #_$_00172 865 "-" ; #_$_00173 866 ";" ; #_$_00174 873 "APPEND" ; #_$_00175 884 "" ; #_$_00176 894 "" ; #_$_00177 895 "BeautyTools For WinBatch 0.99a - Detlev Dalitz 20010401" ; #_$_00178 896 "Cleanup Pre ..." ; #_$_00179 897 "Cleanup Post ..." ; #_$_00180 898 "Deleting Comments ..." ; #_$_00181 899 "Deleting Literals ..." ; #_$_00182 900 "Marking Literals ..." ; #_$_00183 901 "Deleting InLine Comments ..." ; #_$_00184 902 "Deleting Operators ..." ; #_$_00185 903 "Creating Droplist ..." ; #_$_00186 904 "Marking Comments ..." ; #_$_00187 905 "Marking InLine Comments ..." ; #_$_00188 906 "Replacing Operators ..." ; #_$_00189 907 "Marking Empty Lines ..." ; #_$_00190 908 "Preparing ..." ; #_$_00191 909 "Sorting ..." ; #_$_00192 910 "Reporting ..." ; #_$_00193 911 "Writing ..." ; #_$_00194 912 "Tokenize ... # " ; #_$_00195 913 "Indentation ... # " ; #_$_00196 914 "Preparing ... # " ; #_$_00197 915 "Reporting ... # " ; #_$_00198 916 "DropMaker" ; #_$_00199 917 "Beautify" ; #_$_00200 918 "CrossRef" ; #_$_00201 919 "." ; #_$_00202 920 "." ; #_$_00203 921 "." ; #_$_00204 922 "." ; #_$_00205 923 "" ; #_$_00206 924 "" ; #_$_00207 935 " " ; #_$_00208 935 "" ; #_$_00209 943 "" ; #_$_00210 943 "\`\'" ; #_$_00211 944 "\" ; #_$_00212 946 "\" ; #_$_00213 950 "" ; #_$_00214 951 "" ; #_$_00215 956 ";" ; #_$_00216 959 "" ; #_$_00217 960 "" ; #_$_00218 970 "" ; #_$_00219 972 "/" ; #_$_00220 975 " " ; #_$_00221 980 "out:" ; #_$_00222 981 "in:" ; #_Comment_InLine 43, 69, 70, 83, 132, 148, 169, 175, 195, 225, ; 233, 260, 276, 281, 357, 427, 430, 434, 438, 443, ; 448, 452, 696, 703, 788, 873, 894, 919, 920, 921, ; 922, 923, 924, 974, 975, 977, 988 ; #_Comment_Line 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ; 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ; 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, ; 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, ; 41, 42, 48, 49, 51, 52, 53, 54, 55, 64, ; 65, 89, 114, 116, 131, 133, 135, 147, 149, 151, ; 168, 170, 171, 173, 192, 194, 212, 214, 222, 224, ; 230, 232, 238, 265, 267, 269, 271, 275, 282, 287, ; 293, 295, 297, 302, 310, 312, 318, 320, 321, 326, ; 328, 329, 333, 344, 346, 409, 411, 466, 468, 479, ; 481, 497, 499, 531, 533, 544, 546, 556, 558, 594, ; 596, 608, 610, 642, 663, 665, 676, 678, 689, 691, ; 707, 709, 717, 719, 730, 732, 733, 773, 775, 780, ; 782, 856, 858, 880, 882, 890, 892, 893, 927, 928, ; 930, 932, 942, 955, 967, 969, 987, 989 ; #_Empty_Line 67, 86, 112, 189, 209, 219, 227, 237, 259, 262, ; 290, 307, 315, 332, 342, 349, 358, 377, 391, 405, ; 419, 425, 463, 476, 494, 528, 541, 553, 566, 574, ; 582, 589, 591, 605, 618, 639, 660, 673, 686, 695, ; 704, 714, 727, 769, 778, 789, 791, 813, 853, 877, ; 888, 925, 941, 954, 964, 976, 984, 990 ; #DefineFunction 931, 968 ; #EndFunction 966, 986 ; :Beauty_AddLogo 311 ; :Beauty_AppendReportToScript 857 ; :Beauty_Beautifier 134 ; :Beauty_CleanupPost 294 ; :Beauty_CleanupPre 266 ; :Beauty_CloseClip 213 ; :Beauty_CloseFile 223 ; :Beauty_CreateDropList 557 ; :Beauty_CreateReport 781 ; :Beauty_CrossReferencer 150 ; :Beauty_DefineGlobalVar 891 ; :Beauty_DefineUDFs 929 ; :Beauty_DeleteComments 467 ; :Beauty_DeleteCommentsInLine 532 ; :Beauty_DeleteComparators 545 ; :Beauty_DeleteDupDrops 595 ; :Beauty_DeleteLiterals 480 ; :Beauty_DropMaker 115 ; :Beauty_FormatDropStatement 609 ; :Beauty_Indentation 410 ; :Beauty_InitBeautifier 231 ; :Beauty_InitCrossRef 327 ; :Beauty_InitDropMaker 319 ; :Beauty_MarkComments 664 ; :Beauty_MarkCommentsInLine 677 ; :Beauty_MarkEmptyLines 718 ; :Beauty_MarkLiterals 498 ; :Beauty_MessageClose 881 ; :Beauty_OneSpaceCleaning 708 ; :Beauty_OpenClip 193 ; :Beauty_OpenFile 172 ; :Beauty_PasteDropList 643 ; :Beauty_PrepareSort 731 ; :Beauty_ReplaceOperators 690 ; :Beauty_Sort 774 ; :Beauty_Tokenize 345 ; :SpecialElse 392 ; :SpecialIfThen 378 ; @ASCENDING 777 ; @CR 272, 273, 274, 284, 288, 299, 303, 380, 394, 470, ; 474, 535, 539, 667, 671, 680, 684, 721, 725, 845, ; 850, 862, 863, 864, 865, 866 ; @CRLF 90, 175, 180, 195, 200, 244, 245, 272, 274, 313, ; 613, 629, 632, 636, 637, 744, 866, 940, 956, 980, ; 981 ; @FALSE 71, 76, 88, 235, 236, 270, 272, 273, 274, 278, ; 284, 288, 299, 331, 347, 371, 551, 699, 711, 750, ; 768 ; @FWDSCAN 387, 564, 750 ; @LF 273, 278, 303, 347, 369, 370, 413, 461, 470, 474, ; 578, 667, 671, 721, 725 ; @STRING 777 ; @TAB 69, 70, 83, 90, 98, 174, 225, 239, 240, 241, ; 270, 313, 324, 334, 347, 369, 370, 379, 393, 413, ; 458, 518, 519, 648, 649, 800, 808, 814, 839, 845, ; 860, 861, 864, 866, 895, 896, 897, 898, 899, 900, ; 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, ; 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, ; 921, 922, 923, 924, 974, 975, 980, 981, 982 ; @TRUE 80, 92, 242, 277, 283, 298, 330, 381, 395, 415, ; 471, 488, 506, 536, 563, 568, 575, 668, 681, 698, ; 710, 722, 749, 801, 819, 934, 937, 948, 957 ; 0 44, 50, 58, 87, 180, 184, 185, 186, 197, 200, ; 204, 205, 206, 234, 255, 256, 322, 323, 337, 338, ; 339, 340, 348, 360, 387, 412, 421, 431, 439, 446, ; 449, 450, 453, 521, 522, 523, 564, 567, 612, 735, ; 741, 746, 747, 748, 753, 777, 796, 797, 798, 803, ; 805, 806, 807, 818, 822, 934, 937, 939, 962, 972 ; 1 68, 90, 98, 180, 197, 199, 200, 215, 241, 276, ; 279, 281, 285, 300, 313, 359, 360, 362, 365, 384, ; 385, 387, 398, 399, 414, 418, 424, 427, 485, 503, ; 509, 515, 518, 550, 562, 564, 565, 569, 570, 576, ; 577, 581, 583, 586, 597, 599, 600, 602, 614, 621, ; 626, 634, 638, 650, 651, 696, 697, 700, 703, 712, ; 735, 751, 756, 764, 786, 793, 802, 825, 828, 829, ; 837, 864, 895, 896, 897, 898, 899, 900, 901, 902, ; 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, ; 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, ; 923, 924, 945, 982 ; 10 43, 421, 666, 753, 822, 847, 977 ; 100 420, 752, 821, 863, 865 ; 11 679, 842 ; 12 692 ; 13 720 ; 14 734 ; 15 776 ; 16 783 ; 17 859 ; 18 373, 390, 404 ; 19 422 ; 2 181, 201, 268, 306, 366, 430, 514, 938 ; 20 754 ; 2048 182, 202 ; 21 823 ; 22 324 ; 23 239 ; 24 334 ; 26 513 ; 28 239, 324, 334, 975 ; 29 70, 225, 861, 980 ; 3 233, 296, 434, 648 ; 30 69, 83, 174, 240, 736, 799, 860, 981 ; 4 181, 201, 438, 469, 649, 793 ; 5 247, 335, 336, 443, 482, 520, 522, 523, 737, 795, ; 797, 798, 804, 806, 807 ; 6 448, 500 ; 7 452, 534 ; 8 547, 619 ; 9 44, 58, 559 ; AppSize 181, 182, 183, 190, 201, 202, 203, 210 ; askLine 248 ; bb 183, 184, 185, 186, 187, 203, 204, 205, 206, 207, ; 215, 218, 220, 225, 226, 228, 270, 272, 273, 274, ; 276, 278, 281, 284, 288, 299, 303, 306, 314, 347, ; 371, 380, 387, 394, 400, 401, 413, 470, 487, 505, ; 535, 551, 564, 570, 577, 583, 667, 680, 696, 699, ; 703, 711, 721, 735, 750, 759, 763, 938, 939, 940, ; 947, 956, 962, 963 ; bb_buf1 335, 337, 521, 522, 523, 796, 797, 798, 805, 806, ; 807 ; bb_buf2 336, 338, 522, 797, 806 ; bb2 740, 759, 760, 768, 777, 790, 820, 833, 852 ; bb2_LineSize 737, 738, 758, 820 ; bb2_NameSize 736, 738, 760, 790, 820, 833, 845 ; bb2_Offset 741, 759, 760, 761, 788, 790, 792, 820, 831, 832, ; 833, 854 ; bb2_RecSize 738, 739, 761, 777, 788, 831 ; bb2_Size 739, 740, 792, 832 ; bbtemp 178, 179, 180, 186, 188, 190, 198, 199, 200, 206, ; 208, 210 ; Beauty_AddLogo 143 ; Beauty_AppendReportToScript 166 ; Beauty_Beautifier 101, 108 ; Beauty_CleanupPost 142 ; Beauty_CleanupPre 120, 139, 155 ; Beauty_CloseClip 144 ; Beauty_CloseFile 145 ; Beauty_CreateDropList 125 ; Beauty_CreateReport 165 ; Beauty_CrossReferencer 104, 109 ; Beauty_DefineGlobalVar 66 ; Beauty_DefineUDFs 94 ; Beauty_DeleteComments 121 ; Beauty_DeleteCommentsInLine 123 ; Beauty_DeleteComparators 124 ; Beauty_DeleteDupDrops 126 ; Beauty_DeleteLiterals 122, 158 ; Beauty_DropMaker 97 ; Beauty_FormatDropStatement 127 ; Beauty_Indentation 141 ; Beauty_InitBeautifier 136 ; Beauty_InitCrossRef 152 ; Beauty_InitDropMaker 117 ; Beauty_MarkComments 156 ; Beauty_MarkCommentsInLine 159 ; Beauty_MarkEmptyLines 162 ; Beauty_MarkLiterals 157 ; Beauty_MessageClose 129, 146, 167 ; Beauty_OneSpaceCleaning 161 ; Beauty_OpenClip 118, 137, 153 ; Beauty_OpenFile 119, 138, 154 ; Beauty_PasteDropList 128 ; Beauty_PrepareSort 163 ; Beauty_ReplaceOperators 160 ; Beauty_Sort 164 ; Beauty_Tokenize 140 ; BinaryAlloc 178, 183, 198, 203, 335, 336, 740, 938 ; BinaryClipGet 197, 199 ; BinaryClipPut 215 ; BinaryCopy 186, 206, 759 ; BinaryEodGet 187, 207, 276, 281, 306, 314, 696, 703, 735, 962 ; BinaryEodSet 184, 204, 276, 281, 306, 696, 703 ; BinaryFree 188, 208, 218, 226, 852, 963 ; BinaryIndexEx 564, 750 ; BinaryOr 522 ; BinaryPeekStr 523, 570, 577, 583, 763, 790, 798, 807, 820, 833 ; BinaryPokeStr 185, 187, 205, 207, 314, 337, 338, 387, 400, 401, ; 521, 760, 796, 805, 939, 940 ; BinaryRead 179 ; BinaryReplace 270, 272, 273, 274, 278, 284, 288, 299, 347, 371, ; 551, 699, 711, 768 ; BinarySort 777 ; BinaryStrCnt 180, 200, 735 ; BinaryTagExtr 385, 399, 418, 509 ; BinaryTagFind 304, 382, 396, 416, 472, 489, 507, 537, 669, 682, ; 723, 949, 958 ; BinaryTagIndex 384, 398 ; BinaryTagInit 303, 380, 394, 413, 470, 487, 505, 535, 667, 680, ; 721, 947, 956 ; BinaryTagRepl 305, 461, 474, 491, 525, 539, 671, 684, 725, 951, ; 960 ; BinaryWrite 225 ; BinaryXor 797, 806 ; BoxOpen 982 ; BoxShut 886 ; Break 91, 99, 102, 105, 110, 257 ; break 279, 285, 300, 383, 397, 417 ; Break 429, 433, 437, 442, 447, 451, 455 ; break 473, 490, 508, 538, 565, 571, 578, 579, 670, 683, ; 700, 712, 724, 751, 803, 832, 834, 950, 959 ; CallParam 45, 46, 59, 60 ; CallParam0 50, 68, 87 ; CallParam1 93, 96, 100, 103, 106, 107 ; CallParam2 69 ; CallParam3 70 ; Case 88, 92, 96, 100, 103, 106, 107, 427, 430, 434, ; 438, 443, 448, 452 ; char 570, 571, 577, 578, 579, 592 ; ClipPut 644, 868 ; cmdLine 56, 57 ; Comment 620, 629, 632, 640 ; Continue 95 ; continue 251, 252, 253, 254, 255, 256, 585 ; Count 359, 372, 373, 388, 390, 402, 404, 406, 968, 971, ; 972 ; Drop 190, 210, 220, 228, 263, 291, 308, 316, 406, 407, ; 464, 477, 495, 529, 542, 554, 592, 606, 615, 640, ; 661, 674, 687, 705, 715, 728, 770, 771, 854, 878 ; DropItem 583, 584, 585, 586, 587, 592, 623, 624, 625, 628, ; 629, 630, 640 ; DropItem_old 561, 585, 587, 592 ; DropItemCount 611, 612, 615, 622, 627, 638, 640 ; DropItemsPerLine 640 ; DropStr 560, 586, 590, 598, 599, 600, 611, 613, 623, 625, ; 628, 630, 632, 636, 637, 644 ; DropStrLines 614, 638, 657 ; Else 72, 77, 98, 119, 138, 145, 154, 158, 401, 454, ; 459, 601, 631, 841, 872, 885, 979 ; ElseLine 399, 400, 406 ; EndIf 62, 63, 81, 84, 85, 423, 516, 517, 603, 617, ; 633, 652, 658, 659, 755, 766, 812, 824, 830, 840, ; 849, 876, 887, 973, 983 ; EndSelect 111, 456 ; EndWhile 258, 280, 286, 301, 389, 403, 462, 475, 492, 526, ; 540, 572, 580, 588, 604, 635, 672, 685, 701, 713, ; 726, 767, 811, 835, 848, 851, 952, 961 ; Eol 744, 745, 763, 770 ; EolLen 745, 763, 765, 770 ; Eow 742, 743, 750, 770 ; EowLen 743, 762, 770 ; eqPos 562, 564, 565, 570, 573, 577, 581, 592 ; Exit 113 ; FileClose 875 ; FileMapName 240 ; FileOpen 873 ; FileSize 177 ; FileWrite 874 ; Fill 428, 432, 435, 440, 445, 450, 453, 454, 458, 459, ; 464 ; FillStr 457, 460, 461, 464 ; For 44, 58, 360, 362, 366, 485, 503, 550, 697, 945 ; gosub 66, 94, 97, 101, 104, 108, 109, 117, 118, 119, ; 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, ; 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, ; 146, 152, 153, 154, 155, 156, 157, 158, 159, 160, ; 161, 162, 163, 164, 165, 166, 167 ; GotoCol 649, 650, 661 ; GotoLine 648, 651, 653, 657, 661 ; handle 873, 874, 875, 878 ; i 44, 45, 46, 47, 58, 59, 60, 61, 414, 420, ; 422, 424, 464, 485, 486, 493, 495, 503, 504, 527, ; 529, 550, 551, 552, 554, 567, 569, 570, 573, 576, ; 577, 581, 592, 597, 598, 599, 600, 602, 606, 621, ; 622, 623, 625, 626, 627, 628, 630, 634, 640, 697, ; 699, 702, 705, 945, 946, 953 ; ic 818, 829, 854 ; If 46, 50, 56, 60, 68, 73, 74, 97, 118, 137, ; 143, 144, 153, 157, 216, 251, 252, 253, 254, 255, ; 256, 279, 285, 300, 305, 348, 368, 383, 387, 397, ; 400, 417, 421, 453, 458, 473, 490, 508, 511, 514, ; 538, 565, 571, 578, 579, 585, 599, 612, 627, 645, ; 646, 650, 670, 683, 700, 712, 724, 751, 753, 763, ; 794, 803, 822, 826, 832, 834, 837, 838, 867, 883, ; 934, 937, 950, 959, 971, 972, 977 ; ifthenLine 385, 386, 387, 406 ; ii 360, 361, 363, 368, 406 ; Indent 412, 428, 431, 432, 435, 436, 439, 440, 441, 444, ; 445, 446, 449, 454, 464 ; IndentStr 458, 459, 460, 464 ; IndentTab 181, 201, 233, 247, 260, 322, 339, 348, 431, 436, ; 439, 441, 444, 446, 458 ; InStudio 43, 71, 73, 97, 118, 137, 143, 144, 153, 645, ; 867, 883 ; is 366, 367, 406 ; IsClipSelAll 76, 80, 216 ; IsDefined 46, 56, 60, 251, 252 ; IsInt 253, 254, 971 ; it 362, 363, 406, 842, 843, 844, 846, 847, 854 ; Item 844, 845, 846, 854 ; ItemCount 361, 364, 484, 502, 519, 549, 598, 611, 694, 836, ; 944 ; ItemExtract 90, 98, 174, 225, 239, 240, 241, 313, 324, 334, ; 363, 365, 367, 486, 504, 551, 599, 623, 628, 648, ; 649, 699, 800, 808, 844, 860, 861, 864, 946, 974, ; 975, 980, 981, 982 ; ItemInsert 518, 586, 828, 895, 896, 897, 898, 899, 900, 901, ; 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, ; 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, ; 922, 923, 924 ; ItemRemove 600 ; ItemReplace 69, 70, 83, 239, 324, 334, 625, 630, 846 ; Items 836, 837, 843, 854 ; ItemSort 590 ; ItemsPerDrop 619, 626, 638 ; LeftMargin 181, 201, 234, 247, 261, 323, 340, 457 ; LeftPos 581, 583, 592 ; Len 933, 934, 936, 937, 938, 940 ; Line 746, 758, 764, 771, 820, 826, 827, 828, 854 ; Line_old 817, 826, 827, 854 ; LineList 816, 828, 836, 839, 844, 846, 850, 854 ; Lines 180, 181, 190, 200, 201, 210, 289 ; lines 373, 390, 404 ; Lines 420 ; lines 422 ; LineStr 758, 760, 771 ; List 361, 363 ; List0 357, 406 ; List1 350, 351, 352, 353, 354, 355, 356, 406 ; LitCode 795, 796 ; LitCodeTag 785, 802 ; literal 793, 794, 838 ; LitItemCount 519, 520, 521, 529 ; LitList 341, 518, 519, 800, 808 ; LitNestedCode 804, 805, 809 ; LitNestedNr 807, 808 ; LitNestedPos 802, 803, 804 ; LitNr 798, 799, 800 ; LitStr 509, 510, 512, 515, 518, 523, 524, 525, 529, 800, ; 802, 804, 810, 839 ; LitStrFixLen 513, 514, 515, 529 ; LitStrLen 512, 514, 515, 529 ; LitTag 784, 785, 793, 799, 804, 809 ; max 182, 202, 431, 439, 446 ; MaxCount 968, 971, 972 ; mod 421, 753, 822 ; Name 790, 793, 795, 799, 814, 815, 833, 834, 854 ; Name_old 815, 834, 854 ; Next 47, 61, 374, 375, 376, 493, 527, 552, 702, 953 ; num 177, 178, 179, 180, 181, 186, 190, 197, 198, 199, ; 200, 201, 206, 210, 270, 272, 273, 274, 278, 279, ; 284, 285, 288, 289, 291, 299, 300, 306, 308, 347, ; 371, 372, 387, 388, 400, 401, 402, 406, 551, 554, ; 699, 700, 705, 711, 712, 715, 768, 771 ; OpItem 486, 487, 495, 504, 505, 510, 529, 946, 947 ; OpItemCount 484, 485, 495, 502, 503, 529, 549, 550, 554, 694, ; 697, 705, 944, 945 ; OpList 483, 484, 486, 495, 501, 502, 504, 529, 548, 549, ; 551, 554, 693, 694, 699, 705, 943, 944, 946 ; OutStr 313, 314, 316, 970, 972, 974, 975, 978, 980, 981, ; 982 ; OutStr1 243, 244, 245, 246, 248, 263 ; OutStr2 247, 248, 263 ; Param 46, 60 ; Param1 252, 254, 255, 261 ; Param2 251, 253, 256, 260 ; Params 248, 249, 250, 263 ; ParseData 57, 250 ; pause 90, 98 ; prozent 420, 421, 464, 752, 753, 821, 822 ; replace 370, 371, 406, 808, 810 ; ReportStr 787, 814, 850, 862, 863, 864, 865, 866, 868, 874, ; 878 ; Result 962, 965 ; Return 130, 132, 148, 169, 191, 211, 221, 229, 264, 292, ; 309, 317, 325, 343 ; return 348 ; Return 408, 465, 478, 496, 530, 543, 555, 593, 607, 616, ; 641, 662, 675, 688, 706, 716, 729, 772, 779, 855, ; 879, 889, 926 ; return 934, 937 ; Return 965, 985, 988 ; RightPos 573, 583, 592 ; rtStatus 43, 977 ; search 369, 371, 407, 809, 810 ; SearchStr 931, 933, 935, 936, 939 ; Select 87, 426 ; SelInfo 82, 648, 649 ; ShiftCommentToLeftMargin 235, 453 ; ShortenLiterals 331, 511 ; ShowLiterals 157, 330 ; starttag 379, 380, 393, 394, 407 ; StrCat 90, 244, 245, 246, 247, 278, 284, 288, 299, 313, ; 347, 351, 352, 353, 354, 355, 356, 368, 369, 370, ; 379, 393, 460, 461, 470, 474, 510, 515, 524, 539, ; 613, 624, 629, 632, 636, 637, 667, 671, 684, 721, ; 725, 785, 799, 809, 814, 839, 845, 850, 862, 863, ; 864, 865, 866, 972, 974, 975, 980, 981 ; StrFill 247, 457, 458, 459, 845, 863, 865 ; StrFix 799 ; StrFixLeft 520, 758 ; StrIndex 387 ; StrIndexWild 802 ; StringArr 69, 70, 83, 90, 98, 174, 225, 239, 240, 241, ; 268, 296, 313, 324, 334, 373, 390, 404, 422, 469, ; 482, 500, 534, 547, 559, 666, 679, 692, 720, 734, ; 754, 776, 783, 823, 859, 860, 861, 864, 894, 895, ; 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, ; 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, ; 916, 917, 918, 919, 920, 921, 922, 923, 924, 968, ; 974, 975, 980, 981, 982 ; StringNr 968, 974 ; StrLen 176, 196, 512, 743, 745, 804, 933, 936 ; StrLower 93, 386 ; StrReplace 636, 810, 866, 935 ; StrSub 515, 793, 795, 804 ; StrTrim 249, 584 ; structure 303, 304, 305, 308, 380, 382, 383, 384, 385, 394, ; 396, 397, 398, 399, 407, 413, 416, 417, 418, 461, ; 464, 470, 472, 473, 474, 477, 487, 489, 490, 491, ; 495, 505, 507, 508, 509, 525, 529, 535, 537, 538, ; 539, 542, 667, 669, 670, 671, 674, 680, 682, 683, ; 684, 687, 721, 723, 724, 725, 728, 947, 949, 950, ; 951, 956, 958, 959, 960 ; sub 367, 368, 369, 370, 407 ; sublist 363, 364, 365, 367, 407 ; subs 364, 366, 407 ; TheFileIn 174, 177, 179, 190, 240, 244, 263, 860, 862, 878 ; TheFileOut 861, 873, 878 ; TheLogo 241, 248 ; then 46, 60, 97, 118, 137, 143, 144, 153, 157, 216, ; 251, 252, 253, 254, 255, 256, 279, 285, 300, 305, ; 348, 368, 383, 387, 397, 400, 417, 453, 458, 473, ; 490, 508, 538, 565, 571, 578, 579, 585, 670, 683, ; 700, 712, 724, 751, 803, 832, 834, 934, 937, 950, ; 959, 972 ; TimeYmdHms 313, 864 ; to 44, 58, 360, 362, 366, 485, 503, 550, 697, 945 ; Token 365, 370, 407, 418, 426, 464 ; TokenOffset 384, 387, 398, 400, 401, 407 ; Tokens 361, 362, 407 ; UDF_Beauty_IsEmptyLine 400, 931 ; UDF_Beauty_Message 268, 296, 373, 390, 404, 422, 469, 482, 500, 534, ; 547, 559, 666, 679, 692, 720, 734, 754, 776, 783, ; 823, 859, 968 ; UseTabs 236, 458 ; wClearSel 647, 869 ; wEdCopy 75, 79 ; wEdPaste 217 ; wEnd 654 ; wEndOfFile 870 ; wGetFileName 83 ; wGetSelState 74, 646 ; wGotoLine 653, 657 ; While 242, 277, 283, 298, 381, 395, 415, 471, 488, 506, ; 536, 563, 568, 575, 598, 622, 668, 681, 698, 710, ; 722, 749, 792, 801, 819, 843, 948, 957 ; wHome 656 ; wordbegin 747, 750, 757, 759, 762, 763, 765, 771 ; wordend 750, 751, 757, 762, 771 ; wordlen 757, 759, 771 ; words 748, 752, 754, 756, 771, 786, 821, 823, 825 ; words_sum 735, 739, 752, 754, 821, 823 ; WorkMark 175, 176, 185, 187, 190, 195, 196, 205, 207, 210 ; WorkMarkSize 176, 181, 186, 190, 196, 201, 206, 210 ; wPaste 655, 871 ; wSelectAll 78, 216 ; wSelInfo 82 ; wStatusMsg 884, 978 ; ; 2001:04:11:16:42:17 BeautyTools For WinBatch 0.99a - Detlev Dalitz 20010401 ; ----------------------------------------------------------------------------------------------------
Article ID: W15018
File Created: 2001:11:08:12:41:22
Last Updated: 2001:11:08:12:41:22