Displaying 13 results from an estimated 13 matches for "sepc".
Did you mean:
sec
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Optimise nulonly away and just use quoted as before
...7 +886,7 @@ strtodest(p, syntax, quotes)
*/
STATIC ssize_t
-varvalue(char *name, int varflags, int flags, int *nulonly)
+varvalue(char *name, int varflags, int flags, int *quotedp)
{
int num;
char *p;
@@ -897,14 +895,12 @@ varvalue(char *name, int varflags, int flags, int *nulonly)
char sepc;
char **ap;
char const *syntax;
- int quoted = flags & EXP_QUOTED;
+ int quoted = *quotedp;
int subtype = varflags & VSTYPE;
int discard = subtype == VSPLUS || subtype == VSLENGTH;
int quotes = (discard ? 0 : (flags & QUOTES_ESC)) | QUOTES_KEEPNUL;
ssize_t len = 0;
- sep =...
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Optimise nulonly away and just use quoted as before
...7 +886,7 @@ strtodest(p, syntax, quotes)
*/
STATIC ssize_t
-varvalue(char *name, int varflags, int flags, int *nulonly)
+varvalue(char *name, int varflags, int flags, int *quotedp)
{
int num;
char *p;
@@ -897,14 +895,12 @@ varvalue(char *name, int varflags, int flags, int *nulonly)
char sepc;
char **ap;
char const *syntax;
- int quoted = flags & EXP_QUOTED;
+ int quoted = *quotedp;
int subtype = varflags & VSTYPE;
int discard = subtype == VSPLUS || subtype == VSLENGTH;
int quotes = (discard ? 0 : (flags & QUOTES_ESC)) | QUOTES_KEEPNUL;
ssize_t len = 0;
- sep =...
2019 Jan 25
0
[klibc:update-dash] expand: Fix ghost fields with unquoted $@/$*
...ty regions and something else that triggers some bug,
>>> and perhaps that combination can no longer occur with your patch.
>>
>> The latter is my guess, but I haven't had time to investigate it.
>
> Looking into it again:
>
> When IFS is set to an empty string, sepc is set to '\0' in varvalue().
> This then causes *quotedp to be set to true, meaning evalvar()'s quoted
> variable is turned on. quoted is then passed to recordregion() as the
> nulonly parameter.
>
> ifsp->nulonly has a bigger effect than merely selecting whether to u...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fix ghost fields with unquoted $@/$*
...ty regions and something else that triggers some bug,
>>> and perhaps that combination can no longer occur with your patch.
>>
>> The latter is my guess, but I haven't had time to investigate it.
>
> Looking into it again:
>
> When IFS is set to an empty string, sepc is set to '\0' in varvalue().
> This then causes *quotedp to be set to true, meaning evalvar()'s quoted
> variable is turned on. quoted is then passed to recordregion() as the
> nulonly parameter.
>
> ifsp->nulonly has a bigger effect than merely selecting whether to u...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Merge syntax/quotes in memtodest with flags
...;
- const char *syntax;
- int quotes;
+static size_t strtodest(const char *p, int flags)
{
size_t len = strlen(p);
- memtodest(p, len, syntax, quotes);
+ memtodest(p, len, flags);
return len;
}
@@ -886,15 +879,14 @@ varvalue(char *name, int varflags, int flags, int quoted)
int sep;
char sepc;
char **ap;
- char const *syntax;
int subtype = varflags & VSTYPE;
int discard = subtype == VSPLUS || subtype == VSLENGTH;
- int quotes = (discard ? 0 : (flags & QUOTES_ESC)) | QUOTES_KEEPNUL;
ssize_t len = 0;
char c;
+ flags |= EXP_KEEPNUL;
+ flags &= discard ? ~QUOTES_ESC...
2019 Jan 25
0
[klibc:update-dash] expand: Fixed "$@" expansion when EXP_FULL is false
...)
+ if (quoted && sep)
goto param;
/* fall through */
case '*':
- sep = ifsset() ? ifsval()[0] : ' ';
- if (!quoted) {
+ if (quoted)
+ sep = 0;
+ sep |= ifsset() ? ifsval()[0] : ' ';
param:
- sep |= (flags & EXP_FULL) << CHAR_BIT;
- }
sepc = sep;
*quotedp = !sepc;
if (!(ap = shellparam.p))
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fixed "$@" expansion when EXP_FULL is false
...)
+ if (quoted && sep)
goto param;
/* fall through */
case '*':
- sep = ifsset() ? ifsval()[0] : ' ';
- if (!quoted) {
+ if (quoted)
+ sep = 0;
+ sep |= ifsset() ? ifsval()[0] : ' ';
param:
- sep |= (flags & EXP_FULL) << CHAR_BIT;
- }
sepc = sep;
*quotedp = !sepc;
if (!(ap = shellparam.p))
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Split unquoted $@/$* correctly when IFS is set but empty
...+941,16 @@ numvar:
expdest = p;
break;
case '@':
- if (sep)
+ if (quoted)
goto param;
/* fall through */
case '*':
- sep = ifsset() ? ifsval()[0] : ' ';
+ sep |= ifsset() ? ifsval()[0] : ' ';
param:
if (!(ap = shellparam.p))
return -1;
sepc = sep;
+ *nulonly = !sepc;
while ((p = *ap++)) {
len += strtodest(p, syntax, quotes);
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Split unquoted $@/$* correctly when IFS is set but empty
...+941,16 @@ numvar:
expdest = p;
break;
case '@':
- if (sep)
+ if (quoted)
goto param;
/* fall through */
case '*':
- sep = ifsset() ? ifsval()[0] : ' ';
+ sep |= ifsset() ? ifsval()[0] : ' ';
param:
if (!(ap = shellparam.p))
return -1;
sepc = sep;
+ *nulonly = !sepc;
while ((p = *ap++)) {
len += strtodest(p, syntax, quotes);
2007 Feb 07
1
advice on a spec''ing best practice
...ethods are inherently more stable
than privates), but it still feels like a design smell - especially if
you have to intercept calls to that method (partial mocks), as you are
doing.
---
Hopefully i didn''t take that out of context.
This statement got me thinking about how i am witting my sepcs because
i have been intercepting calls to methods on the class that is being
spec''d. I do it mostly to isolate the code being tested as much as
possible.
I am hoping to get some advice on how to spec this method.
class Foo
def each_project
projects.each do|project|
yield(pr...
2007 May 24
15
Specs for code stored in rails_app/lib/
Where should the specs go for code in the "lib" directory of a Rails
app?
I made a folder, "spec/lib/", for storing such specs, and RSpec
automatically picks them up when run using "rake spec".
Before I go ahead and patch rspec_on_rails/lib/autotest/
rails_rspec.rb so that autotest can monitor these specs I''d like to
ask whether this is the
2002 Jun 27
1
[Bug 308] New: openssh 3.4 won't install or run on Solaris 8, on an Ultra 10 Sparc station
http://bugzilla.mindrot.org/show_bug.cgi?id=308
Summary: openssh 3.4 won't install or run on Solaris 8, on an
Ultra 10 Sparc station
Product: Portable OpenSSH
Version: -current
Platform: UltraSparc
OS/Version: Solaris
Status: NEW
Severity: critical
Priority: P1
Component: Build
2020 Mar 28
0
[klibc:update-dash] dash: expand: Do not reprocess data when expanding words
...D)
+ return p;
+
+ if (quoted) {
+ quoted = *var == '@' && shellparam.nparam;
+ if (!quoted)
+ return p;
}
+ recordregion(startloc, expdest - (char *)stackblock(), quoted);
return p;
}
@@ -882,10 +844,18 @@ varvalue(char *name, int varflags, int flags, int quoted)
char sepc;
char **ap;
int subtype = varflags & VSTYPE;
- int discard = subtype == VSPLUS || subtype == VSLENGTH;
+ int discard = (subtype == VSPLUS || subtype == VSLENGTH) |
+ (flags & EXP_DISCARD);
ssize_t len = 0;
char c;
+ if (!subtype) {
+ if (discard)
+ return -1;
+
+ sh_err...