Steven Schubiger <[EMAIL PROTECTED]> wrote: > After skimming through a bit of code from shred, I was eager > to see how easy it would be to change the corresponding calls > of error() that are relevant to verbosity output to call some > "equivalent" function, which outputs to stdout, i.e. > > static void > output (const char const *fmt, ...) > { > va_list ap; > va_start (ap, fmt); > fprintf (stdout, "%s: ", program_name); > vfprintf (stdout, fmt, ap); > fprintf (stdout, "\n"); > va_end (ap); > } > > This is a bit more terse than it ought to be, but it illustrates > that it can be easily implemented for shred itself required that > 3 non-fatal calls to error() are to be replaced with calls to output(). > > It is also questionable whether the code should reside in some library and > thus may also be used by mkdir and split or whether each program has its > own piece of customized code.
shred uses stdout when FILE is "-", so its verbose output must continue to go to stderr. For mkdir.c and split.c, the above might work, assuming you add a call to fflush (stdout). Thanks for looking at this. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils