quite a big change, but now the variables expanded are not

scanned for slashes, plus the ADELIM code gets more use and
a bugfix ☺
This commit is contained in:
tg
2008-03-01 21:10:26 +00:00
parent 16dd1d3c8f
commit 4912b5cf67
6 changed files with 233 additions and 173 deletions

9
sh.h
View File

@@ -8,7 +8,7 @@
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.191 2008/03/01 02:21:38 tg Rel $"
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.192 2008/03/01 21:10:26 tg Exp $"
#define MKSH_VERSION "R33 2008/03/01"
#if HAVE_SYS_PARAM_H
@@ -538,13 +538,12 @@ EXTERN int really_exit;
#define C_SUBOP1 BIT(5) /* "=-+?" */
#define C_QUOTE BIT(6) /* \n\t"#$&'()*;<>?[]\`| (needing quoting) */
#define C_IFS BIT(7) /* $IFS */
#define C_SUBOP2 BIT(8) /* "#%/" (magic, see below) */
#define C_SUBOP2 BIT(8) /* "#%" (magic, see below) */
extern unsigned char chtypes[];
#define ctype(c, t) !!( ((t) == C_SUBOP2) ? \
(((c) == '#' || (c) == '%' || \
(c) == '/') ? 1 : 0) : \
(((c) == '#' || (c) == '%') ? 1 : 0) : \
(chtypes[(unsigned char)(c)]&(t)) )
#define ksh_isalphx(c) ctype((c), C_ALPHA)
#define ksh_isalnux(c) ctype((c), C_ALPHA | C_DIGIT)
@@ -1451,7 +1450,7 @@ char *snptreef(char *, int, const char *, ...);
struct op *tcopy(struct op *, Area *);
char *wdcopy(const char *, Area *);
const char *wdscan(const char *, int);
char *wdstrip(const char *);
char *wdstrip(const char *, bool, bool);
void tfree(struct op *, Area *);
/* var.c */
void newblock(void);