Displaying 14 results from an estimated 14 matches for "varvalue".
Did you mean:
var_value
2019 Jan 25
0
[klibc:update-dash] expand: Fix ghost fields with unquoted $@/$*
...hat 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 use
> $IFS or whether to only spl...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fix ghost fields with unquoted $@/$*
...hat 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 use
> $IFS or whether to only spl...
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Split unquoted $@/$* correctly when IFS is set but empty
...xpand.c
+++ b/usr/dash/expand.c
@@ -116,7 +116,7 @@ STATIC const char *subevalvar(char *, char *, int, int, int, int, int);
STATIC char *evalvar(char *, int);
STATIC size_t strtodest(const char *, const char *, int);
STATIC void memtodest(const char *, size_t, const char *, int);
-STATIC ssize_t varvalue(char *, int, int);
+STATIC ssize_t varvalue(char *, int, int, int *);
STATIC void expandmeta(struct strlist *, int);
#ifdef HAVE_GLOB
STATIC void addglob(const glob_t *);
@@ -722,6 +722,7 @@ evalvar(char *p, int flag)
ssize_t varlen;
int easy;
int quoted;
+ int nulonly;
varflags = *p++...
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Split unquoted $@/$* correctly when IFS is set but empty
...xpand.c
+++ b/usr/dash/expand.c
@@ -116,7 +116,7 @@ STATIC const char *subevalvar(char *, char *, int, int, int, int, int);
STATIC char *evalvar(char *, int);
STATIC size_t strtodest(const char *, const char *, int);
STATIC void memtodest(const char *, size_t, const char *, int);
-STATIC ssize_t varvalue(char *, int, int);
+STATIC ssize_t varvalue(char *, int, int, int *);
STATIC void expandmeta(struct strlist *, int);
#ifdef HAVE_GLOB
STATIC void addglob(const glob_t *);
@@ -722,6 +722,7 @@ evalvar(char *p, int flag)
ssize_t varlen;
int easy;
int quoted;
+ int nulonly;
varflags = *p++...
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Optimise nulonly away and just use quoted as before
...te: Wed, 8 Oct 2014 20:09:56 +0800
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Fri, 25 Jan 2019 02:57:21 +0000
[klibc] [EXPAND] Optimise nulonly away and just use quoted as before
This patch makes a small optimisation by using the same value for
quoted between evalvar and varvalue by eliminating nulonly and
passing along quoted instead.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/expand.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a...
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Optimise nulonly away and just use quoted as before
...;ben at decadent.org.uk>
CommitDate: Sat, 28 Mar 2020 21:42:54 +0000
[klibc] dash: [EXPAND] Optimise nulonly away and just use quoted as before
[ dash commit ab657e36b68f4a7e9ddb0f36c455c98d1c069a2c ]
This patch makes a small optimisation by using the same value for
quoted between evalvar and varvalue by eliminating nulonly and
passing along quoted instead.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/expand.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a...
2006 Feb 26
11
Asterisk question
Any idea how to read an external file, grab some stuff and push it back
into an Asterisk variable?
I can do it the other way with:
system(echo "${UNIQUEID} =>" >> /home/ast/curr_calls)
but I'm a bit stumped on how to go the other way around....
much thanks,
Paul Hales
2003 Oct 14
0
Has something changed with AGI recently?
...(unchanged) AGI script...
#!/bin/sh
# Phil Skuse 16/4/2003
# Writes caller information to /home/asterisk/call_log.txt
export PATH=/bin:/usr/bin
read STDIN
while [ "x$STDIN" != "x" ]; do
export VARNAME=`echo $STDIN | awk '{print $1}' | tr -d ":"`
export VARVALUE=`echo $STDIN | awk '{print $2}'`
case $VARNAME in
("agi_extension") export EXTENSION=$VARVALUE;;
("agi_callerid") export CALLERID=$VARVALUE
esac
read STDIN
done
echo `date` Extension: $EXTENSION CallerID: $CALLERID >>
/home/asterisk/cal...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Ensure result is escaped in cvtnum
...ari(char *start, int flag);
STATIC void expbackq(union node *, int);
STATIC char *evalvar(char *, int);
static size_t strtodest(const char *p, int flags);
-static void memtodest(const char *p, size_t len, int flags);
+static size_t memtodest(const char *p, size_t len, int flags);
STATIC ssize_t varvalue(char *, int, int, int);
STATIC void expandmeta(struct strlist *, int);
#ifdef HAVE_GLOB
@@ -133,7 +133,7 @@ STATIC int pmatch(const char *, const char *);
#else
#define pmatch(a, b) !fnmatch((a), (b), 0)
#endif
-STATIC int cvtnum(intmax_t);
+static size_t cvtnum(intmax_t num, int flags);
STAT...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Merge syntax/quotes in memtodest with flags
...nt, int);
STATIC char *evalvar(char *, int);
-STATIC size_t strtodest(const char *, const char *, int);
-STATIC void memtodest(const char *, size_t, const char *, int);
+static size_t strtodest(const char *p, int flags);
+static void memtodest(const char *p, size_t len, int flags);
STATIC ssize_t varvalue(char *, int, int, int);
STATIC void expandmeta(struct strlist *, int);
#ifdef HAVE_GLOB
@@ -359,7 +357,6 @@ exptilde(char *startp, char *p, int flag)
signed char c;
char *name;
const char *home;
- int quotes = flag & QUOTES_ESC;
name = p + 1;
@@ -388,7 +385,7 @@ done:
if (!home)...
2012 May 13
4
write data using xlsReadWrite
Hai, I'm trying to write these var output data from these codes inside excel
file. My directory to store the data is
/D:\FYP\image /
but receive an error message :
/Error in write.xls(mydata, "D:\\FYP\\image.mydata.xls") :
object 'mydata' not found/
these are my codes, can you help give an advice or idea with my problem:
/library("biOps")
2019 Jan 25
0
[klibc:update-dash] expand: Fixed "$@" expansion when EXP_FULL is false
...gned-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/expand.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/usr/dash/expand.c b/usr/dash/expand.c
index a2f99f14..c04ff6e1 100644
--- a/usr/dash/expand.c
+++ b/usr/dash/expand.c
@@ -901,6 +901,7 @@ varvalue(char *name, int varflags, int flags, int *quotedp)
int quotes = (discard ? 0 : (flags & QUOTES_ESC)) | QUOTES_KEEPNUL;
ssize_t len = 0;
+ sep = (flags & EXP_FULL) << CHAR_BIT;
syntax = quoted ? DQSYNTAX : BASESYNTAX;
switch (*name) {
@@ -931,16 +932,14 @@ numvar:
expdes...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fixed "$@" expansion when EXP_FULL is false
...gned-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/expand.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/usr/dash/expand.c b/usr/dash/expand.c
index a2f99f14..c04ff6e1 100644
--- a/usr/dash/expand.c
+++ b/usr/dash/expand.c
@@ -901,6 +901,7 @@ varvalue(char *name, int varflags, int flags, int *quotedp)
int quotes = (discard ? 0 : (flags & QUOTES_ESC)) | QUOTES_KEEPNUL;
ssize_t len = 0;
+ sep = (flags & EXP_FULL) << CHAR_BIT;
syntax = quoted ? DQSYNTAX : BASESYNTAX;
switch (*name) {
@@ -931,16 +932,14 @@ numvar:
expdes...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Do not reprocess data when expanding words
...= 0)
- break;
- }
- }
+record:
+ if (flag & EXP_DISCARD)
+ 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;...