From: Kenichi Handa Date: Mon, 20 Apr 1998 02:14:57 +0000 (+0000) Subject: (setup_coding_system): For a type 4 coding system, X-Git-Tag: emacs-20.3~1411 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d21ca14d4822593ae4a2a11fd75d940fbf057c3d;p=emacs.git (setup_coding_system): For a type 4 coding system, FLAGS member of coding spec is a cons of CCL program symbols. --- diff --git a/src/coding.c b/src/coding.c index 4b70b259314..4dc4f68143f 100644 --- a/src/coding.c +++ b/src/coding.c @@ -3045,12 +3045,18 @@ setup_coding_system (coding_system, coding) |= CODING_REQUIRE_DECODING_MASK | CODING_REQUIRE_ENCODING_MASK; { Lisp_Object val = XVECTOR (coding_spec)->contents[4]; + Lisp_Object decoder, encoder; + if (CONSP (val) - && VECTORP (XCONS (val)->car) - && VECTORP (XCONS (val)->cdr)) + && SYMBOLP (XCONS (val)->car) + && !NILP (decoder = Fget (XCONS (val)->car, Qccl_program_idx)) + && (decoder = Fcdr (Faref (Vccl_program_table, decoder))) + && SYMBOLP (XCONS (val)->cdr) + && !NILP (encoder = Fget (XCONS (val)->cdr, Qccl_program_idx)) + && (encoder = Fcdr (Faref (Vccl_program_table, encoder)))) { - setup_ccl_program (&(coding->spec.ccl.decoder), XCONS (val)->car); - setup_ccl_program (&(coding->spec.ccl.encoder), XCONS (val)->cdr); + setup_ccl_program (&(coding->spec.ccl.decoder), decoder); + setup_ccl_program (&(coding->spec.ccl.encoder), encoder); } else goto label_invalid_coding_system;