aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.h
diff options
context:
space:
mode:
authorStefan Monnier2004-11-23 05:21:31 +0000
committerStefan Monnier2004-11-23 05:21:31 +0000
commit5e92b1caaf9b63bd4f8913901514da76a8fa415f (patch)
treeb2953347ad602cd19f8a7a5cc26c78cf3e796fc9 /src/coding.h
parent8fe48a6f120586a8df05b299f3079d267b7c5f9f (diff)
downloademacs-5e92b1caaf9b63bd4f8913901514da76a8fa415f.tar.gz
emacs-5e92b1caaf9b63bd4f8913901514da76a8fa415f.zip
(ENCODE_FILE, DECODE_FILE, ENCODE_SYSTEM, DECODE_SYSTEM):
Don't use XFASTINT blindly.
Diffstat (limited to 'src/coding.h')
-rw-r--r--src/coding.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/coding.h b/src/coding.h
index bc8af2cc4a2..a0732305ada 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -1,4 +1,5 @@
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 5
@@ -572,10 +573,10 @@ struct coding_system
572 for file names, if any. */ 573 for file names, if any. */
573#define ENCODE_FILE(name) \ 574#define ENCODE_FILE(name) \
574 (! NILP (Vfile_name_coding_system) \ 575 (! NILP (Vfile_name_coding_system) \
575 && XFASTINT (Vfile_name_coding_system) != 0 \ 576 && !EQ (Vfile_name_coding_system, make_number (0)) \
576 ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ 577 ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \
577 : (! NILP (Vdefault_file_name_coding_system) \ 578 : (! NILP (Vdefault_file_name_coding_system) \
578 && XFASTINT (Vdefault_file_name_coding_system) != 0 \ 579 && !EQ (Vdefault_file_name_coding_system, make_number (0)) \
579 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ 580 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \
580 : name)) 581 : name))
581 582
@@ -583,10 +584,10 @@ struct coding_system
583 for file names, if any. */ 584 for file names, if any. */
584#define DECODE_FILE(name) \ 585#define DECODE_FILE(name) \
585 (! NILP (Vfile_name_coding_system) \ 586 (! NILP (Vfile_name_coding_system) \
586 && XFASTINT (Vfile_name_coding_system) != 0 \ 587 && !EQ (Vfile_name_coding_system, make_number (0)) \
587 ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ 588 ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \
588 : (! NILP (Vdefault_file_name_coding_system) \ 589 : (! NILP (Vdefault_file_name_coding_system) \
589 && XFASTINT (Vdefault_file_name_coding_system) != 0 \ 590 && !EQ (Vdefault_file_name_coding_system, make_number (0)) \
590 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ 591 ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \
591 : name)) 592 : name))
592 593
@@ -595,7 +596,7 @@ struct coding_system
595 for w32 system functions, if any. */ 596 for w32 system functions, if any. */
596#define ENCODE_SYSTEM(str) \ 597#define ENCODE_SYSTEM(str) \
597 (! NILP (Vlocale_coding_system) \ 598 (! NILP (Vlocale_coding_system) \
598 && XFASTINT (Vlocale_coding_system) != 0 \ 599 && !EQ (Vlocale_coding_system, make_number (0)) \
599 ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ 600 ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \
600 : str) 601 : str)
601 602
@@ -603,7 +604,7 @@ struct coding_system
603 for w32 system functions, if any. */ 604 for w32 system functions, if any. */
604#define DECODE_SYSTEM(name) \ 605#define DECODE_SYSTEM(name) \
605 (! NILP (Vlocale_coding_system) \ 606 (! NILP (Vlocale_coding_system) \
606 && XFASTINT (Vlocale_coding_system) != 0 \ 607 && !EQ (Vlocale_coding_system, make_number (0)) \
607 ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ 608 ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \
608 : str) 609 : str)
609 610