search for: dblquote

Displaying 14 results from an estimated 14 matches for "dblquote".

Did you mean: bquote
2019 Jan 25
0
[klibc:update-dash] parser: Add syntax stack for recursive parsing
...dex 8b945e36..c28363ca 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -80,6 +80,18 @@ struct heredoc { int striptabs; /* if set, strip leading tabs */ }; +struct synstack { + const char *syntax; + struct synstack *prev; + struct synstack *next; + int innerdq; + int varpushed; + int dblquote; + int varnest; /* levels of variables expansion */ + int parenlevel; /* levels of parens in arithmetic */ + int dqvarnest; /* levels of variables expansion within double quotes */ +}; + struct heredoc *heredoclist; /* list of here documents to read */ @@ -841,6 +853,21 @@ static int pgetc_...
2020 Mar 28
0
[klibc:update-dash] dash: parser: Add syntax stack for recursive parsing
...dex 8b945e36..c28363ca 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -80,6 +80,18 @@ struct heredoc { int striptabs; /* if set, strip leading tabs */ }; +struct synstack { + const char *syntax; + struct synstack *prev; + struct synstack *next; + int innerdq; + int varpushed; + int dblquote; + int varnest; /* levels of variables expansion */ + int parenlevel; /* levels of parens in arithmetic */ + int dqvarnest; /* levels of variables expansion within double quotes */ +}; + struct heredoc *heredoclist; /* list of here documents to read */ @@ -841,6 +853,21 @@ static int pgetc_...
2019 Jan 25
0
[klibc:update-dash] parser: Fix single-quoted patterns in here-documents
...sr/dash/parser.c b/usr/dash/parser.c index c28363ca..cd980941 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -934,7 +934,8 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) USTPUTC(c, out); break; case CCTL: - if (eofmark == NULL || synstack->dblquote) + if ((!eofmark) | synstack->dblquote | + synstack->varnest) USTPUTC(CTLESC, out); USTPUTC(c, out); break;
2020 Mar 28
0
[klibc:update-dash] dash: parser: Fix single-quoted patterns in here-documents
...sr/dash/parser.c b/usr/dash/parser.c index c28363ca..cd980941 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -934,7 +934,8 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) USTPUTC(c, out); break; case CCTL: - if (eofmark == NULL || synstack->dblquote) + if ((!eofmark) | synstack->dblquote | + synstack->varnest) USTPUTC(CTLESC, out); USTPUTC(c, out); break;
2019 Jan 25
0
[klibc:update-dash] parser: use pgetc_eatbnl() in more places
...*/ case CWORD: USTPUTC(c, out); @@ -933,8 +927,6 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) USTPUTC(CTLESC, out); USTPUTC('\\', out); pungetc(); - } else if (c == '\n') { - nlprompt(); } else { if ( dblquote && @@ -997,7 +989,7 @@ quotemark: USTPUTC(c, out); --parenlevel; } else { - if (pgetc() == ')') { + if (pgetc_eatbnl() == ')') { USTPUTC(CTLENDARI, out); if (!--arinest) syntax = prevsyntax; @@ -1025,7 +1017,7 @@ quotemark:...
2020 Mar 28
0
[klibc:update-dash] dash: parser: use pgetc_eatbnl() in more places
...*/ case CWORD: USTPUTC(c, out); @@ -933,8 +927,6 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) USTPUTC(CTLESC, out); USTPUTC('\\', out); pungetc(); - } else if (c == '\n') { - nlprompt(); } else { if ( dblquote && @@ -997,7 +989,7 @@ quotemark: USTPUTC(c, out); --parenlevel; } else { - if (pgetc() == ')') { + if (pgetc_eatbnl() == ')') { USTPUTC(CTLENDARI, out); if (!--arinest) syntax = prevsyntax; @@ -1025,7 +1017,7 @@ quotemark:...
2019 Jan 25
0
[klibc:update-dash] [PARSER] Add nlprompt/nlnoprompt helpers
...case CWORD: @@ -934,9 +940,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) USTPUTC('\\', out); pungetc(); } else if (c == '\n') { - plinno++; - if (doprompt) - setprompt(2); + nlprompt(); } else { if ( dblquote && @@ -1092,8 +1096,7 @@ checkend: { if (c == '\n' || c == PEOF) { c = PEOF; - plinno++; - needprompt = doprompt; + nlnoprompt(); } else { int len; @@ -1342,9 +1345,7 @@ parsebackq: { case '\\': if ((pc = pgetc()...
2020 Mar 28
0
[klibc:update-dash] dash: [PARSER] Add nlprompt/nlnoprompt helpers
...case CWORD: @@ -934,9 +940,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) USTPUTC('\\', out); pungetc(); } else if (c == '\n') { - plinno++; - if (doprompt) - setprompt(2); + nlprompt(); } else { if ( dblquote && @@ -1092,8 +1096,7 @@ checkend: { if (c == '\n' || c == PEOF) { c = PEOF; - plinno++; - needprompt = doprompt; + nlnoprompt(); } else { int len; @@ -1342,9 +1345,7 @@ parsebackq: { case '\\': if ((pc = pgetc()...
2012 Oct 01
0
[klibc:master] Avoid overflow for very long variable name
....c b/usr/dash/parser.c index 528d005..6e076a5 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -852,7 +852,7 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) { int c = firstc; char *out; - int len; + size_t len; struct nodelist *bqlist; int quotef; int dblquote;
2006 Jan 08
2
[mips] pipe doesn't work in dash
...ompt' may be used uninitialized in this function dash/parser.c:849: warning: 'prevsyntax' may be used uninitialized in this function dash/parser.c:842: warning: variable 'quotef' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:843: warning: variable 'dblquote' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:844: warning: variable 'varnest' might be clobbered by 'longjmp' or 'vfork' dash/parser.c:845: warning: variable 'arinest' might be clobbered by 'longjmp' or 'vfork' dash/pa...
2010 Mar 22
1
[git pull] dash, sh4, README's
...s in parameter expansions outside quotes [klibc] [EXPAND] Perform tilde expansion in all parameter expansion words [klibc] [PARSER] Remove superfluous arinest test in CENDQUOTE [klibc] [PARSER] Remove superfluous arinest test for dqvarnest [klibc] [PARSER] Remove superfluous dblquote settings when ending arith [klibc] [PARSER] Remove arithmetic expansion collapsing at parse time [klibc] [EXPAND] Do not expand tilde in parameter expansion within quotes [klibc] [EXPAND] Move parse-time quote flag detection to run-time [klibc] [PARSER] Recognise here-doc de...
2010 Apr 16
0
[git pull v4] dash, sh4, ipconfig, dprintf, fstype, README's
...s in parameter expansions outside quotes [klibc] [EXPAND] Perform tilde expansion in all parameter expansion words [klibc] [PARSER] Remove superfluous arinest test in CENDQUOTE [klibc] [PARSER] Remove superfluous arinest test for dqvarnest [klibc] [PARSER] Remove superfluous dblquote settings when ending arith [klibc] [PARSER] Remove arithmetic expansion collapsing at parse time [klibc] [EXPAND] Do not expand tilde in parameter expansion within quotes [klibc] [EXPAND] Move parse-time quote flag detection to run-time [klibc] [PARSER] Recognise here-doc de...
2010 Apr 16
0
[PATCH] pull faccessat() system call
...s in parameter expansions outside quotes [klibc] [EXPAND] Perform tilde expansion in all parameter expansion words [klibc] [PARSER] Remove superfluous arinest test in CENDQUOTE [klibc] [PARSER] Remove superfluous arinest test for dqvarnest [klibc] [PARSER] Remove superfluous dblquote settings when ending arith [klibc] [PARSER] Remove arithmetic expansion collapsing at parse time [klibc] [EXPAND] Do not expand tilde in parameter expansion within quotes [klibc] [EXPAND] Move parse-time quote flag detection to run-time [klibc] [PARSER] Recognise here-doc de...
2010 Mar 28
1
[git pull v3] dash, sh4, ipconfig, dprintf, fstype, README's
...s in parameter expansions outside quotes [klibc] [EXPAND] Perform tilde expansion in all parameter expansion words [klibc] [PARSER] Remove superfluous arinest test in CENDQUOTE [klibc] [PARSER] Remove superfluous arinest test for dqvarnest [klibc] [PARSER] Remove superfluous dblquote settings when ending arith [klibc] [PARSER] Remove arithmetic expansion collapsing at parse time [klibc] [EXPAND] Do not expand tilde in parameter expansion within quotes [klibc] [EXPAND] Move parse-time quote flag detection to run-time [klibc] [PARSER] Recognise here-doc de...