about summary refs log tree commit diff
path: root/iconv/iconv_prog.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-06 20:36:19 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-06 20:36:19 +0000
commitb87507117c2424239f69ca7e3c5e6c2a52328839 (patch)
treef7f34b0a60f694cbfb298db8ac3049ba483472c6 /iconv/iconv_prog.c
parentefedd9cf71dd21618635d5f52717a713505ad5d7 (diff)
downloadglibc-b87507117c2424239f69ca7e3c5e6c2a52328839.tar.gz
glibc-b87507117c2424239f69ca7e3c5e6c2a52328839.tar.xz
glibc-b87507117c2424239f69ca7e3c5e6c2a52328839.zip
(process_block): Don't print message about invliad input if the -c option is used.
Diffstat (limited to 'iconv/iconv_prog.c')
-rw-r--r--iconv/iconv_prog.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index 78b430d7d7..81edc96036 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -160,14 +160,16 @@ main (int argc, char *argv[])
 	  if (*errhand == '/')
 	    {
 	      --nslash;
-	      ++errhand;
+	      errhand = strchr (errhand, '\0');
 	    }
 	}
 
-      newp = (char *) alloca (errhand - to_code + nslash + 6 + 1);
+      newp = (char *) alloca (errhand - to_code + nslash + 7 + 1);
       cp = mempcpy (newp, to_code, errhand - to_code);
       while (nslash-- > 0)
 	*cp++ = '/';
+      if (cp[-1] != '/')
+	*cp++ = ',';
       memcpy (cp, "IGNORE", sizeof ("IGNORE"));
 
       to_code = newp;
@@ -496,8 +498,9 @@ conversion stopped due to problem in writing the output"));
 	  switch (errno)
 	    {
 	    case EILSEQ:
-	      error (0, 0, _("illegal input sequence at position %ld"),
-		     (long) (addr - start));
+	      if (! omit_invalid)
+		error (0, 0, _("illegal input sequence at position %ld"),
+		       (long int) (addr - start));
 	      break;
 	    case EINVAL:
 	      error (0, 0, _("\