comparison src/charset.c @ 112434:9de5a68b57e1

Promote SSDATA macro from gtkutil.c and xsmfns.c to lisp.h.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 22 Jan 2011 18:56:06 -0800
parents 42e22c4f06b7
children
comparison
equal deleted inserted replaced
112433:7b649f6eac4f 112434:9de5a68b57e1
664 GCPRO1 (range); 664 GCPRO1 (range);
665 665
666 c = temp_charset_work->min_char; 666 c = temp_charset_work->min_char;
667 stop = (temp_charset_work->max_char < 0x20000 667 stop = (temp_charset_work->max_char < 0x20000
668 ? temp_charset_work->max_char : 0xFFFF); 668 ? temp_charset_work->max_char : 0xFFFF);
669 669
670 while (1) 670 while (1)
671 { 671 {
672 int index = GET_TEMP_CHARSET_WORK_ENCODER (c); 672 int index = GET_TEMP_CHARSET_WORK_ENCODER (c);
673 673
674 if (index >= from_idx && index <= to_idx) 674 if (index >= from_idx && index <= to_idx)
1826 code = INDEX_TO_CODE_POINT (charset, code); 1826 code = INDEX_TO_CODE_POINT (charset, code);
1827 } 1827 }
1828 else 1828 else
1829 { 1829 {
1830 code = GET_TEMP_CHARSET_WORK_ENCODER (c); 1830 code = GET_TEMP_CHARSET_WORK_ENCODER (c);
1831 code = INDEX_TO_CODE_POINT (charset, code); 1831 code = INDEX_TO_CODE_POINT (charset, code);
1832 } 1832 }
1833 } 1833 }
1834 else /* method == CHARSET_METHOD_OFFSET */ 1834 else /* method == CHARSET_METHOD_OFFSET */
1835 { 1835 {
1836 int code_index = c - CHARSET_CODE_OFFSET (charset); 1836 int code_index = c - CHARSET_CODE_OFFSET (charset);
2293 void 2293 void
2294 init_charset (void) 2294 init_charset (void)
2295 { 2295 {
2296 Lisp_Object tempdir; 2296 Lisp_Object tempdir;
2297 tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory); 2297 tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory);
2298 if (access ((char *) SDATA (tempdir), 0) < 0) 2298 if (access (SSDATA (tempdir), 0) < 0)
2299 { 2299 {
2300 dir_warning ("Error: charsets directory (%s) does not exist.\n\ 2300 dir_warning ("Error: charsets directory (%s) does not exist.\n\
2301 Emacs will not function correctly without the character map files.\n\ 2301 Emacs will not function correctly without the character map files.\n\
2302 Please check your installation!\n", 2302 Please check your installation!\n",
2303 tempdir); 2303 tempdir);
2429 MAX_5_BYTE_CHAR + 1); 2429 MAX_5_BYTE_CHAR + 1);
2430 charset_unibyte = charset_iso_8859_1; 2430 charset_unibyte = charset_iso_8859_1;
2431 } 2431 }
2432 2432
2433 #endif /* emacs */ 2433 #endif /* emacs */
2434