• more comment and int→bool cleanup, add and improve some comments

• in interactive mode, always look up {LC_{ALL,CTYPE},LANG} environment
  variables if setlocale/nl_langinfo(CODESET) doesn’t suffice
• add the ability to call any builtin (some don't make sense or wouldn't
  work) directly by analysing argv[0]
• for direct builtin calls, the {LC_{ALL,CTYPE},LANG} environment
  variables determine utf8-mode, even if MKSH_ASSUME_UTF8 was set
• when called as builtin, echo behaves POSIXish
• add domainname as alias for true on MirBSD only, to be able to link it
• sync mksh Makefiles with Build.sh output
• adjust manpage wrt release plans
• link some things to mksh now that we have callable builtins:
  bin/echo bin/kill bin/pwd bin/sleep (exact matches)
  bin/test bin/[ (were scripts before)
  bin/domainname=usr/bin/true usr/bin/false (move to /bin/ now)
• drop linked utilities and, except for echo and kill, their manpages
• adjust instbin and link a few more there as well
This commit is contained in:
tg
2011-02-11 01:18:23 +00:00
parent 81b80af47a
commit a796512040
10 changed files with 425 additions and 232 deletions

8
var.c
View File

@ -26,7 +26,7 @@
#include <sys/sysctl.h>
#endif
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.115 2011/01/21 21:04:48 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.116 2011/02/11 01:18:23 tg Exp $");
/*
* Variables
@ -1084,7 +1084,8 @@ setspec(struct tbl *vp)
afree(path, APERM);
s = str_val(vp);
strdupx(path, s, APERM);
flushcom(1); /* clear tracked aliases */
/* clear tracked aliases */
flushcom(true);
return;
case V_IFS:
setctypes(s = str_val(vp), C_IFS);
@ -1182,7 +1183,8 @@ unsetspec(struct tbl *vp)
if (path)
afree(path, APERM);
strdupx(path, def_path, APERM);
flushcom(1); /* clear tracked aliases */
/* clear tracked aliases */
flushcom(true);
break;
case V_IFS:
setctypes(" \t\n", C_IFS);