Re: [hackers] [[dwm][PATCH]] drw / utf8decode : simpler is better ?

From: NRK <nrk_AT_disroot.org>
Date: Mon, 15 Aug 2022 19:40:47 +0600

On Tue, Jul 19, 2022 at 04:38:34PM +0200, nenesses wrote:
> -static size_t
> -utf8validate(long *u, size_t i)
> -{
> - if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
> - *u = UTF_INVALID;
> - for (i = 1; *u > utfmax[i]; ++i)
> - ;
> - return i;
> -}

I wonder if the return value was ever used or was it just premature
functionality. Either ways, the patch looks good to me, but I'm not the
maintainer here.

- NRK
Received on Mon Aug 15 2022 - 15:40:47 CEST

This archive was generated by hypermail 2.3.0 : Mon Aug 15 2022 - 15:48:37 CEST