comparison src/coding.c @ 18613:614b916ff5bf

Fix bugs with inappropriate mixing of Lisp_Object with int.
author Richard M. Stallman <rms@gnu.org>
date Fri, 04 Jul 1997 20:44:52 +0000
parents 69c0e220b626
children aa3f2820e2ac
comparison
equal deleted inserted replaced
18612:88efccff8970 18613:614b916ff5bf
700 } while (0) 700 } while (0)
701 701
702 /* Set designation state into CODING. */ 702 /* Set designation state into CODING. */
703 #define DECODE_DESIGNATION(reg, dimension, chars, final_char) \ 703 #define DECODE_DESIGNATION(reg, dimension, chars, final_char) \
704 do { \ 704 do { \
705 int charset = ISO_CHARSET_TABLE (dimension, chars, final_char); \ 705 int charset = ISO_CHARSET_TABLE (make_number (dimension), \
706 make_number (chars), \
707 make_number (final_char)); \
706 if (charset >= 0) \ 708 if (charset >= 0) \
707 { \ 709 { \
708 if (coding->direction == 1 \ 710 if (coding->direction == 1 \
709 && CHARSET_REVERSE_CHARSET (charset) >= 0) \ 711 && CHARSET_REVERSE_CHARSET (charset) >= 0) \
710 charset = CHARSET_REVERSE_CHARSET (charset); \ 712 charset = CHARSET_REVERSE_CHARSET (charset); \
3513 target = args[XINT (target_idx) + 1]; 3515 target = args[XINT (target_idx) + 1];
3514 if (!(STRINGP (target) 3516 if (!(STRINGP (target)
3515 || (EQ (operation, Qopen_network_stream) && INTEGERP (target)))) 3517 || (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
3516 error ("Invalid %dth argument", XINT (target_idx) + 1); 3518 error ("Invalid %dth argument", XINT (target_idx) + 1);
3517 3519
3518 chain = (operation == Qinsert_file_contents || operation == Qwrite_region 3520 chain = ((EQ (operation, Qinsert_file_contents)
3521 || EQ (operation, Qwrite_region))
3519 ? Vfile_coding_system_alist 3522 ? Vfile_coding_system_alist
3520 : (operation == Qopen_network_stream 3523 : (EQ (operation, Qopen_network_stream)
3521 ? Vnetwork_coding_system_alist 3524 ? Vnetwork_coding_system_alist
3522 : Vprocess_coding_system_alist)); 3525 : Vprocess_coding_system_alist));
3523 if (NILP (chain)) 3526 if (NILP (chain))
3524 return Qnil; 3527 return Qnil;
3525 3528