-/* $OpenBSD: main.c,v 1.99 2023/02/08 17:22:10 kn Exp $ */
+/* $OpenBSD: main.c,v 1.100 2023/07/23 23:42:03 kn Exp $ */
/*
* startup, main loop, environments and error handling
"typeset", "-x", "SHELL", "PATH", "HOME", "PWD", "OLDPWD", NULL,
"typeset", "-ir", "PPID", NULL,
"typeset", "-i", "OPTIND=1", NULL,
+#ifndef SMALL
"eval", "typeset -i RANDOM MAILCHECK=\"${MAILCHECK-600}\" SECONDS=\"${SECONDS-0}\" TMOUT=\"${TMOUT-0}\"", NULL,
+#else
+ "eval", "typeset -i RANDOM SECONDS=\"${SECONDS-0}\" TMOUT=\"${TMOUT-0}\"", NULL,
+#endif /* SMALL */
"alias",
/* Standard ksh aliases */
"hash=alias -t", /* not "alias -t --": hash -r needs to work */
if (interactive) {
got_sigwinch = 1;
j_notify();
+#ifndef SMALL
mcheck();
+#endif /* SMALL */
set_prompt(PS1);
}
-/* $OpenBSD: var.c,v 1.72 2021/03/05 15:22:03 zhuk Exp $ */
+/* $OpenBSD: var.c,v 1.73 2023/07/23 23:42:03 kn Exp $ */
#include <sys/stat.h>
#include <sys/time.h>
{ "HISTSIZE", V_HISTSIZE },
{ "EDITOR", V_EDITOR },
{ "VISUAL", V_VISUAL },
+#ifndef SMALL
{ "MAIL", V_MAIL },
{ "MAILCHECK", V_MAILCHECK },
{ "MAILPATH", V_MAILPATH },
+#endif /* SMALL */
{ "RANDOM", V_RANDOM },
{ "SECONDS", V_SECONDS },
{ "TMOUT", V_TMOUT },
x_cols = l;
}
break;
+#ifndef SMALL
case V_MAIL:
mbset(str_val(vp));
break;
mcset(intval(vp));
vp->flag |= SPECIAL;
break;
+#endif /* SMALL */
case V_RANDOM:
vp->flag &= ~SPECIAL;
srand_deterministic((unsigned int)intval(vp));
afree(tmpdir, APERM);
tmpdir = NULL;
break;
+#ifndef SMALL
case V_MAIL:
mbset(NULL);
break;
case V_MAILPATH:
mpset(NULL);
break;
+#endif /* SMALL */
case V_HISTCONTROL:
sethistcontrol(NULL);
break;
case V_LINENO:
+#ifndef SMALL
case V_MAILCHECK: /* at&t ksh leaves previous value in place */
+#endif /* SMALL */
case V_RANDOM:
case V_SECONDS:
case V_TMOUT: /* at&t ksh leaves previous value in place */
-# $OpenBSD: Makefile,v 1.6 2023/02/08 17:22:10 kn Exp $
+# $OpenBSD: Makefile,v 1.7 2023/07/23 23:42:03 kn Exp $
PROG= ksh
SRCS= alloc.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c emacs.c eval.c \
- exec.c expr.c history.c io.c jobs.c lex.c mail.c main.c \
+ exec.c expr.c history.c io.c jobs.c lex.c main.c \
misc.c path.c shf.c syn.c table.c trap.c tree.c tty.c var.c \
vi.c