Giving this one final shot. If this is not deemed acceptable, I will abandon the effort and just move on to other things, no hard feelings.
This is IMO a cleaner, more conservative/less invasive change. I have attempted to leave much of the existing code in place and mainly refactor and make smaller changes. As such, some issues are fixed/improved, but not everything.
What is fixed: . Bug #56381, "TYPE c:\windows\winhelp.exe >foo", i.e. binary mode operation. I would probably consider this the main reason for this change. I'm trying to get the compiler mentioned in the bug report working. However, "TYPE c:\windows\winhelp.exe" (no redirected output) is still broken (output truncated), exactly as before. . Ctrl-Z termination of TYPE output to the console. . "TYPE con >foo", with Ctrl-Z handling, functionally equivalent to "COPY con foo".
All other behavior should remain the same/unchanged.