#include <locale.h>
#endif
-__RCSID("$MirOS: src/bin/mksh/main.c,v 1.332 2017/04/12 16:01:45 tg Exp $");
+__RCSID("$MirOS: src/bin/mksh/main.c,v 1.342 2017/04/28 11:13:47 tg Exp $");
extern char **environ;
ssize_t k;
#endif
+#if defined(MKSH_EBCDIC) || defined(MKSH_FAUX_EBCDIC)
+ ebcdic_init();
+#endif
+ set_ifs(TC_IFSWS);
+
#ifdef __OS2__
for (i = 0; i < 3; ++i)
if (!isatty(i))
initvar();
- initctypes();
-
inittraps();
coproc_init();
/* override default PATH regardless of environment */
#ifdef MKSH_DEFPATH_OVERRIDE
- vp = global(TPATH);
- setstr(vp, MKSH_DEFPATH_OVERRIDE, KSH_RETURN_ERROR);
+ vp = global(TPATH);
+ setstr(vp, MKSH_DEFPATH_OVERRIDE, KSH_RETURN_ERROR);
#endif
/* for security */
- typeset("IFS= \t\n", 0, 0, 0, 0);
+ typeset(TinitIFS, 0, 0, 0, 0);
/* assign default shell variable values */
typeset("PATHSEP=" MKSH_PATHSEPS, 0, 0, 0, 0);
if (!(s->start = s->str = argv[argi++]))
errorf(Tf_optfoo, "", "", 'c', Treq_arg);
while (*s->str) {
- if (*s->str != ' ' && ctype(*s->str, C_QUOTE))
+ if (ctype(*s->str, C_QUOTE))
break;
s->str++;
}
goto illegal_fd_name;
if (name[0] == 'p')
return (coproc_getfd(mode, emsgp));
- if (!ksh_isdigit(name[0])) {
+ if (!ctype(name[0], C_DIGIT)) {
illegal_fd_name:
if (emsgp)
*emsgp = "illegal file descriptor name";
const struct tbl *a = *((const struct tbl * const *)p1);
const struct tbl *b = *((const struct tbl * const *)p2);
- return (strcmp(a->name, b->name));
+ return (ascstrcmp(a->name, b->name));
}
struct tbl **