Rich, on Mon, 29 May 2023 11:46:40 -0400 you (Rich Felker ) wrote: > On Mon, May 29, 2023 at 09:14:13AM +0200, Jₑₙₛ Gustedt wrote: > > Rich, > > > > on Fri, 26 May 2023 17:03:58 -0400 you (Rich Felker > > ) wrote: > > > > > I think you need an extra state that's "plain but not bare" that > > > duplicates only the integer transitions out of it, like the l, ll, > > > etc. prefix states do. > > > > Hm, the problem is that for the other prefixes the table entries > > then encode the concrete type that is to be expected. We could not > > do this here because the type depends on the requested width. So we > > would then need to "repair" that type after the loop. A `switch` to > > do that would look substantially similar to what is there, now. Do > > you think that would be better? > > OK I think I can communicate better with code than natural language > text, so here's a diff, completely untested, of what I had in mind. that's ... ugh ... not so prety, I think In my current version I track the desired width, if there is w specifier, and then do the adjustments after the loop. That takes indeed care of undefined character sequences. I find that much better readable, and also easier to extend (later there comes the `wf` case and the `128`, and perhaps some day `256`) Jₑₙₛ -- :: ICube :::::::::::::::::::::::::::::: deputy director :: :: Université de Strasbourg :::::::::::::::::::::: ICPS :: :: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus :: :: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 :: :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::