I have often been in need of a "Viewport" command which could limit all text output in the Shell (TC or TCC) to a certain area.
For instance, I would print a menu at the top of the console window and let all output of commands be displayed in the lower lines of the console window only.
Can this be done with TCC/TC? I remember having a shell many years ago, when using MS-DOS, called viewport. It would do the trick.
viewport 0 0 79 10 -- this would allow any shell command to output text only between (0,0) and (79,10), just like having a window being 80 chars wide and 10 lines tall.
Often I could resolve it by redirecting the output to a file, but not all programs allows output to be redirected and sometimes it can be useful to show the user that a program is working by displaying the output, but limiting it to a certain area.
For instance, I would print a menu at the top of the console window and let all output of commands be displayed in the lower lines of the console window only.
Can this be done with TCC/TC? I remember having a shell many years ago, when using MS-DOS, called viewport. It would do the trick.
viewport 0 0 79 10 -- this would allow any shell command to output text only between (0,0) and (79,10), just like having a window being 80 chars wide and 10 lines tall.
Often I could resolve it by redirecting the output to a file, but not all programs allows output to be redirected and sometimes it can be useful to show the user that a program is working by displaying the output, but limiting it to a certain area.