Revert "vt: fix comment vs definition mismatch"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2025 09:20:25 +0000 (11:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Apr 2025 09:20:25 +0000 (11:20 +0200)
This reverts commit 8bfabff0bfff8fbbe90673d1a557d15c42b4494a.

A new version of the series was submitted, so it's easier to revert the
old one and add the new one due to the changes invovled.

Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/gen_ucs_recompose.py
drivers/tty/vt/gen_ucs_width.py
drivers/tty/vt/ucs_recompose.c
drivers/tty/vt/ucs_width.c

index dc176d32e225f87d61db914db5b02273fb313d69..64418803e49e7f23a1c1a97f9e27625e30917082 100755 (executable)
@@ -289,8 +289,8 @@ static int recomposition_compare(const void *key, const void *element)
 /**
  * Attempt to recompose two Unicode characters into a single character.
  *
- * @param base: Base Unicode code point (UCS-4)
- * @param combining: Combining mark Unicode code point (UCS-4)
+ * @param previous: Previous Unicode code point (UCS-4)
+ * @param current: Current Unicode code point (UCS-4)
  * Return: Recomposed Unicode code point, or 0 if no recomposition is possible
  */
 uint32_t ucs_recompose(uint32_t base, uint32_t combining)
@@ -301,6 +301,7 @@ uint32_t ucs_recompose(uint32_t base, uint32_t combining)
                return 0;
 
        struct compare_key key = {{ base, combining }};
+
        struct recomposition *result =
                __inline_bsearch(&key, recomposition_table,
                                 ARRAY_SIZE(recomposition_table),
index e65f43e2080ac4722d4ab16681baa4f0b6e50bef..c6cbc93e83f2a1c8dfd0fdf916c368253acd63d0 100755 (executable)
@@ -292,7 +292,7 @@ static bool is_in_interval32(uint32_t cp, const struct interval32 *intervals, si
 /**
  * Determine if a Unicode code point is zero-width.
  *
- * @param cp: Unicode code point (UCS-4)
+ * @param ucs: Unicode code point (UCS-4)
  * Return: true if the character is zero-width, false otherwise
  */
 bool ucs_is_zero_width(uint32_t cp)
@@ -305,7 +305,7 @@ bool ucs_is_zero_width(uint32_t cp)
 /**
  * Determine if a Unicode code point is double-width.
  *
- * @param cp: Unicode code point (UCS-4)
+ * @param ucs: Unicode code point (UCS-4)
  * Return: true if the character is double-width, false otherwise
  */
 bool ucs_is_double_width(uint32_t cp)
index 52cde1517f89335d2c2874107942197acff772a9..5c30c989def390d505fbaf1212e117bb9253e68c 100644 (file)
@@ -147,8 +147,8 @@ static int recomposition_compare(const void *key, const void *element)
 /**
  * Attempt to recompose two Unicode characters into a single character.
  *
- * @param base: Base Unicode code point (UCS-4)
- * @param combining: Combining mark Unicode code point (UCS-4)
+ * @param previous: Previous Unicode code point (UCS-4)
+ * @param current: Current Unicode code point (UCS-4)
  * Return: Recomposed Unicode code point, or 0 if no recomposition is possible
  */
 uint32_t ucs_recompose(uint32_t base, uint32_t combining)
@@ -159,6 +159,7 @@ uint32_t ucs_recompose(uint32_t base, uint32_t combining)
                return 0;
 
        struct compare_key key = { base, combining };
+
        struct recomposition *result =
                __inline_bsearch(&key, recomposition_table,
                                 ARRAY_SIZE(recomposition_table),
index 4d5a0021e33bdd50ebaf48865b6ec65b70102887..060aa8ae7f160cfa6884df35844da89129fcd02b 100644 (file)
@@ -512,7 +512,7 @@ static bool is_in_interval32(uint32_t cp, const struct interval32 *intervals, si
 /**
  * Determine if a Unicode code point is zero-width.
  *
- * @param cp: Unicode code point (UCS-4)
+ * @param ucs: Unicode code point (UCS-4)
  * Return: true if the character is zero-width, false otherwise
  */
 bool ucs_is_zero_width(uint32_t cp)
@@ -525,7 +525,7 @@ bool ucs_is_zero_width(uint32_t cp)
 /**
  * Determine if a Unicode code point is double-width.
  *
- * @param cp: Unicode code point (UCS-4)
+ * @param ucs: Unicode code point (UCS-4)
  * Return: true if the character is double-width, false otherwise
  */
 bool ucs_is_double_width(uint32_t cp)