1 |
/* Header for coding system handler. |
/* Header for coding system handler. |
2 |
Copyright (C) 2004 Free Software Foundation, Inc. |
Copyright (C) 2004, 2005 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 |
|
|
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 |
|
|
|
#ifdef WINDOWSNT |
|
594 |
/* Encode the string STR using the specified coding system |
/* Encode the string STR using the specified coding system |
595 |
for w32 system functions, if any. */ |
for system functions, if any. */ |
596 |
#define ENCODE_SYSTEM(str) \ |
#define ENCODE_SYSTEM(str) \ |
597 |
(! NILP (Vlocale_coding_system) \ |
(! NILP (Vlocale_coding_system) \ |
598 |
&& !EQ (Vlocale_coding_system, make_number (0)) \ |
&& !EQ (Vlocale_coding_system, make_number (0)) \ |
600 |
: str) |
: str) |
601 |
|
|
602 |
/* Decode the string STR using the specified coding system |
/* Decode the string STR using the specified coding system |
603 |
for w32 system functions, if any. */ |
for system functions, if any. */ |
604 |
#define DECODE_SYSTEM(name) \ |
#define DECODE_SYSTEM(name) \ |
605 |
(! NILP (Vlocale_coding_system) \ |
(! NILP (Vlocale_coding_system) \ |
606 |
&& !EQ (Vlocale_coding_system, make_number (0)) \ |
&& !EQ (Vlocale_coding_system, make_number (0)) \ |
607 |
? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ |
? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ |
608 |
: str) |
: str) |
609 |
|
|
|
#else /* WINDOWSNT */ |
|
|
|
|
|
#define ENCODE_SYSTEM(str) string_make_unibyte(str) |
|
|
#define DECODE_SYSTEM(name) name |
|
|
|
|
|
#endif /* !WINDOWSNT */ |
|
|
|
|
610 |
#define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1) |
#define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1) |
611 |
|
|
612 |
/* Extern declarations. */ |
/* Extern declarations. */ |