Code:
'-- RC4UTIL.INC -- #IF NOT %DEF(%WINAPI) %USEMACROS = 1 #INCLUDE "WIN32API.INC" #ENDIF DECLARE FUNCTION Hex2Show$(Buffer$) #IF %def(%pb_win32) MACRO wait END MACRO MACRO eol=$CR MACRO say(t) MessageBox 0&, BYCOPY (t), " ", %MB_OK OR %MB_TASKMODAL END MACRO #ELSEIF %def(%pb_cc32) MACRO wait=waitkey$ MACRO eol=$CRLF MACRO say(t)=stdout t #ENDIF '-------------------- MACRO EnterCC #IF %def(%pb_cc32) LOCAL launched& if (cursory = 1) and (cursorx = 1) then launched = -1 #ENDIF END MACRO '-------------------- MACRO ExitCC #IF %def(%pb_cc32) if launched& then input flush stdout "Press any key to end" waitkey$ end if #ENDIF END MACRO '==================== FUNCTION Hex2Show$(Buffer$) LOCAL t$, i&, b AS BYTE PTR b = strptr(Buffer$) for i = 0 to len(Buffer$)-1 t = t + hex$(@b[i],2) + " " next i function = t END FUNCTION '-- end RC4UTIL.BAS
Leave a comment: