Re: [hackers] [dwm][PATCH] ensure layout symbol is properly nul-terminated

2022-08-13 Thread Hiltjo Posthuma
On Sat, Aug 13, 2022 at 09:00:06AM +0600, NRK wrote: > the dwm source code somewhat silently assumes that the symbol will fit > into 16 bytes. but this may not be the case since users can define > longer symbols in `config.h` (and there's no comment or note stating > anything about the size require

Re: [hackers] [dwm][PATCH] ensure layout symbol is properly nul-terminated

2022-08-13 Thread NRK
On Sat, Aug 13, 2022 at 09:55:00AM +0200, Hiltjo Posthuma wrote: > I think its simpler to just add the comment if needed. That's an option, yes. And I've considered it too. But it gets messy with Unicode/UTF-8 where one visible character != one byte. If you still think that's the way to go, then

Re: [hackers] [dwm][PATCH] ensure layout symbol is properly nul-terminated

2022-08-13 Thread Stein Gunnar Bakkeby
Doesn't this affect readability? Would it be easier to make the layout symbol size 15 (one less than the monitor symbol)? On Sat, 13 Aug 2022, 05:00 NRK, wrote: > the dwm source code somewhat silently assumes that the symbol will fit > into 16 bytes. but this may not be the case since users can

Re: [hackers] [dwm][PATCH] ensure layout symbol is properly nul-terminated

2022-08-13 Thread Hiltjo Posthuma
Yes it affects readability and I don't like the patch. BTW please don't send HTML mail to this mailinglist. Thanks, On Sat, Aug 13, 2022 at 08:47:41AM +0200, Stein Gunnar Bakkeby wrote: >Doesn't this affect readability? Would it be easier to make the layout >symbol size 15 (one less than

Re: [hackers] [dwm][PATCH] ensure layout symbol is properly nul-terminated

2022-08-13 Thread NRK
On Sat, Aug 13, 2022 at 08:47:41AM +0200, Stein Gunnar Bakkeby wrote: > Would it be easier to make the layout > symbol size 15 (one less than the monitor symbol)? Not really, since the src might still end up not containing the nul-byte, the 16th byte will have to nul-terminated anyways. For exampl