Mercurial > emacs
comparison src/coding.h @ 21051:b5844e2bf088
(ENCODE_FILE): Moved from fileio.c. Use
default-file-name-coding-system if file-name-coding-system is nil.
(DECODE_FILE): New macro.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Tue, 03 Mar 1998 07:18:46 +0000 |
| parents | 7352e0598efa |
| children | 278c256defc6 |
comparison
equal
deleted
inserted
replaced
| 21050:13e905e1d33c | 21051:b5844e2bf088 |
|---|---|
| 485 else \ | 485 else \ |
| 486 s1 = c1 / 2 + ((c1 < 0x5F) ? 0x70 : 0xB0), \ | 486 s1 = c1 / 2 + ((c1 < 0x5F) ? 0x70 : 0xB0), \ |
| 487 s2 = c2 + 0x7E; \ | 487 s2 = c2 + 0x7E; \ |
| 488 } while (0) | 488 } while (0) |
| 489 | 489 |
| 490 /* Encode the file name NAME using the specified coding system | |
| 491 for file names, if any. */ | |
| 492 #define ENCODE_FILE(name) \ | |
| 493 (! NILP (Vfile_name_coding_system) \ | |
| 494 && XFASTINT (Vfile_name_coding_system) != 0 \ | |
| 495 ? Fencode_coding_string (name, Vfile_name_coding_system, Qt) \ | |
| 496 : (! NILP (Vdefault_file_name_coding_system) \ | |
| 497 && XFASTINT (Vdefault_file_name_coding_system) \ | |
| 498 ? Fencode_coding_string (name, Vdefault_file_name_coding_system, Qt) \ | |
| 499 : name)) | |
| 500 | |
| 501 /* Decode the file name NAME using the specified coding system | |
| 502 for file names, if any. */ | |
| 503 #define DECODE_FILE(name) \ | |
| 504 (! NILP (Vfile_name_coding_system) \ | |
| 505 && XFASTINT (Vfile_name_coding_system) != 0 \ | |
| 506 ? Fdecode_coding_string (name, Vfile_name_coding_system, Qt) \ | |
| 507 : (! NILP (Vdefault_file_name_coding_system) \ | |
| 508 && XFASTINT (Vdefault_file_name_coding_system) \ | |
| 509 ? Fdecode_coding_string (name, Vdefault_file_name_coding_system, Qt) \ | |
| 510 : name)) | |
| 511 | |
| 490 /* Extern declarations. */ | 512 /* Extern declarations. */ |
| 491 extern int decode_coding P_ ((struct coding_system *, unsigned char *, | 513 extern int decode_coding P_ ((struct coding_system *, unsigned char *, |
| 492 unsigned char *, int, int)); | 514 unsigned char *, int, int)); |
| 493 extern int encode_coding P_ ((struct coding_system *, unsigned char *, | 515 extern int encode_coding P_ ((struct coding_system *, unsigned char *, |
| 494 unsigned char *, int, int)); | 516 unsigned char *, int, int)); |
