Ok, no problem. If your code is already FPC compilable I would choose that rather than converting the code I pointed to, unless that proves to be of higher quality.
(It is nicely written code, but all text is in Russian.)
[edit]
It works on lazarus, there is even a lazarus package file included. Nice.
So TS has options