use sane spelling of read-only consistently
This commit is contained in:
8
var.c
8
var.c
@@ -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 */
|
||||
|
Reference in New Issue
Block a user