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:
parent
43cde03fa5
commit
58a44b6ac3
1 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <ctype.h>
|
#include <c-ctype.h>
|
||||||
|
|
||||||
#include "lisp.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
|
/* 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 (strlen (single))
|
||||||
{
|
{
|
||||||
if (islower (single[0]))
|
single[0] = c_toupper (single[0]);
|
||||||
single[0] = toupper (single[0]);
|
|
||||||
|
|
||||||
if (NILP (desc->adstyle))
|
if (NILP (desc->adstyle))
|
||||||
desc->adstyle = build_string (single);
|
desc->adstyle = build_string (single);
|
||||||
|
|
Loading…
Reference in a new issue