1 |
/* Header for coding system handler. |
/* Header for coding system handler. |
2 |
|
Copyright (C) 2004 Free Software Foundation, Inc. |
3 |
Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. |
Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN. |
4 |
Licensed to the Free Software Foundation. |
Licensed to the Free Software Foundation. |
5 |
|
|
573 |
for file names, if any. */ |
for file names, if any. */ |
574 |
#define ENCODE_FILE(name) \ |
#define ENCODE_FILE(name) \ |
575 |
(! NILP (Vfile_name_coding_system) \ |
(! NILP (Vfile_name_coding_system) \ |
576 |
&& XFASTINT (Vfile_name_coding_system) != 0 \ |
&& !EQ (Vfile_name_coding_system, make_number (0)) \ |
577 |
? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ |
? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ |
578 |
: (! NILP (Vdefault_file_name_coding_system) \ |
: (! NILP (Vdefault_file_name_coding_system) \ |
579 |
&& XFASTINT (Vdefault_file_name_coding_system) != 0 \ |
&& !EQ (Vdefault_file_name_coding_system, make_number (0)) \ |
580 |
? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ |
? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ |
581 |
: name)) |
: name)) |
582 |
|
|
584 |
for file names, if any. */ |
for file names, if any. */ |
585 |
#define DECODE_FILE(name) \ |
#define DECODE_FILE(name) \ |
586 |
(! NILP (Vfile_name_coding_system) \ |
(! NILP (Vfile_name_coding_system) \ |
587 |
&& XFASTINT (Vfile_name_coding_system) != 0 \ |
&& !EQ (Vfile_name_coding_system, make_number (0)) \ |
588 |
? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ |
? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ |
589 |
: (! NILP (Vdefault_file_name_coding_system) \ |
: (! NILP (Vdefault_file_name_coding_system) \ |
590 |
&& XFASTINT (Vdefault_file_name_coding_system) != 0 \ |
&& !EQ (Vdefault_file_name_coding_system, make_number (0)) \ |
591 |
? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ |
? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ |
592 |
: name)) |
: name)) |
593 |
|
|
596 |
for w32 system functions, if any. */ |
for w32 system functions, if any. */ |
597 |
#define ENCODE_SYSTEM(str) \ |
#define ENCODE_SYSTEM(str) \ |
598 |
(! NILP (Vlocale_coding_system) \ |
(! NILP (Vlocale_coding_system) \ |
599 |
&& XFASTINT (Vlocale_coding_system) != 0 \ |
&& !EQ (Vlocale_coding_system, make_number (0)) \ |
600 |
? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ |
? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ |
601 |
: str) |
: str) |
602 |
|
|
604 |
for w32 system functions, if any. */ |
for w32 system functions, if any. */ |
605 |
#define DECODE_SYSTEM(name) \ |
#define DECODE_SYSTEM(name) \ |
606 |
(! NILP (Vlocale_coding_system) \ |
(! NILP (Vlocale_coding_system) \ |
607 |
&& XFASTINT (Vlocale_coding_system) != 0 \ |
&& !EQ (Vlocale_coding_system, make_number (0)) \ |
608 |
? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ |
? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ |
609 |
: str) |
: str) |
610 |
|
|