Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5e92b1ca
Commit
5e92b1ca
authored
Nov 23, 2004
by
Stefan Monnier
Browse files
(ENCODE_FILE, DECODE_FILE, ENCODE_SYSTEM, DECODE_SYSTEM):
Don't use XFASTINT blindly.
parent
8fe48a6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/coding.h
src/coding.h
+7
-6
No files found.
src/coding.h
View file @
5e92b1ca
/* Header for coding system handler.
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
Licensed to the Free Software Foundation.
...
...
@@ -572,10 +573,10 @@ struct coding_system
for file names, if any. */
#define ENCODE_FILE(name) \
(! NILP (Vfile_name_coding_system) \
&&
XFASTINT
(Vfile_name_coding_system
) != 0
\
&&
!EQ
(Vfile_name_coding_system
, make_number (0))
\
? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \
: (! NILP (Vdefault_file_name_coding_system) \
&&
XFASTINT
(Vdefault_file_name_coding_system
) != 0
\
&&
!EQ
(Vdefault_file_name_coding_system
, make_number (0))
\
? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \
: name))
...
...
@@ -583,10 +584,10 @@ struct coding_system
for file names, if any. */
#define DECODE_FILE(name) \
(! NILP (Vfile_name_coding_system) \
&&
XFASTINT
(Vfile_name_coding_system
) != 0
\
&&
!EQ
(Vfile_name_coding_system
, make_number (0))
\
? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \
: (! NILP (Vdefault_file_name_coding_system) \
&&
XFASTINT
(Vdefault_file_name_coding_system
) != 0
\
&&
!EQ
(Vdefault_file_name_coding_system
, make_number (0))
\
? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \
: name))
...
...
@@ -595,7 +596,7 @@ struct coding_system
for w32 system functions, if any. */
#define ENCODE_SYSTEM(str) \
(! NILP (Vlocale_coding_system) \
&&
XFASTINT
(Vlocale_coding_system
) != 0
\
&&
!EQ
(Vlocale_coding_system
, make_number (0))
\
? code_convert_string_norecord (str, Vlocale_coding_system, 1) \
: str)
...
...
@@ -603,7 +604,7 @@ struct coding_system
for w32 system functions, if any. */
#define DECODE_SYSTEM(name) \
(! NILP (Vlocale_coding_system) \
&&
XFASTINT
(Vlocale_coding_system
) != 0
\
&&
!EQ
(Vlocale_coding_system
, make_number (0))
\
? code_convert_string_norecord (str, Vlocale_coding_system, 0) \
: str)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment