/[emacs]/emacs/src/coding.c
ViewVC logotype

Diff of /emacs/src/coding.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.239.2.11 by handa, Tue May 14 11:47:35 2002 UTC revision 1.239.2.12 by handa, Tue May 14 13:03:23 2002 UTC
# Line 5979  encode_coding_object (coding, src_object Line 5979  encode_coding_object (coding, src_object
5979    
5980    if (! NILP (CODING_ATTR_PRE_WRITE (attrs)))    if (! NILP (CODING_ATTR_PRE_WRITE (attrs)))
5981      {      {
       Lisp_Object val;  
   
5982        coding->src_object = make_conversion_work_buffer (coding->src_multibyte);        coding->src_object = make_conversion_work_buffer (coding->src_multibyte);
5983        set_buffer_internal (XBUFFER (coding->src_object));        set_buffer_internal (XBUFFER (coding->src_object));
5984        if (STRINGP (src_object))        if (STRINGP (src_object))
# Line 5997  encode_coding_object (coding, src_object Line 5995  encode_coding_object (coding, src_object
5995            set_buffer_internal (XBUFFER (coding->src_object));            set_buffer_internal (XBUFFER (coding->src_object));
5996          }          }
5997    
5998        val = call2 (CODING_ATTR_PRE_WRITE (attrs),        call2 (CODING_ATTR_PRE_WRITE (attrs),
5999                     make_number (1), make_number (chars));               make_number (BEG), make_number (Z));
6000        CHECK_NATNUM (val);        coding->src_object = Fcurrent_buffer ();
6001        if (BEG != GPT)        if (BEG != GPT)
6002          move_gap_both (BEG, BEG_BYTE);          move_gap_both (BEG, BEG_BYTE);
6003        coding->src_chars = Z - BEG;        coding->src_chars = Z - BEG;
# Line 6042  encode_coding_object (coding, src_object Line 6040  encode_coding_object (coding, src_object
6040    else if (EQ (dst_object, Qt))    else if (EQ (dst_object, Qt))
6041      {      {
6042        coding->dst_object = Qnil;        coding->dst_object = Qnil;
       coding->destination = (unsigned char *) xmalloc (coding->src_chars);  
6043        coding->dst_bytes = coding->src_chars;        coding->dst_bytes = coding->src_chars;
6044          if (coding->dst_bytes == 0)
6045            coding->dst_bytes = 1;
6046          coding->destination = (unsigned char *) xmalloc (coding->dst_bytes);
6047        coding->dst_multibyte = 0;        coding->dst_multibyte = 0;
6048      }      }
6049    else    else

Legend:
Removed from v.1.239.2.11  
changed lines
  Added in v.1.239.2.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26