Displaying 20 results from an estimated 38 matches for "strlist".
2010 Jan 31
0
error compiling on 3.5 on OS X
I've tried to compile 3.5.0 RC2 on MAc OS X 10.6.2 and I get an error towards the end---
any help/ideas would be greatly appreciated---
-----------<snip>-------------
torture/../../lib/util/tests/strlist.c:285: warning: passing argument 1 of ?str_list_equal? from incompatible pointer type
torture/../../lib/util/tests/strlist.c: In function ?test_list_remove?:
torture/../../lib/util/tests/strlist.c:302: warning: passing argument 1 of ?str_list_remove? from incompatible pointer type
torture/../../lib...
2008 Aug 10
2
Basic data structures
...hings, probably because I haven't
found the correct documentation. Here's a simple example which
illustrates several of my problems.
Suppose I want to have a regexp match against a string, and return all
the matching substrings in a vector of strings.
regexp <- "[ab]+"
strlist <- c( "abc", "dbabddadd", "aaa" )
matches <- gregexpr(regexp,strlist)
With this input, I'd want to return list( list("ab"), list("ab", "a"),
list("aaa") ).
Now the matches object prints out as
[[1]]
[1] 1...
2010 Aug 03
3
Dovecot Sieve with Dovecot 2.0
Hello Timo and everybody!
Sorry, I was googling but haven't found an answer on my simple question:
Does the latest release of Dovecot Sieve work with Dovecot 2.0rc?
Thank you in advance.
--
Best regards,
Roman
2019 Jan 25
0
[klibc:update-dash] expand: Fix buffer overflow in expandmeta
...and.c | 57 ++++++++++++++++++++++++++++++++-----------------------
1 file changed, 33 insertions(+), 24 deletions(-)
diff --git a/usr/dash/expand.c b/usr/dash/expand.c
index 974a31de..f52f34c9 100644
--- a/usr/dash/expand.c
+++ b/usr/dash/expand.c
@@ -124,7 +124,7 @@ STATIC void expandmeta(struct strlist *, int);
#ifdef HAVE_GLOB
STATIC void addglob(const glob_t *);
#else
-STATIC void expmeta(char *, char *);
+STATIC void expmeta(char *, unsigned, unsigned);
STATIC struct strlist *expsort(struct strlist *);
STATIC struct strlist *msort(struct strlist *, int);
#endif
@@ -1246,6 +1246,7 @@ addg...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fix buffer overflow in expandmeta
...and.c | 57 ++++++++++++++++++++++++++++++++-----------------------
1 file changed, 33 insertions(+), 24 deletions(-)
diff --git a/usr/dash/expand.c b/usr/dash/expand.c
index 974a31de..f52f34c9 100644
--- a/usr/dash/expand.c
+++ b/usr/dash/expand.c
@@ -124,7 +124,7 @@ STATIC void expandmeta(struct strlist *, int);
#ifdef HAVE_GLOB
STATIC void addglob(const glob_t *);
#else
-STATIC void expmeta(char *, char *);
+STATIC void expmeta(char *, unsigned, unsigned);
STATIC struct strlist *expsort(struct strlist *);
STATIC struct strlist *msort(struct strlist *, int);
#endif
@@ -1246,6 +1246,7 @@ addg...
2011 Jan 05
0
Fwd: Review of libguestfs ruby bindings
...think you can remove the check
entirely; either you will get back a valid string (even if it is empty), or the
interpreter will raise an exception (in which case the rest of your function
won't be called anyway).
7) In ruby_guestfs_test0() and other places, there is code like:
Check_Type (strlistv, T_ARRAY);
{
size_t i, len;
len = RARRAY_LEN (strlistv);
strlist = guestfs_safe_malloc (g, sizeof (char *) * (len+1));
for (i = 0; i < len; ++i) {
VALUE v = rb_ary_entry (strlistv, i);
strlist[i] = StringValueCStr (v);
}
strlist[len] = NULL;
}
Unfortunat...
2008 Mar 31
3
nut with hal on Fedora 8
..._device.vendor_id" int="0x0764">
<match key="usb_device.product_id" int="0x0005">
<append key="info.category" type="string">battery</append>
<merge key="info.capabilities" type="strlist">battery</merge>
<merge key="info.addons"
type="strlist">hald-addon-usbhid-ups</merge>
<merge key="battery.type" type="string">ups</merge>
</match>
<match key="usb_device....
2013 Jun 07
1
[LLVMdev] tablegen foreach question
...ay to create the following four defs?
D0 = (0, "A")
D1 = (1, "B")
D2 = (2, "C")
D3 = (3, "D")
I tried to use list of strings and the foreach construct, but apparently
tablegen doesn't allow using identifiers to access array elements.
$ cat tbl3.td
def StrList {
list<string> ls = ["A", "B", "C", "D"];
}
class Base0<int i> {
int I = i;
}
class Base1<string s> {
string S1 = s;
}
foreach i = 0-3 in
def D#i: Base0<i>, Base1<StrList.ls[i]>;
$ llvm-tblgen tbl3.td
tbl3.td:15:37: err...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...- name: nullstr,
- builtin: bltincmd
+ .name = nullstr,
+ .builtin = bltincmd,
+ .flags = BUILTIN_REGULAR,
};
@@ -648,22 +649,42 @@ out:
result->fd, result->buf, result->nleft, result->jp));
}
-static char **
-parse_command_args(char **argv, const char **path)
+static struct strlist *fill_arglist(struct arglist *arglist,
+ union node **argpp)
{
+ struct strlist **lastp = arglist->lastp;
+ union node *argp;
+
+ while ((argp = *argpp)) {
+ expandarg(argp, arglist, EXP_FULL | EXP_TILDE);
+ *argpp = argp->narg.next;
+ if (*lastp)
+ break;
+ }
+
+ return *lastp;...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...PUSH|REDIR_SAVEFD2);
- if (status) {
+ if (unlikely(status)) {
+ vlocal = 0;
bail:
exitstatus = status;
@@ -829,13 +839,19 @@ bail:
goto out;
}
+ if (likely(vlocal))
+ localvar_stop = pushlocalvars();
+
for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) {
struct strlist **spp;
spp = varlist.lastp;
expandarg(argp, &varlist, EXP_VARTILDE);
- mklocal((*spp)->text);
+ if (vlocal)
+ mklocal((*spp)->text, VEXPORT);
+ else
+ setvareq((*spp)->text, vflags);
}
/* Print the command if xflag is set. */
@@ -857,8 +873,8 @@ bail:
/* Now lo...
2014 Jun 27
3
[PATCH WIP] Can't generate argv variant
...guestfs_copy_device_to_device_argv, but not
guestfs_copy_device_to_device_argv version.
Other issue:
generated declaration for guestfs__internal_test in guestfs-internal-actions.h
looks like this:
extern int guestfs__internal_test (guestfs_h *g, const char *str,
const char *optstr, char *const *strlist, int b, int integer,
int64_t integer64, const char *filein, const char *fileout,
const char *bufferin, size_t bufferin_size, ...);
but, it's type in bindtests.c looks different:
int
guestfs__internal_test (guestfs_h *g,
const char *str,
cons...
2019 Jan 25
0
[klibc:update-dash] builtin: Fix handling of trailing IFS white spaces
...by recordregion.
+ * If maxargs is non-negative, at most maxargs arguments will be created, by
+ * joining together the last arguments.
*/
void
-ifsbreakup(char *string, struct arglist *arglist)
+ifsbreakup(char *string, int maxargs, struct arglist *arglist)
{
struct ifsregion *ifsp;
struct strlist *sp;
char *start;
char *p;
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) {
+ i...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Fix handling of trailing IFS white spaces
...by recordregion.
+ * If maxargs is non-negative, at most maxargs arguments will be created, by
+ * joining together the last arguments.
*/
void
-ifsbreakup(char *string, struct arglist *arglist)
+ifsbreakup(char *string, int maxargs, struct arglist *arglist)
{
struct ifsregion *ifsp;
struct strlist *sp;
char *start;
char *p;
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) {
+ i...
2020 Mar 28
0
[klibc:master] dash: shell: Fix clang warnings about "string plus integer"
...org.uk>
---
usr/dash/eval.c | 3 ++-
usr/dash/jobs.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index ae83508b..dd144948 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -1081,7 +1081,8 @@ eprintlist(struct output *out, struct strlist *sp, int sep)
while (sp) {
const char *p;
- p = " %s" + (1 - sep);
+ p = " %s";
+ p += (1 - sep);
sep |= 1;
outfmt(out, p, sp->text);
sp = sp->next;
diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
index 009bbfee..b9ff1402 100644
--- a/usr/dash/jobs.c
+++...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Fail immediately with redirections errors for simple command
...redirectsafe(cmd->ncmd.redirect, REDIR_PUSH|REDIR_SAVEFD2);
+ if (status) {
+bail:
+ exitstatus = status;
+
+ /* We have a redirection error. */
+ if (spclbltin > 0)
+ exraise(EXERROR);
+
+ goto out;
+ }
+
for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) {
struct strlist **spp;
@@ -848,30 +859,19 @@ evalcommand(union node *cmd, int flags)
!(cmdentry.u.cmd->flags & BUILTIN_REGULAR)) {
find_command(argv[0], &cmdentry, cmd_flag | DO_ERR,
unlikely(path) ? path : pathval());
- if (cmdentry.cmdtype == CMDUNKNOWN) {
- status = 127;
-#ifde...
2019 Jan 25
0
[klibc:update-dash] [EXPAND] Split unquoted $@/$* correctly when IFS is set but empty
...t, 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++;
subtype = varflags & VSTYPE;
@@ -732,11 +733,12 @@ evalvar(char *p, int flag)
quoted = flag & E...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Always set localvar_stop
...d.redirect, REDIR_PUSH|REDIR_SAVEFD2);
if (unlikely(status)) {
- vlocal = 0;
bail:
exitstatus = status;
@@ -839,9 +840,6 @@ bail:
goto out;
}
- if (likely(vlocal))
- localvar_stop = pushlocalvars();
-
for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) {
struct strlist **spp;
@@ -920,8 +918,7 @@ out:
popredir(execcmd);
unwindredir(redir_stop);
unwindfiles(file_stop);
- if (likely(vlocal))
- unwindlocalvars(localvar_stop);
+ unwindlocalvars(localvar_stop);
if (lastarg)
/* dsl: I think this is intended to be used to support
* '_' in '...
2020 Mar 28
0
[klibc:update-dash] dash: [EXPAND] Split unquoted $@/$* correctly when IFS is set but empty
...t, 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++;
subtype = varflags & VSTYPE;
@@ -732,11 +733,12 @@ evalvar(char *p, int flag)
quoted = flag & E...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...if (n == NULL) {
TRACE(("evaltree(NULL) called\n"));
goto out;
@@ -317,6 +321,8 @@ exexit:
exraise(EXEXIT);
}
+ popstackmark(&smark);
+
return exitstatus;
}
@@ -396,14 +402,12 @@ evalfor(union node *n, int flags)
struct arglist arglist;
union node *argp;
struct strlist *sp;
- struct stackmark smark;
int status;
errlinno = lineno = n->nfor.linno;
if (funcline)
lineno -= funcline - 1;
- setstackmark(&smark);
arglist.lastp = &arglist.list;
for (argp = n->nfor.args ; argp ; argp = argp->narg.next) {
expandarg(argp, &arglist, E...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Ensure result is escaped in cvtnum
...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);
STATIC size_t esclen(const char *, const char *);
STATIC char *sca...