1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

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.
This commit is contained in:
Paul Eggert 2024-09-17 15:23:47 -07:00
parent 43cde03fa5
commit 58a44b6ac3

View File

@ -20,7 +20,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
#include <fcntl.h>
#include <ctype.h>
#include <c-ctype.h>
#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);