• check.t: add some FPOSIX regression tests (1 still fails)
• all: remove vi editing mode #if defined(MKSH_SMALL) || defined(MKSH_NOVI) saves 12608 byts on i386 • check.t: add $0 quoting
This commit is contained in:
22
main.c
22
main.c
@ -13,7 +13,7 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.77 2007/06/15 20:52:19 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.78 2007/06/15 21:55:19 tg Exp $");
|
||||
|
||||
extern char **environ;
|
||||
|
||||
@ -80,7 +80,7 @@ main(int argc, const char *argv[])
|
||||
size_t k;
|
||||
char *cp;
|
||||
#endif
|
||||
#if HAVE_SETLOCALE_CTYPE
|
||||
#if !defined(MKSH_SMALL) || HAVE_SETLOCALE_CTYPE
|
||||
const char *cc;
|
||||
#endif
|
||||
|
||||
@ -165,6 +165,22 @@ main(int argc, const char *argv[])
|
||||
/* setstr can't fail here */
|
||||
setstr(vp, def_path, KSH_RETURN_ERROR);
|
||||
|
||||
#ifndef MKSH_SMALL
|
||||
cc = kshname;
|
||||
if (*cc == '-')
|
||||
++cc;
|
||||
i = 0;
|
||||
while (cc[i] != '\0')
|
||||
if (cc[i] == '/') {
|
||||
cc += i + 1;
|
||||
i = 0;
|
||||
} else
|
||||
++i;
|
||||
if ((cc[0] == 's' || cc[0] == 'S') &&
|
||||
(cc[1] == 'h' || cc[1] == 'H'))
|
||||
Flag(FPOSIX) = 1;
|
||||
#endif
|
||||
|
||||
/* Turn on nohup by default for now - will change to off
|
||||
* by default once people are aware of its existence
|
||||
* (at&t ksh does not have a nohup option - it always sends
|
||||
@ -181,7 +197,9 @@ main(int argc, const char *argv[])
|
||||
* by the environment or the user. Also, we want tab completion
|
||||
* on in vi by default. */
|
||||
change_flag(FEMACS, OF_SPECIAL, 1);
|
||||
#ifndef MKSH_NOVI
|
||||
Flag(FVITABCOMPLETE) = 1;
|
||||
#endif
|
||||
|
||||
/* import environment */
|
||||
if (environ != NULL)
|
||||
|
Reference in New Issue
Block a user