since so many internal things hardcode 'C' locale anyway,

use own is{digit,lower,upper} macros that go via byte ranges

doesn't affect utf-8 hack because these only operate on single bytes anyway
saves 224t
This commit is contained in:
tg
2006-11-10 06:53:27 +00:00
parent b323a22b59
commit 35b30679c7
7 changed files with 37 additions and 46 deletions

4
main.c
View File

@ -13,7 +13,7 @@
#include <locale.h>
#endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.58 2006/11/10 06:31:47 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.59 2006/11/10 06:53:26 tg Exp $");
extern char **environ;
@ -954,7 +954,7 @@ check_fd(char *name, int mode, const char **emsgp)
{
int fd, fl;
if (isdigit((unsigned char)name[0]) && !name[1]) {
if (ksh_isdigit(name[0]) && !name[1]) {
fd = name[0] - '0';
if ((fl = fcntl(fd = name[0] - '0', F_GETFL, 0)) < 0) {
if (emsgp)