diff options
| author | Paul Eggert | 2024-09-17 15:23:47 -0700 |
|---|---|---|
| committer | Paul Eggert | 2024-09-17 16:39:25 -0700 |
| commit | 58a44b6ac317c9a17bcdd208e4ec33ff9772429e (patch) | |
| tree | b604e35d8576ef647a77d52145105eb99e586420 /src | |
| parent | 43cde03fa5a663a1509a762077c11eb57a60cee8 (diff) | |
| download | emacs-58a44b6ac317c9a17bcdd208e4ec33ff9772429e.tar.gz emacs-58a44b6ac317c9a17bcdd208e4ec33ff9772429e.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sfntfont.c | 8 |
1 files 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 <https://www.gnu.org/licenses/>. */ | |||
| 20 | #include <config.h> | 20 | #include <config.h> |
| 21 | 21 | ||
| 22 | #include <fcntl.h> | 22 | #include <fcntl.h> |
| 23 | #include <ctype.h> | 23 | #include <c-ctype.h> |
| 24 | 24 | ||
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | 26 | ||
| @@ -534,12 +534,12 @@ sfnt_parse_style (Lisp_Object style_name, struct sfnt_font_desc *desc) | |||
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | /* This token is extraneous or was not recognized. Capitalize | 536 | /* This token is extraneous or was not recognized. Capitalize |
| 537 | the first letter and set it as the adstyle. */ | 537 | the first letter if it's ASCII lowercase, then set the token as |
| 538 | the adstyle. */ | ||
| 538 | 539 | ||
| 539 | if (strlen (single)) | 540 | if (strlen (single)) |
| 540 | { | 541 | { |
| 541 | if (islower (single[0])) | 542 | single[0] = c_toupper (single[0]); |
| 542 | single[0] = toupper (single[0]); | ||
| 543 | 543 | ||
| 544 | if (NILP (desc->adstyle)) | 544 | if (NILP (desc->adstyle)) |
| 545 | desc->adstyle = build_string (single); | 545 | desc->adstyle = build_string (single); |