Re: [dev] [sbase][RFC] Add a simplistic version of tr

From: Thorsten Glaser <tg_AT_mirbsd.de>
Date: Thu, 28 Nov 2013 19:01:17 +0000 (UTC)

Silvan Jegen dixit:

>If I understand correctly you would use mmap to allocate a sparse
>memory area into which we could then directly index (either using
>UTF-8 or UTF-32 indices), right? Since mmap needs a file descriptor

I think that wouldn’t help much.

>Sadly, I do not follow. I recognize that the lengths of those arrays
>multiplied correspond to the maximum number of Unicode code points
>(1,114,112) but I am not sure how the mapping (from UTF-8 or UTF-32
>encoding) should be done. Care to enlighten me?

Eh, &0xFF and >>8?

bye,
//mirabilos
-- 
„Also irgendwie hast du IMMER recht. Hier zuckelte gerade ein Triebwagen mit
der Aufschrift "Ostdeutsche Eisenbahn" durch Wuppertal. Ich glaubs machmal
nicht…“						-- Natureshadow, per SMS
„Hilf mir mal grad beim Denken“			-- Natureshadow, IRL, 2x
Received on Thu Nov 28 2013 - 20:01:17 CET

This archive was generated by hypermail 2.3.0 : Thu Nov 28 2013 - 20:12:06 CET