Hello.
I have a cross-platform console application which emits ANSI control sequences to stdout. This works great in Linux with its native support for ANSI. However, I am trying to find a suitable workaround for Windows/TCC21 that will allow me to redirect its output through the X3.64 interpreter. TYPE seems to be my best option per the following text from the help:
TCC interprets only its own output, not the output of external commands. In some cases you can redirect the output of an application program to a temporary file, then send it through TCC ANSI X3.64 interpreter, e.g., by using the TYPE command. This will display ANSI X3.64 correctly, but will not work with an interactive application.
Indeed, myapp.exe | type "kind of" works. However, the application's output is seemingly not piped through type until after myapp.exe exits (almost like an in-process pipe). I have also tried myapp.exe | for %x in (@CON:) echo %x which behaves similarly (no output until the application exits). I've also tried piping the output through TAIL to no avail.
Is there any way to redirect the output of my application through TCC's ANSI X3.64 interpreter and observe the output as it is generated by the app? I've seen references in this forum to people injecting TCC's ANSI32.dll into processes but this seems both brutish and unsavory.
Thanks,
J
I have a cross-platform console application which emits ANSI control sequences to stdout. This works great in Linux with its native support for ANSI. However, I am trying to find a suitable workaround for Windows/TCC21 that will allow me to redirect its output through the X3.64 interpreter. TYPE seems to be my best option per the following text from the help:
TCC interprets only its own output, not the output of external commands. In some cases you can redirect the output of an application program to a temporary file, then send it through TCC ANSI X3.64 interpreter, e.g., by using the TYPE command. This will display ANSI X3.64 correctly, but will not work with an interactive application.
Indeed, myapp.exe | type "kind of" works. However, the application's output is seemingly not piped through type until after myapp.exe exits (almost like an in-process pipe). I have also tried myapp.exe | for %x in (@CON:) echo %x which behaves similarly (no output until the application exits). I've also tried piping the output through TAIL to no avail.
Is there any way to redirect the output of my application through TCC's ANSI X3.64 interpreter and observe the output as it is generated by the app? I've seen references in this forum to people injecting TCC's ANSI32.dll into processes but this seems both brutish and unsavory.
Thanks,
J