Displaying 4 results from an estimated 4 matches for "isdefifs".
Did you mean:
defifs
2019 Jan 25
0
[klibc:update-dash] builtin: Fix handling of trailing IFS white spaces
...char *q;
+ char *r = NULL;
const char *ifs, *realifs;
int ifsspc;
int nulonly;
@@ -1042,16 +1046,76 @@ ifsbreakup(char *string, struct arglist *arglist)
ifs = nulonly ? nullstr : realifs;
ifsspc = 0;
while (p < string + ifsp->endoff) {
+ int c;
+ bool isifs;
+ bool isdefifs;
+
q = p;
- if (*p == (char)CTLESC)
- p++;
- if (strchr(ifs, *p)) {
+ c = *p++;
+ if (c == (char)CTLESC)
+ c = *p++;
+
+ isifs = strchr(ifs, c);
+ isdefifs = false;
+ if (isifs)
+ isdefifs = strchr(defifs, c);
+
+ /* If only reading one more argument:
+...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Fix handling of trailing IFS white spaces
...char *q;
+ char *r = NULL;
const char *ifs, *realifs;
int ifsspc;
int nulonly;
@@ -1042,16 +1046,76 @@ ifsbreakup(char *string, struct arglist *arglist)
ifs = nulonly ? nullstr : realifs;
ifsspc = 0;
while (p < string + ifsp->endoff) {
+ int c;
+ bool isifs;
+ bool isdefifs;
+
q = p;
- if (*p == (char)CTLESC)
- p++;
- if (strchr(ifs, *p)) {
+ c = *p++;
+ if (c == (char)CTLESC)
+ c = *p++;
+
+ isifs = strchr(ifs, c);
+ isdefifs = false;
+ if (isifs)
+ isdefifs = strchr(defifs, c);
+
+ /* If only reading one more argument:
+...
2019 Jan 25
0
[klibc:update-dash] expand: Fix bugs with words connected to the right of $@
...egoff;
+ afternul = nulonly;
nulonly = ifsp->nulonly;
ifs = nulonly ? nullstr : realifs;
ifsspc = 0;
@@ -1097,7 +1100,7 @@ ifsbreakup(char *string, int maxargs, struct arglist *arglist)
}
if (isifs) {
- if (!nulonly)
+ if (!(afternul || nulonly))
ifsspc = isdefifs;
/* Ignore IFS whitespace at start */
if (q == start && ifsspc) {
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fix bugs with words connected to the right of $@
...egoff;
+ afternul = nulonly;
nulonly = ifsp->nulonly;
ifs = nulonly ? nullstr : realifs;
ifsspc = 0;
@@ -1097,7 +1100,7 @@ ifsbreakup(char *string, int maxargs, struct arglist *arglist)
}
if (isifs) {
- if (!nulonly)
+ if (!(afternul || nulonly))
ifsspc = isdefifs;
/* Ignore IFS whitespace at start */
if (q == start && ifsspc) {