Re: argmatch: use void* for raw memory pointers

2019-04-24 Thread Bruno Haible
Hi Akim,

> commit 2168926d033188dac94559493399d9d877734f26
> Author: Akim Demaille 
> Date:   Thu Apr 18 22:23:02 2019 +0200
> 
> argmatch: use void* for raw memory pointers
> 
> * lib/argmatch.h, lib/argmatch.c (argmatch, argmatch_valid)
> (__xargmatch_internal, argmatch_to_argument): Use void* for pointers
> to "values", keep char* for strings.

Looks good to me.

Bruno




Re: argmatch: use void* for raw memory pointers

2019-04-18 Thread Akim Demaille


> Le 18 avr. 2019 à 22:41, Akim Demaille  a écrit :
> 
> diff --git a/lib/argmatch.c b/lib/argmatch.c
> index b9a3e400c..434708504 100644
> --- a/lib/argmatch.c
> +++ b/lib/argmatch.c
> @@ -96,6 +96,8 @@ argmatch (const char *arg, const char *const *arglist,
> {
>   if (!strncmp (arglist[i], arg, arglen))
> {
> +  fprintf (stderr, "'%s'(%ld) vs. '%s'(%ld)\n",
> +   arglist[i], strlen (arglist[i]), arg, arglen);
>   if (strlen (arglist[i]) == arglen)
> /* Exact match found.  */
> return i;

This part, of course, has nothing to do here, and is removed
from the proposal.