comparison src/charset.c @ 53528:dbd73534e01e

(Fdeclare_equiv_charset): Fix docstring.
author Kenichi Handa <handa@m17n.org>
date Wed, 07 Jan 2004 12:50:03 +0000
parents 695cf19ef79e
children 7abf0e14a59e
comparison
equal deleted inserted replaced
53527:b3aa44b71705 53528:dbd73534e01e
758 return (final_char <= '?' ? make_number (final_char) : Qnil); 758 return (final_char <= '?' ? make_number (final_char) : Qnil);
759 } 759 }
760 760
761 DEFUN ("declare-equiv-charset", Fdeclare_equiv_charset, Sdeclare_equiv_charset, 761 DEFUN ("declare-equiv-charset", Fdeclare_equiv_charset, Sdeclare_equiv_charset,
762 4, 4, 0, 762 4, 4, 0,
763 doc: /* Declare a charset of DIMENSION, CHARS, FINAL-CHAR is the same as CHARSET. 763 doc: /* Declare an equivalent charset for ISO-2022 decoding.
764 CHARSET should be defined by `defined-charset' in advance. */) 764
765 (dimension, chars, final_char, charset_symbol) 765 On decoding by an ISO-2022 base coding system, when a charset
766 Lisp_Object dimension, chars, final_char, charset_symbol; 766 specified by DIMENSION, CHARS, and FINAL-CHAR is designated, behave as
767 { 767 if CHARSET is designated instead. */)
768 int charset; 768 (dimension, chars, final_char, charset)
769 Lisp_Object dimension, chars, final_char, charset;
770 {
771 int charset_id;
769 772
770 CHECK_NUMBER (dimension); 773 CHECK_NUMBER (dimension);
771 CHECK_NUMBER (chars); 774 CHECK_NUMBER (chars);
772 CHECK_NUMBER (final_char); 775 CHECK_NUMBER (final_char);
773 CHECK_SYMBOL (charset_symbol); 776 CHECK_SYMBOL (charset);
774 777
775 if (XINT (dimension) != 1 && XINT (dimension) != 2) 778 if (XINT (dimension) != 1 && XINT (dimension) != 2)
776 error ("Invalid DIMENSION %d, it should be 1 or 2", XINT (dimension)); 779 error ("Invalid DIMENSION %d, it should be 1 or 2", XINT (dimension));
777 if (XINT (chars) != 94 && XINT (chars) != 96) 780 if (XINT (chars) != 94 && XINT (chars) != 96)
778 error ("Invalid CHARS %d, it should be 94 or 96", XINT (chars)); 781 error ("Invalid CHARS %d, it should be 94 or 96", XINT (chars));
779 if (XINT (final_char) < '0' || XFASTINT (final_char) > '~') 782 if (XINT (final_char) < '0' || XFASTINT (final_char) > '~')
780 error ("Invalid FINAL-CHAR %c, it should be `0'..`~'", XINT (chars)); 783 error ("Invalid FINAL-CHAR %c, it should be `0'..`~'", XINT (chars));
781 if ((charset = get_charset_id (charset_symbol)) < 0) 784 if ((charset_id = get_charset_id (charset)) < 0)
782 error ("Invalid charset %s", SDATA (SYMBOL_NAME (charset_symbol))); 785 error ("Invalid charset %s", SDATA (SYMBOL_NAME (charset)));
783 786
784 ISO_CHARSET_TABLE (dimension, chars, final_char) = charset; 787 ISO_CHARSET_TABLE (dimension, chars, final_char) = charset_id;
785 return Qnil; 788 return Qnil;
786 } 789 }
787 790
788 /* Return information about charsets in the text at PTR of NBYTES 791 /* Return information about charsets in the text at PTR of NBYTES
789 bytes, which are NCHARS characters. The value is: 792 bytes, which are NCHARS characters. The value is: