Mercurial > emacs
comparison src/coding.c @ 22341:572ba933a4bf
(code_convert_string_norecord): New function.
Does encoding or decoding but doesn't set Vlast_coding_system_used.
| author | Karl Heuer <kwzh@gnu.org> |
|---|---|
| date | Wed, 03 Jun 1998 14:41:07 +0000 |
| parents | 4786b00d2973 |
| children | 7ca919476042 |
comparison
equal
deleted
inserted
replaced
| 22340:65cdb6a99775 | 22341:572ba933a4bf |
|---|---|
| 4720 Lisp_Object string, coding_system, nocopy; | 4720 Lisp_Object string, coding_system, nocopy; |
| 4721 { | 4721 { |
| 4722 return code_convert_string1 (string, coding_system, nocopy, 1); | 4722 return code_convert_string1 (string, coding_system, nocopy, 1); |
| 4723 } | 4723 } |
| 4724 | 4724 |
| 4725 /* Encode or decode STRING according to CODING_SYSTEM. | |
| 4726 Do not set Vlast_coding_system_used. */ | |
| 4727 | |
| 4728 Lisp_Object | |
| 4729 code_convert_string_norecord (string, coding_system, encodep) | |
| 4730 Lisp_Object string, coding_system; | |
| 4731 int encodep; | |
| 4732 { | |
| 4733 struct coding_system coding; | |
| 4734 | |
| 4735 CHECK_STRING (string, 0); | |
| 4736 CHECK_SYMBOL (coding_system, 1); | |
| 4737 | |
| 4738 if (NILP (coding_system)) | |
| 4739 return string; | |
| 4740 | |
| 4741 if (setup_coding_system (Fcheck_coding_system (coding_system), &coding) < 0) | |
| 4742 error ("Invalid coding system: %s", XSYMBOL (coding_system)->name->data); | |
| 4743 | |
| 4744 coding.mode |= CODING_MODE_LAST_BLOCK; | |
| 4745 return code_convert_string (string, &coding, encodep, Qt); | |
| 4746 } | |
| 4725 | 4747 |
| 4726 DEFUN ("decode-sjis-char", Fdecode_sjis_char, Sdecode_sjis_char, 1, 1, 0, | 4748 DEFUN ("decode-sjis-char", Fdecode_sjis_char, Sdecode_sjis_char, 1, 1, 0, |
| 4727 "Decode a JISX0208 character of shift-jis encoding.\n\ | 4749 "Decode a JISX0208 character of shift-jis encoding.\n\ |
| 4728 CODE is the character code in SJIS.\n\ | 4750 CODE is the character code in SJIS.\n\ |
| 4729 Return the corresponding character.") | 4751 Return the corresponding character.") |
