Hi!
In "cooked" mode I may stop redirection (for example, in "copy con") by
^Z. How to stop redirection in raw mode (may be set through INT 21/4401)?
Also, fix for comments in the chario.c::write_char_stdout():
______________O\_/_________________________________\_/O______________
unsigned flags = get_sft(STDOUT)->sft_flags & (SFT_FDEVICE | SFT_FBINARY);
- /* ah=2, ah=9 should expand tabs even for raw devices and disk files */
+ /* MS-DOS INT 21/2,9 expand tabs even for raw devices and disk files. */
if (flags != SFT_FDEVICE)
{
+ /* SFT_FDEVICE=1 & SFT_BINARY=0 (cooked devices) are handled in
+ write_char()->DosRWSft()->cooked_write()->cooked_write_char(); */
[...]
- /* for raw devices already updated in dosfns.c */
+ /* update screen position for files */
+ /* SFT_FDEVICE=1 & SFT_BINARY=1 (raw devices) are handled in
+ write_char()->DosRWSft(); */
if (!(flags & SFT_FDEVICE))
update_scr_pos(c, count);
}
_____________________________________________________________________
O/~\ /~\O
BTW, different devices will point to different screens (for example, COMn
[may] point to modem or remote terminal). In this case all tabs expansion
will be disturbed if output (until CR) will comes to both devices. Also,
expansion will be disturbed if will be mixed output to devices and files.
For example, testprog.c:
...
printf ("\tIn: ");
if (!isatty (fileno (stdout)))
fprintf (stderr, "\tIn: ");
and run "testprog>file".
PS: Fix for fix in my previous letter:
if (rc > 0 && ((char FAR*)bp) [(size_t)rc - 1] == CTL_Z)
>---^^^^^^-----------^^^-------^^^^^^^^
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel