From 58a44b6ac317c9a17bcdd208e4ec33ff9772429e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 17 Sep 2024 15:23:47 -0700 Subject: [PATCH] Fix misuse of toupper in sfnt_parse_style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/sfntfont.c: Include c-ctype.h, not ctype.h. (sfnt_parse_style): Upcase just initial ASCII letters; that’s good enough here. --- src/sfntfont.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);