Use symbolic defines for token names.

Make code more readable.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Use TDS_INT instead of int.

TDS_INT is a more portable 32 bit integer than int.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>