I was testing a program I wrote in FPC which directs the cursors (using
crt), by redirecting the output to a file, but was surprised that the
escape sequences weren't in the file.
Checking the source of the crt units, I found that when redirecting, the
sequences are switched off.
Is there motive for this behaviour? I just tested the same program
under TP7, and, when using crt, redirection isn't possible at all - which
is quite logical. Under linux, non-pascal programs do not distinguish
between being redirected or not (also logical).
I couldn't find a simple way to disable this (short of modifying the
crt.pp source code and recompiling)... I need the output of the program to
have the escape sequences, as I'd like to use them to feed a terminal