From: Paul Eggert Date: Tue, 17 Sep 2024 22:23:47 +0000 (-0700) Subject: Fix misuse of toupper in sfnt_parse_style X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c74055c1354dc9e6623eeee9d5b1a3098e2d5bf1;p=emacs.git Fix misuse of toupper in sfnt_parse_style * src/sfntfont.c: Include c-ctype.h, not ctype.h. (sfnt_parse_style): Upcase just initial ASCII letters; that’s good enough here. (cherry picked from commit 58a44b6ac317c9a17bcdd208e4ec33ff9772429e) --- diff --git a/src/sfntfont.c b/src/sfntfont.c index 8c02c05e7a6..f21b6c0782f 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c @@ -20,7 +20,7 @@ along with GNU Emacs. If not, see . */ #include #include -#include +#include #include "lisp.h" @@ -534,12 +534,12 @@ sfnt_parse_style (Lisp_Object style_name, struct sfnt_font_desc *desc) } /* This token is extraneous or was not recognized. Capitalize - the first letter and set it as the adstyle. */ + the first letter if it's ASCII lowercase, then set the token as + the adstyle. */ if (strlen (single)) { - if (islower (single[0])) - single[0] = toupper (single[0]); + single[0] = c_toupper (single[0]); if (NILP (desc->adstyle)) desc->adstyle = build_string (single);