(process_block): Don't print message about invliad input if the -c option is used.

This commit is contained in:
Ulrich Drepper 2003-04-06 20:36:19 +00:00
parent efedd9cf71
commit b87507117c
2 changed files with 543 additions and 539 deletions

View File

@ -160,14 +160,16 @@ main (int argc, char *argv[])
if (*errhand == '/') if (*errhand == '/')
{ {
--nslash; --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); cp = mempcpy (newp, to_code, errhand - to_code);
while (nslash-- > 0) while (nslash-- > 0)
*cp++ = '/'; *cp++ = '/';
if (cp[-1] != '/')
*cp++ = ',';
memcpy (cp, "IGNORE", sizeof ("IGNORE")); memcpy (cp, "IGNORE", sizeof ("IGNORE"));
to_code = newp; to_code = newp;
@ -496,8 +498,9 @@ conversion stopped due to problem in writing the output"));
switch (errno) switch (errno)
{ {
case EILSEQ: case EILSEQ:
if (! omit_invalid)
error (0, 0, _("illegal input sequence at position %ld"), error (0, 0, _("illegal input sequence at position %ld"),
(long) (addr - start)); (long int) (addr - start));
break; break;
case EINVAL: case EINVAL:
error (0, 0, _("\ error (0, 0, _("\

File diff suppressed because it is too large Load Diff