Re: [PATCH 03/36] tty/vt: consolemap: define UNI_* macros for constants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07. 06. 22, 15:21, Ilpo Järvinen wrote:
On Tue, 7 Jun 2022, Jiri Slaby wrote:

The code uses constants for sizes of dictionary substructures on many
places. Define 3 macros and use them in the code, so that loop bounds,
local variables and the dictionary always match. (And the loop bounds
are obvious now too.)

Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>

-			for (k = 0; k < 64; k++) {
+			for (k = 0; k < UNI_ROW_GLYPHS; k++) {
  				glyph = p2[k];
  				if (glyph >= 0 && glyph < MAX_GLYPH
  					       && q[glyph] < 32)

Probably unrelated to this change but what's that < 32? It seems to appear
twice related to the inverse mapping (and you didn't end up naming it).

That's ascii C0 test _IMO_.

thanks,
--
js
suse labs



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux