about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--iconv/iconv_prog.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f88f316f5..92f6d41411 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,9 @@
 2001-02-03  Ulrich Drepper  <drepper@redhat.com>
 
-	* iconv/iconv_prog.c (main): If -f or -t argument is missing use
-	charset of the current locale.
+	* iconv/iconv_prog.c (main): If output file name is "-" write to
+	stdout.
+	(main): If -f or -t argument is missing use charset of the current
+	locale.
 
 2001-02-03  Andreas Jaeger  <aj@suse.de>
 
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index 3c7851f7a5..6b9930e50a 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -193,7 +193,7 @@ main (int argc, char *argv[])
     }
 
   /* Determine output file.  */
-  if (output_file != NULL)
+  if (output_file != NULL && strcmp (output_file, "-") != 0)
     {
       output = fopen (output_file, "w");
       if (output == NULL)