search for: _append

Displaying 10 results from an estimated 10 matches for "_append".

Did you mean: append
2008 Mar 02
3
congrats!
Thanks Wayne and everybody, This is a huge boost to have a modern rsync for OSX. We're all grateful. Rob D PS I did notice that we lost the bsd flags test in 3.0. It was ok in pre10.... thanks again bbouncer Verifying: basic-permissions ... ok Verifying: timestamps ... Sub-test: modification time ... ok ok Verifying: symlinks ... ok Verifying:
2020 Apr 15
1
Re: [PATCH nbdkit 1/9] common: Add a generic implementation of vectors.
...tend ((struct generic_vector *)v, n, \ > + sizeof (type)); \ > + } \ > + static inline int \ > + name##_append (name *v, type elem) \ > + { \ > + if (v->size >= v->alloc) { \ > + if (name##_extend (v, 1) == -1) return -1;...
2023 Mar 28
1
[nbdkit PATCH 1/2] common/utils: document empty_vector compound literal assignment
...= 0?. + * Initializing with ?empty_vector?, or assigning the compound literal + * ?(string_vector)empty_vector?, sets ?.ptr = NULL? and ?.len = 0?. * * DEFINE_VECTOR_TYPE also defines utility functions. For the full * list see the definition below, but useful functions include: * * ?name?_append (eg. ?string_vector_append?) * - Append a new element at the end. This operation is cheap. * * ?name?_insert (eg. ?string_vector_insert?) * - Insert a new element at the beginning, middle or end. This * operation is more expensive because existing elements may need
2020 Apr 19
0
[PATCH nbdkit 2/2] Add insert function and use the new vector library in several places.
...sizeof (type)); \ } \ + /* Insert at i'th element. i=0 => beginning i=size => append */ \ static inline int \ - name##_append (name *v, type elem) \ + name##_insert (name *v, type elem, size_t i) \ { \ if (v->size >= v->alloc) { \...
2023 Mar 28
3
[nbdkit PATCH 0/2] various
I originally meant to post only the "vector.h" patch, but then (independently) nbdkit wouldn't build. Hence the other (rust plugin) patch. Laszlo Laszlo Ersek (2): common/utils: document empty_vector compound literal assignment plugins/rust: restrict predicates-{tree,core} to {1.0.7,1.0.5} common/utils/vector.h | 8 +++++++- plugins/rust/Cargo.toml | 2 ++ 2 files changed,
2020 Apr 19
2
[PATCH nbdkit 1/2] vddk: Use new vector library to allocate the argv list.
...1,25 +313,22 @@ perform_reexec (const char *env, const char *prepend) buflen = len; len = 0; while (len < buflen) { - char **tmp = realloc (argv, sizeof *argv * (argc + 3)); - - if (!tmp) { - nbdkit_debug ("failure to parse original argv: %m"); + if (string_vector_append (&argv, buf + len) == -1) { + argv_realloc_fail: + nbdkit_debug ("argv: realloc: %m"); return; } - argv = tmp; - argv[argc++] = buf + len; len += strlen (buf + len) + 1; } if (!env) env = ""; - nbdkit_debug ("original argc == %...
2020 Apr 15
0
[PATCH nbdkit 1/9] common: Add a generic implementation of vectors.
...+#include <assert.h> + +#include "vector.h" + +DEFINE_VECTOR_TYPE(int64_vector, int64_t); +DEFINE_VECTOR_TYPE(string_vector, char *); + +static void +test_int64_vector (void) +{ + int64_vector v = empty_vector; + size_t i; + + for (i = 0; i < 10; ++i) + assert (int64_vector_append (&v, i) == 0); + for (i = 0; i < 10; ++i) + assert (v.ptr[i] == i); + free (v.ptr); +} + +static void +test_string_vector (void) +{ + string_vector v = empty_vector; + size_t i; + + for (i = 0; i < 10; ++i) { + char *s; + + assert (asprintf (&s, "number %zu", i...
2020 Oct 27
0
[PATCH libnbd 1/5] common/utils: Copy simple vector library from nbdkit.
...< names.size; ++i) + * printf ("%s\n", names.ptr[i]); + * + * Initializing with ‘empty_vector’ sets ‘.ptr = NULL’ and ‘.size = 0’. + * + * DEFINE_VECTOR_TYPE also defines utility functions. For the full + * list see the definition below, but useful functions include: + * + * ‘name’_append (eg. ‘string_vector_append’) + * - Append a new element at the end. This operation is cheap. + * + * ‘name’_insert (eg. ‘string_vector_insert’) + * - Insert a new element at the beginning, middle or end. This + * operation is more expensive because existing elements may need + * to...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated! The basic purpose of the patch series is to set $nbdkit_stdio_safe to "0" or "1" in sh and eval plugin scripts. To do that, I ended up adding a nicer way to manipulate environ lists, and to do that, I ended up adding a whole generic vector implementation which is applicable in a lot of different places.
2020 Oct 27
6
[PATCH libnbd 0/5] info: --map: Coalesce adjacent extents of the same type.
This adds coalescing of adjacent extents of the same type, as mentioned by Eric Blake in the commit message here: https://github.com/libguestfs/libnbd/commit/46072f6611f80245846a445766da071e457b00cd The patch series is rather long because it detours through adding the <vector.h> library from nbdkit into libnbd and replacing ad hoc uses of realloc, char ** etc in various places. Rich.