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.

Steven Schubiger


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to