Displaying 6 results from an estimated 6 matches for "exp_case".
2019 Jan 25
0
[klibc:update-dash] parser: Add syntax stack for recursive parsing
...deletions(-)
diff --git a/usr/dash/expand.c b/usr/dash/expand.c
index e86bd29d..2c29ea44 100644
--- a/usr/dash/expand.c
+++ b/usr/dash/expand.c
@@ -85,7 +85,7 @@
#define RMESCAPE_HEAP 0x10 /* Malloc strings instead of stalloc */
/* Add CTLESC when necessary. */
-#define QUOTES_ESC (EXP_FULL | EXP_CASE | EXP_QPAT)
+#define QUOTES_ESC (EXP_FULL | EXP_CASE)
/* Do not skip NUL characters. */
#define QUOTES_KEEPNUL EXP_TILDE
@@ -335,16 +335,6 @@ addquote:
case CTLESC:
startloc++;
length++;
-
- /*
- * Quoted parameter expansion pattern: remove quote
- * unless inside inner quote...
2020 Mar 28
0
[klibc:update-dash] dash: parser: Add syntax stack for recursive parsing
...deletions(-)
diff --git a/usr/dash/expand.c b/usr/dash/expand.c
index e86bd29d..2c29ea44 100644
--- a/usr/dash/expand.c
+++ b/usr/dash/expand.c
@@ -85,7 +85,7 @@
#define RMESCAPE_HEAP 0x10 /* Malloc strings instead of stalloc */
/* Add CTLESC when necessary. */
-#define QUOTES_ESC (EXP_FULL | EXP_CASE | EXP_QPAT)
+#define QUOTES_ESC (EXP_FULL | EXP_CASE)
/* Do not skip NUL characters. */
#define QUOTES_KEEPNUL EXP_TILDE
@@ -335,16 +335,6 @@ addquote:
case CTLESC:
startloc++;
length++;
-
- /*
- * Quoted parameter expansion pattern: remove quote
- * unless inside inner quote...
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Propagate EXP_QPAT in subevalvar
.../expand.c
@@ -650,7 +650,8 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varfla
char *(*scan)(char *, char *, char *, char *, int , int);
argstr(p, EXP_TILDE | (subtype != VSASSIGN && subtype != VSQUESTION ?
- (flag & EXP_QUOTED ? EXP_QPAT : EXP_CASE) : 0));
+ (flag & (EXP_QUOTED | EXP_QPAT) ?
+ EXP_QPAT : EXP_CASE) : 0));
STPUTC('\0', expdest);
argbackq = saveargbackq;
startp = stackblock() + startloc;
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Propagate EXP_QPAT in subevalvar
.../expand.c
@@ -650,7 +650,8 @@ subevalvar(char *p, char *str, int strloc, int subtype, int startloc, int varfla
char *(*scan)(char *, char *, char *, char *, int , int);
argstr(p, EXP_TILDE | (subtype != VSASSIGN && subtype != VSQUESTION ?
- (flag & EXP_QUOTED ? EXP_QPAT : EXP_CASE) : 0));
+ (flag & (EXP_QUOTED | EXP_QPAT) ?
+ EXP_QPAT : EXP_CASE) : 0));
STPUTC('\0', expdest);
argbackq = saveargbackq;
startp = stackblock() + startloc;
2020 Mar 28
0
[klibc:update-dash] dash: expand: Do not reprocess data when expanding words
...OTES_ESC;
char *startp;
char *loc;
- struct nodelist *saveargbackq = argbackq;
- int amount;
+ long amount;
char *rmesc, *rmescend;
int zero;
char *(*scan)(char *, char *, char *, char *, int , int);
+ char *p;
+
+ p = argstr(start, (flag & EXP_DISCARD) | EXP_TILDE |
+ (str ? 0 : EXP_CASE));
+ if (flag & EXP_DISCARD)
+ return p;
- argstr(p, EXP_TILDE | (subtype != VSASSIGN && subtype != VSQUESTION ?
- EXP_CASE : 0));
- STPUTC('\0', expdest);
- argbackq = saveargbackq;
startp = stackblock() + startloc;
switch (subtype) {
case VSASSIGN:
setva...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Merge syntax/quotes in memtodest with flags
...---
usr/dash/expand.h | 1 +
2 files changed, 18 insertions(+), 25 deletions(-)
diff --git a/usr/dash/expand.c b/usr/dash/expand.c
index f1f5a9fa..a764881e 100644
--- a/usr/dash/expand.c
+++ b/usr/dash/expand.c
@@ -86,8 +86,6 @@
/* Add CTLESC when necessary. */
#define QUOTES_ESC (EXP_FULL | EXP_CASE)
-/* Do not skip NUL characters. */
-#define QUOTES_KEEPNUL EXP_TILDE
/*
* Structure specifying which parts of the string should be searched
@@ -117,8 +115,8 @@ STATIC char *exptilde(char *, char *, int);
STATIC void expbackq(union node *, int);
STATIC const char *subevalvar(char *, char *,...