Guys:

    Here is a patch from John Sumsion on the cygwin list, for your perusal:

cheers,
-Matt Smith


> Here is a patch that ensures that tr console output is NOT buffered.  I 
> only use cygwin, so I have no idea if this builds right on linux or any 
> other platform.
> 
> diff -u -r textutils-2.0.21/src/tr.c textutils-2.0.21.jgs/src/tr.c
> --- textutils-2.0.21/src/tr.c 2002-02-11 01:34:16.000000000 -0700
> +++ textutils-2.0.21.jgs/src/tr.c 2002-06-25 15:41:28.000000000 -0600
> @@ -1894,6 +1894,9 @@
>        by text-mode reads (like CR and ^Z).  */
>     SET_BINARY2 (STDIN_FILENO, STDOUT_FILENO);
> 
> +  /* Do not buffer console output. */
> +  if (isatty((int) stdout)) SETVBUF (stdout, NULL, _IONBF, 0);
> +
>     if (squeeze_repeats && non_option_args == 1)
>       {
>         set_initialize (s1, complement, in_squeeze_set);
> 




_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to