Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/bin/ksh Pull up revision 1.7 (requested by dogcow):
details: https://anonhg.NetBSD.org/src/rev/9bd4f1a73015
branches: netbsd-1-5
changeset: 492867:9bd4f1a73015
user: he <he%NetBSD.org@localhost>
date: Tue Feb 26 19:51:03 2002 +0000
description:
Pull up revision 1.7 (requested by dogcow):
Synchronize with current development version:
o fix problem with ``set -x'' causing a core dump; fixes PR#11361
o fix problem with ``set -e'' causing early exit; fixes PR#11542
o fix various misspellings and nested extern declarations
diffstat:
bin/ksh/var.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 569f25ed0d95 -r 9bd4f1a73015 bin/ksh/var.c
--- a/bin/ksh/var.c Tue Feb 26 19:50:59 2002 +0000
+++ b/bin/ksh/var.c Tue Feb 26 19:51:03 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.6 1999/10/20 15:10:00 hubertf Exp $ */
+/* $NetBSD: var.c,v 1.6.6.1 2002/02/26 19:51:03 he Exp $ */
#include "sh.h"
#include "ksh_time.h"
@@ -359,7 +359,9 @@
const char *s;
int error_ok;
{
- if (vq->flag & RDONLY) {
+ int no_ro_check = error_ok & 0x4;
+ error_ok &= ~0x4;
+ if ((vq->flag & RDONLY) && !no_ro_check) {
warningf(TRUE, "%s: is read only", vq->name);
if (!error_ok)
errorf(null);
@@ -721,13 +723,13 @@
if (val != NULL) {
if (vp->flag&INTEGER) {
/* do not zero base before assignment */
- setstr(vp, val, KSH_UNWIND_ERROR);
+ setstr(vp, val, KSH_UNWIND_ERROR | 0x4);
/* Done after assignment to override default */
if (base > 0)
vp->type = base;
} else
/* setstr can't fail (readonly check already done) */
- setstr(vp, val, KSH_RETURN_ERROR);
+ setstr(vp, val, KSH_RETURN_ERROR | 0x4);
}
/* only x[0] is ever exported, so use vpbase */
Home |
Main Index |
Thread Index |
Old Index