diff options
| author | Joakim Verona | 2012-08-19 02:44:11 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-08-19 02:44:11 +0200 |
| commit | 5436d1df5e2ba0b4d4f72b03a1cd09b20403654b (patch) | |
| tree | 532faa27319b3bb199d414dc85e63a58246d30b0 /src/font.c | |
| parent | d02344322b0d2fea8dd9ad9dd0a6c70e058f967b (diff) | |
| parent | e757f1c6f393cf82057dbee0a4325b07f0fd55c4 (diff) | |
| download | emacs-5436d1df5e2ba0b4d4f72b03a1cd09b20403654b.tar.gz emacs-5436d1df5e2ba0b4d4f72b03a1cd09b20403654b.zip | |
upstream
Diffstat (limited to 'src/font.c')
| -rw-r--r-- | src/font.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/font.c b/src/font.c index c3040b8aa3f..5b9e4f1cfcf 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -23,9 +23,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <float.h> | 24 | #include <float.h> |
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <ctype.h> | ||
| 27 | #include <setjmp.h> | 26 | #include <setjmp.h> |
| 28 | 27 | ||
| 28 | #include <c-ctype.h> | ||
| 29 | |||
| 29 | #include "lisp.h" | 30 | #include "lisp.h" |
| 30 | #include "character.h" | 31 | #include "character.h" |
| 31 | #include "buffer.h" | 32 | #include "buffer.h" |
| @@ -1079,7 +1080,7 @@ font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font) | |||
| 1079 | p = f[XLFD_POINT_INDEX]; | 1080 | p = f[XLFD_POINT_INDEX]; |
| 1080 | if (*p == '[') | 1081 | if (*p == '[') |
| 1081 | point_size = parse_matrix (p); | 1082 | point_size = parse_matrix (p); |
| 1082 | else if (isdigit (*p)) | 1083 | else if (c_isdigit (*p)) |
| 1083 | point_size = atoi (p), point_size /= 10; | 1084 | point_size = atoi (p), point_size /= 10; |
| 1084 | if (point_size >= 0) | 1085 | if (point_size >= 0) |
| 1085 | ASET (font, FONT_SIZE_INDEX, make_float (point_size)); | 1086 | ASET (font, FONT_SIZE_INDEX, make_float (point_size)); |
| @@ -1346,7 +1347,7 @@ font_parse_fcname (char *name, ptrdiff_t len, Lisp_Object font) | |||
| 1346 | { | 1347 | { |
| 1347 | int decimal = 0, size_found = 1; | 1348 | int decimal = 0, size_found = 1; |
| 1348 | for (q = p + 1; *q && *q != ':'; q++) | 1349 | for (q = p + 1; *q && *q != ':'; q++) |
| 1349 | if (! isdigit (*q)) | 1350 | if (! c_isdigit (*q)) |
| 1350 | { | 1351 | { |
| 1351 | if (*q != '.' || decimal) | 1352 | if (*q != '.' || decimal) |
| 1352 | { | 1353 | { |
| @@ -1474,7 +1475,7 @@ font_parse_fcname (char *name, ptrdiff_t len, Lisp_Object font) | |||
| 1474 | 1475 | ||
| 1475 | /* Scan backwards from the end, looking for a size. */ | 1476 | /* Scan backwards from the end, looking for a size. */ |
| 1476 | for (p = name + len - 1; p >= name; p--) | 1477 | for (p = name + len - 1; p >= name; p--) |
| 1477 | if (!isdigit (*p)) | 1478 | if (!c_isdigit (*p)) |
| 1478 | break; | 1479 | break; |
| 1479 | 1480 | ||
| 1480 | if ((p < name + len - 1) && ((p + 1 == name) || *p == ' ')) | 1481 | if ((p < name + len - 1) && ((p + 1 == name) || *p == ' ')) |