Doesn't run though (at least on x86_64 Linux), locks up immediately after being given a filename.
I've got it running with -Mobjfpc: changed a goto into an exception, renamed one variable and redid reset() to expect a space-terminated string as parameter and that's about it... and to my surprise I get the expected output.
MarkMLl