diff options
| author | Paul Eggert | 2012-08-16 14:58:44 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-16 14:58:44 -0700 |
| commit | 620f13b0612810324592ab2d2b4e5a5dab27f981 (patch) | |
| tree | 844d21f0c90ede1887eb699058398f5f9a81f069 /src/font.c | |
| parent | 85c2386bbe5d7957cf5750b6f96b2868f83eedf4 (diff) | |
| download | emacs-620f13b0612810324592ab2d2b4e5a5dab27f981.tar.gz emacs-620f13b0612810324592ab2d2b4e5a5dab27f981.zip | |
Use ASCII tests for character types.
* admin/merge-gnulib (GNULIB_MODULES): Add c-ctype.
* lwlib/lwlib-Xaw.c, lwlib/lwlib.c, lwlib/xlwmenu.c:
Don't include <ctype.h>; no longer needed.
* lwlib/lwlib-Xaw.c (openFont):
* lwlib/xlwmenu.c (openXftFont): Test just for ASCII digits.
* src/category.c, src/dispnew.c, src/doprnt.c, src/editfns.c, src/syntax.c
* src/term.c, src/xfns.c, src/xterm.c:
Don't include <ctype.h>; was not needed.
* src/charset.c, src/doc.c, src/fileio.c, src/font.c, src/frame.c:
* src/gtkutil.c, src/image.c, src/sysdep.c, src/xfaces.c:
Include <c-ctype.h> instead of <ctype.h>.
* src/nsterm.m: Include <c-ctype.h>.
* src/charset.c (read_hex):
* src/doc.c (Fsnarf_documentation):
* src/fileio.c (IS_DRIVE) [WINDOWSNT]:
(DRIVE_LETTER) [DOS_NT]:
(Ffile_name_directory, Fexpand_file_name)
(Fsubstitute_in_file_name):
* src/font.c (font_parse_xlfd, font_parse_fcname):
* src/frame.c (x_set_font_backend):
* src/gtkutil.c (xg_get_font):
* src/image.c (xbm_scan, xpm_scan, pbm_scan_number):
* src/nsimage.m (hexchar):
* src/nsterm.m (ns_xlfd_to_fontname):
* src/sysdep.c (system_process_attributes):
* src/xfaces.c (hash_string_case_insensitive):
Use C-locale tests instead of locale-specific tests for character
types, since we want the ASCII interpretation here, not the
interpretation suitable for whatever happens to be the current locale.
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 == ' ')) |