Menu

#33 Remove unused built-in right-to-left text support

None
closed
None
9
2024-06-03
2024-06-02
No

Tux Paint's i18n.c has a now-empty look-up table lang_use_right_to_left_word which is used to fill wished_langs[].need_right_to_left_word. There is a note next to it:

/* FIXME: Remove! (We now require SDL_Pango all the time,
   so this is unnecessary -bjk 2023.04.30) */

FYI, a global exists in i18n.h that indicates how it was apparently used prior to that:

extern int need_right_to_left_word; // Words need to be reversed, too!
(e.g., Hebrew, but not Arabic)

That struct member is only used by textdir(), and since no language uses it, it appears textdir() itself can be removed, along with the rest of this stuff. It, in turn, is used by:
* do_render_button_label()
* do_prompt_image_flash_snd()
* do_open()
* do_slideshow()
* setup()

Discussion

  • William Kendrick

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,13 @@
     Tux Paint's `i18n.c` has a now-empty look-up table `lang_use_right_to_left_word` which is used to fill `wished_langs[].need_right_to_left_word`. There is a note next to it:
     ```
    -/* FIXME: Remove! (We now require SDL_Pango all the time, so this is unnecessary -bjk 2023.04.30) */
    +/* FIXME: Remove! (We now require SDL_Pango all the time,
    +   so this is unnecessary -bjk 2023.04.30) */
     ```
    
     FYI, a global exists in `i18n.h` that indicates how it was apparently used prior to that:
     ```
    -extern int need_right_to_left_word;     // Words need to be reversed, too! (e.g., Hebrew, but not Arabic)
    +extern int need_right_to_left_word; // Words need to be reversed, too!
    +(e.g., Hebrew, but not Arabic)
     ```
    
     That struct member is only used by `textdir()`, and since no language uses it, it appears `textdir()` itself can be removed, along with the rest of this stuff.  It, in turn, is used by:
    
    • Group: -->
     
  • William Kendrick

    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.