use sane spelling of read-only consistently

This commit is contained in:
tg 2011-12-16 20:03:28 +00:00
parent 0b3d21702a
commit 7b89945505
4 changed files with 16 additions and 17 deletions

14
check.t
View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.503 2011/12/11 01:56:41 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.504 2011/12/16 20:03:23 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -28,7 +28,7 @@
# http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD
expected-stdout:
@(#)MIRBSD KSH R40 2011/12/10
@(#)MIRBSD KSH R40 2011/12/16
description:
Check version of shell.
stdin:
@ -4506,7 +4506,7 @@ stdin:
foo=stuff env | grep '^foo'
expected-exit: e != 0
expected-stderr-pattern:
/.*read *only.*/
/read-only/
---
name: regression-43
description:
@ -5014,7 +5014,7 @@ expected-stdout:
=
1 x .
expected-stderr-pattern:
/read *only/
/read-only/
---
name: readonly-1
description:
@ -5024,7 +5024,7 @@ stdin:
expected-stdout:
aborted, 2
expected-stderr-pattern:
/read *only/
/read-only/
---
name: readonly-2a
description:
@ -5043,7 +5043,7 @@ stdin:
expected-stdout:
2 .
expected-stderr-pattern:
/read *only/
/read-only/
---
name: readonly-3
description:
@ -5055,7 +5055,7 @@ expected-stdout:
0 x .
2 .
expected-stderr-pattern:
/read *only/
/read-only/
---
name: syntax-1
description:

View File

@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.204 2011/12/09 20:40:25 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.205 2011/12/16 20:03:26 tg Exp $");
#if HAVE_KILLPG
/*
@ -2021,7 +2021,7 @@ c_read(const char **wp)
vp = global(*wp);
if (vp->flag & RDONLY) {
c_read_splitro:
bi_errorf("%s: %s", *wp, "is read only");
bi_errorf("read-only: %s", *wp);
c_read_spliterr:
rv = 2;
afree(cp, ATEMP);
@ -2434,8 +2434,7 @@ c_unset(const char **wp)
afree(cp, ATEMP);
if ((vp->flag&RDONLY)) {
warningf(true, "%s: %s", vp->name,
"is read only");
warningf(true, "read-only: %s", vp->name);
rv = 1;
} else
unset(vp, optc);

4
sh.h
View File

@ -151,9 +151,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.511 2011/12/10 14:12:17 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.512 2011/12/16 20:03:27 tg Exp $");
#endif
#define MKSH_VERSION "R40 2011/12/10"
#define MKSH_VERSION "R40 2011/12/16"
/* arithmetics types */
typedef int32_t mksh_ari_t;

8
var.c
View File

@ -26,7 +26,7 @@
#include <sys/sysctl.h>
#endif
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.137 2011/12/10 13:34:19 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.138 2011/12/16 20:03:28 tg Exp $");
/*-
* Variables
@ -409,7 +409,7 @@ setstr(struct tbl *vq, const char *s, int error_ok)
error_ok &= ~0x4;
if ((vq->flag & RDONLY) && !no_ro_check) {
warningf(true, "%s: %s", vq->name, "is read only");
warningf(true, "read-only: %s", vq->name);
if (!error_ok)
errorfxz(2);
return (0);
@ -810,7 +810,7 @@ typeset(const char *var, uint32_t set, uint32_t clr, int field, int base)
if ((vpbase->flag&RDONLY) &&
(val || clr || (set & ~EXPORT)))
/* XXX check calls - is error here ok by POSIX? */
errorfx(2, "%s: %s", tvar, "is read only");
errorfx(2, "read-only: %s", tvar);
afree(tvar, ATEMP);
/* most calls are with set/clr == 0 */
@ -1401,7 +1401,7 @@ set_array(const char *var, bool reset, const char **vals)
/* Note: AT&T ksh allows set -A but not set +A of a read-only var */
if ((vp->flag&RDONLY))
errorfx(2, "%s: %s", ccp, "is read only");
errorfx(2, "read-only: %s", ccp);
/* This code is quite non-optimal */
if (reset) {
/* trash existing values and attributes */