comparison src/coding.h @ 90054:f2ebccfa87d4

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-74 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-709 Update from CVS: src/indent.c (Fvertical_motion): Fix last change. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-710 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-715 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-74 Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 08 Dec 2004 05:02:30 +0000
parents 67cdf4445614 44a9e60f1d12
children 637c6bc8a26f
comparison
equal deleted inserted replaced
90053:fff5f1a61d92 90054:f2ebccfa87d4
1 /* Header for coding system handler. 1 /* Header for coding system handler.
2 Copyright (C) 2004 Free Software Foundation, Inc.
2 Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. 3 Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
3 Licensed to the Free Software Foundation. 4 Licensed to the Free Software Foundation.
4 Copyright (C) 2003 5 Copyright (C) 2003
5 National Institute of Advanced Industrial Science and Technology (AIST) 6 National Institute of Advanced Industrial Science and Technology (AIST)
6 Registration Number H13PRO009 7 Registration Number H13PRO009
577 578
578 /* Encode the file name NAME using the specified coding system 579 /* Encode the file name NAME using the specified coding system
579 for file names, if any. */ 580 for file names, if any. */
580 #define ENCODE_FILE(name) \ 581 #define ENCODE_FILE(name) \
581 (! NILP (Vfile_name_coding_system) \ 582 (! NILP (Vfile_name_coding_system) \
582 && XFASTINT (Vfile_name_coding_system) != 0 \ 583 && !EQ (Vfile_name_coding_system, make_number (0)) \
583 ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ 584 ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \
584 : (! NILP (Vdefault_file_name_coding_system) \ 585 : (! NILP (Vdefault_file_name_coding_system) \
585 && XFASTINT (Vdefault_file_name_coding_system) != 0 \ 586 && !EQ (Vdefault_file_name_coding_system, make_number (0)) \
586 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ 587 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \
587 : name)) 588 : name))
588 589
589 590
590 /* Decode the file name NAME using the specified coding system 591 /* Decode the file name NAME using the specified coding system
591 for file names, if any. */ 592 for file names, if any. */
592 #define DECODE_FILE(name) \ 593 #define DECODE_FILE(name) \
593 (! NILP (Vfile_name_coding_system) \ 594 (! NILP (Vfile_name_coding_system) \
594 && XFASTINT (Vfile_name_coding_system) != 0 \ 595 && !EQ (Vfile_name_coding_system, make_number (0)) \
595 ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ 596 ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \
596 : (! NILP (Vdefault_file_name_coding_system) \ 597 : (! NILP (Vdefault_file_name_coding_system) \
597 && XFASTINT (Vdefault_file_name_coding_system) != 0 \ 598 && !EQ (Vdefault_file_name_coding_system, make_number (0)) \
598 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ 599 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \
599 : name)) 600 : name))
600 601
601 602
602 #ifdef WINDOWSNT 603 #ifdef WINDOWSNT
603 /* Encode the string STR using the specified coding system 604 /* Encode the string STR using the specified coding system
604 for w32 system functions, if any. */ 605 for w32 system functions, if any. */
605 #define ENCODE_SYSTEM(str) \ 606 #define ENCODE_SYSTEM(str) \
606 (! NILP (Vlocale_coding_system) \ 607 (! NILP (Vlocale_coding_system) \
607 && XFASTINT (Vlocale_coding_system) != 0 \ 608 && !EQ (Vlocale_coding_system, make_number (0)) \
608 ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ 609 ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \
609 : str) 610 : str)
610 611
611 /* Decode the string STR using the specified coding system 612 /* Decode the string STR using the specified coding system
612 for w32 system functions, if any. */ 613 for w32 system functions, if any. */
613 #define DECODE_SYSTEM(name) \ 614 #define DECODE_SYSTEM(name) \
614 (! NILP (Vlocale_coding_system) \ 615 (! NILP (Vlocale_coding_system) \
615 && XFASTINT (Vlocale_coding_system) != 0 \ 616 && !EQ (Vlocale_coding_system, make_number (0)) \
616 ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ 617 ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \
617 : str) 618 : str)
618 619
619 #else /* WINDOWSNT */ 620 #else /* WINDOWSNT */
620 621
621 #define ENCODE_SYSTEM(str) string_make_unibyte(str) 622 #define ENCODE_SYSTEM(str) string_make_unibyte(str)