Make conv=[lu]case works with localized ctype (8bit)
This commit is contained in:
parent
3a99ffc355
commit
dde07463cf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5701
14
bin/dd/dd.c
14
bin/dd/dd.c
@ -34,7 +34,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: dd.c,v 1.2 1994/09/24 02:54:52 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -195,8 +195,18 @@ setup()
|
||||
if (islower(cnt))
|
||||
ctab[cnt] = ctab[toupper(cnt)];
|
||||
}
|
||||
else
|
||||
else {
|
||||
ctab = ddflags & C_LCASE ? u2l : l2u;
|
||||
if (ddflags & C_LCASE) {
|
||||
for (cnt = 0; cnt < 0377; ++cnt)
|
||||
if (isupper(cnt))
|
||||
ctab[cnt] = tolower(cnt);
|
||||
} else {
|
||||
for (cnt = 0; cnt < 0377; ++cnt)
|
||||
if (islower(cnt))
|
||||
ctab[cnt] = toupper(cnt);
|
||||
}
|
||||
}
|
||||
(void)time(&st.start); /* Statistics timestamp. */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user