Re: gnupload: Support -h

2018-12-11 Thread Jim Meyering
On Sat, Dec 1, 2018 at 7:32 AM Bruno Haible wrote: > > Ben Elliston wrote: > > The first time I ran gnupload, I used -h and got an error. ;-) This > > patch adds -h as an alias for --help. > > Normally it's Jim who reviews patches to gnupload. He hasn't reacted > in 3 days. But the patch is

Re: generic container for ordered maps

2018-12-11 Thread Bruno Haible
> The operations are: > >Operation ARRAY TREE > >gl_omap_sizeO(1) O(1) >gl_omap_get O(log n) O(log n) >gl_omap_put O(n) O(log n) >gl_omap_remove O(n) O(log n) >gl_omap_search

Re: generic container for ordered maps

2018-12-11 Thread Bruno Haible
Oops, it makes no sense to dispose the old value of a key when the function at the same time returns the value. This patch fixes it. 2018-12-11 Bruno Haible omap: Don't dispose the old value when the function returns it. * lib/gl_array_omap.c (gl_array_remove_at): Don't

generic container for maps

2018-12-11 Thread Bruno Haible
Here comes the last of the five generic container types: - list - ordered set - set - ordered map - map The operations are: Operation ARRAY LINKEDHASH HASH gl_map_size O(1) O(1) gl_map_get

Re: generic container for sets

2018-12-11 Thread Bruno Haible
Oops, I made a wrong use of qsort() in the tests. This should fix it. 2018-12-11 Bruno Haible array-set, linkedhash-set, hash-set: Fix tests. * tests/test-array_set.c (cmp_objects_in_array): New function. (check_equals): Use it. * tests/test-hash_set.c:

Re: generic container for sets

2018-12-11 Thread Bruno Haible
These *-set patches introduced a bit of code duplication. This patch here reduces the code duplication again. 2018-12-11 Bruno Haible hash-set, linkedhash-set: Reduce code duplication. * lib/gl_anyhash1.h: Rename from lib/gl_anyhash_list1.h and lib/gl_anyhash_set1.h.

git://git.savannah.gnu.org/gnulib.git down for anyone?

2018-12-11 Thread Richard W.M. Jones
$ git pull fatal: read error: Connection reset by peer Does anyone know if this is a temporary service interruption or if the URL changed? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog:

Re: git://git.savannah.gnu.org/gnulib.git down for anyone?

2018-12-11 Thread Eric Blake
On 12/11/18 1:20 PM, Richard W.M. Jones wrote: $ git pull fatal: read error: Connection reset by peer Does anyone know if this is a temporary service interruption or if the URL changed? Not sure why git:// isn't working (I reproduced the connection failure), but https:// is still up: git

times: Fix tests

2018-12-11 Thread Bruno Haible
Another wrong use of qsort(): The invocation of qsort in test-times.c is invalid, with a function doublecmp that returns doublecmp (5, 6) = 1 doublecmp (6, 5) = 0 POSIX [1] is not very clear about the requirements for a comparison function passed to qsort, but it appears that a total order

Re: generic container for sets

2018-12-11 Thread Bruno Haible
A small optimization. 2018-12-11 Bruno Haible array-set: Optimize. * lib/gl_array_set.c (gl_array_search, gl_array_remove): Test equals_fn outside the loop, not inside the loop. diff --git a/lib/gl_array_set.c b/lib/gl_array_set.c index dd77ef1..8e985af 100644 ---

Re: git://git.savannah.gnu.org/gnulib.git down for anyone?

2018-12-11 Thread Richard W.M. Jones
On Tue, Dec 11, 2018 at 01:33:52PM -0600, Eric Blake wrote: > On 12/11/18 1:20 PM, Richard W.M. Jones wrote: > > > >$ git pull > >fatal: read error: Connection reset by peer > > > >Does anyone know if this is a temporary service interruption or if the > >URL changed? > > Not sure why git:// isn't