summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mkdir.c17
-rw-r--r--src/split.c8
2 files changed, 19 insertions, 6 deletions
diff --git a/src/mkdir.c b/src/mkdir.c
index 070407718..378106501 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -1,5 +1,5 @@
/* mkdir -- make directories
- Copyright (C) 90, 1995-2002, 2004-2007 Free Software Foundation, Inc.
+ Copyright (C) 90, 1995-2002, 2004-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -79,6 +79,19 @@ Mandatory arguments to long options are mandatory for short options too.\n\
exit (status);
}
+/* Verbose formatted output of variable count of arguments. */
+static void
+verbose_output (FILE *fp, char const *fmt, ...)
+{
+ va_list ap;
+ fputs (program_name, fp);
+ fputs (": ", fp);
+ va_start (ap, fmt);
+ vfprintf (fp, fmt, ap);
+ va_end (ap);
+ fputc ('\n', fp);
+}
+
/* Options passed to subsidiary functions. */
struct mkdir_options
{
@@ -105,7 +118,7 @@ announce_mkdir (char const *dir, void *options)
{
struct mkdir_options const *o = options;
if (o->created_directory_format)
- error (0, 0, o->created_directory_format, quote (dir));
+ verbose_output (stdout, o->created_directory_format, quote (dir));
}
/* Make ancestor directory DIR, whose last component is COMPONENT,
diff --git a/src/split.c b/src/split.c
index 5807a1ccf..f84d40e41 100644
--- a/src/split.c
+++ b/src/split.c
@@ -1,5 +1,5 @@
/* split.c -- split a file into pieces.
- Copyright (C) 1988, 1991, 1995-2007 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1991, 1995-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -122,8 +122,8 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-l, --lines=NUMBER put NUMBER lines per output file\n\
"), DEFAULT_SUFFIX_LENGTH);
fputs (_("\
- --verbose print a diagnostic to standard error just\n\
- before each output file is opened\n\
+ --verbose print a diagnostic just before each\n\
+ output file is opened\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
@@ -208,7 +208,7 @@ cwrite (bool new_file_flag, const char *bp, size_t bytes)
next_file_name ();
if (verbose)
- fprintf (stderr, _("creating file %s\n"), quote (outfile));
+ fprintf (stdout, _("creating file %s\n"), quote (outfile));
output_desc = open (outfile,
O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP