Replace tabs in input and variable vs symbolic parameter
The code is not ready for review, because it does not solve the exercise. It blindly replaces each tab with TABLENGTH spaces. This is not detabbing; the amount of blanks must give you a next tab stop. For example, for

a\tb
aa\tb
aaa\tb


the output should be

a       b
aa      b
aaa     b


(number of blanks is 7, 6, and 5 respectively, to align b at the tab stop, the 8th column). Your code produces

a        b
aa        b
aaa        b


instead.