This commit is contained in:
tg 2016-07-25 21:02:13 +00:00
parent 4310e75f75
commit 5edb355336
2 changed files with 8 additions and 2 deletions

6
var.c
View File

@ -28,7 +28,7 @@
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.205 2016/07/25 20:43:54 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/var.c,v 1.206 2016/07/25 21:02:13 tg Exp $");
/*- /*-
* Variables * Variables
@ -1290,9 +1290,11 @@ setspec(struct tbl *vp)
/* clear tracked aliases */ /* clear tracked aliases */
flushcom(true); flushcom(true);
return; return;
#ifndef MKSH_NO_CMDLINE_EDITING
case V_TERM: case V_TERM:
x_initterm(str_val(vp)); x_initterm(str_val(vp));
return; return;
#endif
case V_TMPDIR: case V_TMPDIR:
afree(tmpdir, APERM); afree(tmpdir, APERM);
tmpdir = NULL; tmpdir = NULL;
@ -1409,9 +1411,11 @@ unsetspec(struct tbl *vp)
/* clear tracked aliases */ /* clear tracked aliases */
flushcom(true); flushcom(true);
break; break;
#ifndef MKSH_NO_CMDLINE_EDITING
case V_TERM: case V_TERM:
x_initterm(null); x_initterm(null);
return; return;
#endif
case V_TMPDIR: case V_TMPDIR:
/* should not become unspecial */ /* should not become unspecial */
if (tmpdir) { if (tmpdir) {

View File

@ -19,7 +19,7 @@
*/ */
#if defined(VARSPEC_DEFNS) #if defined(VARSPEC_DEFNS)
__RCSID("$MirOS: src/bin/mksh/var_spec.h,v 1.8 2016/07/25 20:43:54 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/var_spec.h,v 1.9 2016/07/25 21:02:13 tg Exp $");
#define FN(name) /* nothing */ #define FN(name) /* nothing */
#elif defined(VARSPEC_ENUMS) #elif defined(VARSPEC_ENUMS)
#define FN(name) V_##name, #define FN(name) V_##name,
@ -53,7 +53,9 @@ FN(OPTIND)
FN(PATH) FN(PATH)
FN(RANDOM) FN(RANDOM)
FN(SECONDS) FN(SECONDS)
#ifndef MKSH_NO_CMDLINE_EDITING
FN(TERM) FN(TERM)
#endif
FN(TMOUT) FN(TMOUT)
FN(TMPDIR) FN(TMPDIR)