Report input errors instead of ignoring them.
This commit is contained in:
parent
01a8e5a9ae
commit
9409835314
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131855
@ -138,6 +138,8 @@ main(int argc, char **argv)
|
||||
lastch = ch;
|
||||
(void)putwchar(ch);
|
||||
}
|
||||
if (ferror(stdin))
|
||||
err(1, NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -154,6 +156,8 @@ main(int argc, char **argv)
|
||||
while ((ch = getwchar()) != WEOF)
|
||||
if (!cset_in(delete, ch))
|
||||
(void)putwchar(ch);
|
||||
if (ferror(stdin))
|
||||
err(1, NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -169,6 +173,8 @@ main(int argc, char **argv)
|
||||
lastch = ch;
|
||||
(void)putwchar(ch);
|
||||
}
|
||||
if (ferror(stdin))
|
||||
err(1, NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -324,6 +330,8 @@ main(int argc, char **argv)
|
||||
ch = cmap_lookup(map, ch);
|
||||
(void)putwchar(ch);
|
||||
}
|
||||
if (ferror(stdin))
|
||||
err(1, NULL);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user