eliminate it from sh.
-/* $OpenBSD: exec.c,v 1.6 1997/01/02 09:33:56 downsj Exp $ */
+/* $OpenBSD: exec.c,v 1.7 1997/01/02 17:37:25 downsj Exp $ */
/*
* execute command tree
int type_flags;
int keepasn_ok;
int fcflags = FC_BI|FC_FUNC|FC_PATH;
- volatile int underscore = (!Flag(FSH) || Flag(FTALKING));
/* snag the last argument for $_ XXX not the same as at&t ksh,
* which only seems to set $_ after a newline (but not in
* functions/dot scripts, but in interactive and scipt) -
* perhaps save last arg here and set it in shell()?.
*/
- if (underscore && *(lastp = ap)) {
+ if (!Flag(FSH) && *(lastp = ap)) {
while (*++lastp)
;
setstr(typeset("_", LOCAL, 0, 0, 0), *--lastp);
break;
}
- if (underscore) {
+ if (!Flag(FSH)) {
/* set $_ to program's full path */
setstr(typeset("_", LOCAL|EXPORT, 0, 0, 0), tp->val.s);
}
-/* $OpenBSD: history.c,v 1.3 1997/01/02 09:34:00 downsj Exp $ */
+/* $OpenBSD: history.c,v 1.4 1997/01/02 17:37:26 downsj Exp $ */
/*
* command history
return 1;
}
- if (!Flag(FSH) || Flag(FTALKING))
+ if (!Flag(FSH))
setstr(local("_", FALSE), tf->name);
/* XXX: source should not get trashed by this.. */
-/* $OpenBSD: mail.c,v 1.2 1996/08/19 20:08:55 downsj Exp $ */
+/* $OpenBSD: mail.c,v 1.3 1997/01/02 17:37:27 downsj Exp $ */
/*
* Mailbox checking code by Robert J. Gibson, adapted for PD ksh by
{
struct tbl *vp;
- setstr((vp = local("_", FALSE)), mbp->mb_path);
+ if (!Flag(FSH))
+ setstr((vp = local("_", FALSE)), mbp->mb_path);
shellf("%s\n", substitute(mbp->mb_msg ? mbp->mb_msg : MBMESSAGE, 0));
-/* $OpenBSD: exec.c,v 1.6 1997/01/02 09:33:56 downsj Exp $ */
+/* $OpenBSD: exec.c,v 1.7 1997/01/02 17:37:25 downsj Exp $ */
/*
* execute command tree
int type_flags;
int keepasn_ok;
int fcflags = FC_BI|FC_FUNC|FC_PATH;
- volatile int underscore = (!Flag(FSH) || Flag(FTALKING));
/* snag the last argument for $_ XXX not the same as at&t ksh,
* which only seems to set $_ after a newline (but not in
* functions/dot scripts, but in interactive and scipt) -
* perhaps save last arg here and set it in shell()?.
*/
- if (underscore && *(lastp = ap)) {
+ if (!Flag(FSH) && *(lastp = ap)) {
while (*++lastp)
;
setstr(typeset("_", LOCAL, 0, 0, 0), *--lastp);
break;
}
- if (underscore) {
+ if (!Flag(FSH)) {
/* set $_ to program's full path */
setstr(typeset("_", LOCAL|EXPORT, 0, 0, 0), tp->val.s);
}
-/* $OpenBSD: history.c,v 1.3 1997/01/02 09:34:00 downsj Exp $ */
+/* $OpenBSD: history.c,v 1.4 1997/01/02 17:37:26 downsj Exp $ */
/*
* command history
return 1;
}
- if (!Flag(FSH) || Flag(FTALKING))
+ if (!Flag(FSH))
setstr(local("_", FALSE), tf->name);
/* XXX: source should not get trashed by this.. */
-/* $OpenBSD: mail.c,v 1.2 1996/08/19 20:08:55 downsj Exp $ */
+/* $OpenBSD: mail.c,v 1.3 1997/01/02 17:37:27 downsj Exp $ */
/*
* Mailbox checking code by Robert J. Gibson, adapted for PD ksh by
{
struct tbl *vp;
- setstr((vp = local("_", FALSE)), mbp->mb_path);
+ if (!Flag(FSH))
+ setstr((vp = local("_", FALSE)), mbp->mb_path);
shellf("%s\n", substitute(mbp->mb_msg ? mbp->mb_msg : MBMESSAGE, 0));