comparison src/mule-coding.c @ 197:acd284d43ca1 r20-3b25

Import from CVS: tag r20-3b25
author cvs
date Mon, 13 Aug 2007 10:00:02 +0200
parents 3d6bfa290dbd
children e45d5e7c476e
comparison
equal deleted inserted replaced
196:58e0786448ca 197:acd284d43ca1
36 36
37 Lisp_Object Vkeyboard_coding_system; 37 Lisp_Object Vkeyboard_coding_system;
38 Lisp_Object Vterminal_coding_system; 38 Lisp_Object Vterminal_coding_system;
39 Lisp_Object Vcoding_system_for_read; 39 Lisp_Object Vcoding_system_for_read;
40 Lisp_Object Vcoding_system_for_write; 40 Lisp_Object Vcoding_system_for_write;
41 Lisp_Object Vpathname_coding_system; 41 Lisp_Object Vfile_name_coding_system;
42 42
43 /* Table of symbols identifying each coding category. */ 43 /* Table of symbols identifying each coding category. */
44 Lisp_Object coding_category_symbol[CODING_CATEGORY_LAST + 1]; 44 Lisp_Object coding_category_symbol[CODING_CATEGORY_LAST + 1];
45 45
46 /* Coding system currently associated with each coding category. */ 46 /* Coding system currently associated with each coding category. */
4444 static Extbyte_dynarr *conversion_out_dynarr; 4444 static Extbyte_dynarr *conversion_out_dynarr;
4445 static Bufbyte_dynarr *conversion_in_dynarr; 4445 static Bufbyte_dynarr *conversion_in_dynarr;
4446 4446
4447 /* Determine coding system from coding format */ 4447 /* Determine coding system from coding format */
4448 4448
4449 #define PATHNAME_CODING_SYSTEM \ 4449 #define FILE_NAME_CODING_SYSTEM \
4450 ((NILP (Vpathname_coding_system) || \ 4450 ((NILP (Vfile_name_coding_system) || \
4451 (EQ ((Vpathname_coding_system), Qbinary))) ? \ 4451 (EQ ((Vfile_name_coding_system), Qbinary))) ? \
4452 Qnil : Fget_coding_system (Vpathname_coding_system)) 4452 Qnil : Fget_coding_system (Vfile_name_coding_system))
4453 4453
4454 /* #### not correct for all values of `fmt'! */ 4454 /* #### not correct for all values of `fmt'! */
4455 #define FMT_CODING_SYSTEM(fmt) \ 4455 #define FMT_CODING_SYSTEM(fmt) \
4456 (((fmt) == FORMAT_FILENAME) ? PATHNAME_CODING_SYSTEM : \ 4456 (((fmt) == FORMAT_FILENAME) ? FILE_NAME_CODING_SYSTEM : \
4457 ((fmt) == FORMAT_CTEXT ) ? Fget_coding_system (Qctext) : \ 4457 ((fmt) == FORMAT_CTEXT ) ? Fget_coding_system (Qctext) : \
4458 ((fmt) == FORMAT_TERMINAL) ? PATHNAME_CODING_SYSTEM : \ 4458 ((fmt) == FORMAT_TERMINAL) ? FILE_NAME_CODING_SYSTEM : \
4459 Qnil) 4459 Qnil)
4460 4460
4461 extern CONST Extbyte * 4461 extern CONST Extbyte *
4462 convert_to_external_format (CONST Bufbyte *ptr, 4462 convert_to_external_format (CONST Bufbyte *ptr,
4463 Bytecount len, 4463 Bytecount len,
4746 `write-region-pre-hook', etc. Use those variables instead of this one 4746 `write-region-pre-hook', etc. Use those variables instead of this one
4747 for permanent changes to the environment. 4747 for permanent changes to the environment.
4748 */ ); 4748 */ );
4749 Vcoding_system_for_write = Qnil; 4749 Vcoding_system_for_write = Qnil;
4750 4750
4751 DEFVAR_LISP ("pathname-coding-system", &Vpathname_coding_system /* 4751 DEFVAR_LISP ("file-name-coding-system", &Vfile_name_coding_system /*
4752 Coding system used to convert pathnames when accessing files. 4752 Coding system used to convert pathnames when accessing files.
4753 */ ); 4753 */ );
4754 Vpathname_coding_system = Qnil; 4754 Vfile_name_coding_system = Qnil;
4755 4755
4756 DEFVAR_BOOL ("enable-multibyte-characters", &enable_multibyte_characters /* 4756 DEFVAR_BOOL ("enable-multibyte-characters", &enable_multibyte_characters /*
4757 Non-nil means the buffer contents are regarded as multi-byte form 4757 Non-nil means the buffer contents are regarded as multi-byte form
4758 of characters, not a binary code. This affects the display, file I/O, 4758 of characters, not a binary code. This affects the display, file I/O,
4759 and behaviors of various editing commands. 4759 and behaviors of various editing commands.