Bit of a strange one but I need to use the DecodeCgi in my Dos program and I'm having trouble converting the PBCC version.
------------------
Code:
FUNCTION DecodeCGI( BYVAL t AS STRING ) AS STRING DIM b_in AS BYTE PTR, b_out AS BYTE PTR, h AS STRING PTR * 2, a AS ASCIIZ PTR IF LEN( t ) THEN b_in = STRPTR( t ) b_out = b_in DO IF @b_in = 43 THEN @b_out = 32 ELSEIF @b_in = 37 THEN h = b_in + 1 @b_out = VAL( "&H" & @h ) b_in = b_in + 2 ELSE @b_out = @b_in END IF INCR b_in INCR b_out LOOP UNTIL @b_in = 0 @b_out = 0 a = STRPTR( t ) FUNCTION = @a END IF END FUNCTION
Comment