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

Diff of /emacs/src/term.c

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

revision 1.137 by monnier, Sat Feb 2 23:46:40 2002 UTC revision 1.137.2.1 by handa, Fri Mar 1 01:48:37 2002 UTC
# Line 29  Boston, MA 02111-1307, USA.  */ Line 29  Boston, MA 02111-1307, USA.  */
29  #include "termchar.h"  #include "termchar.h"
30  #include "termopts.h"  #include "termopts.h"
31  #include "lisp.h"  #include "lisp.h"
32    #include "buffer.h"
33    #include "character.h"
34  #include "charset.h"  #include "charset.h"
35  #include "coding.h"  #include "coding.h"
36  #include "keyboard.h"  #include "keyboard.h"
# Line 872  encode_terminal_code (src, dst, src_len, Line 874  encode_terminal_code (src, dst, src_len,
874                  }                  }
875              }              }
876                        
877            result = encode_coding (coding, buf, dst, len, dst_end - dst);            coding->source = buf;
878              coding->destination = dst;
879              coding->dst_bytes = dst_end - dst;
880              encode_coding_object (coding, Qnil, 0, 0, 1, len, Qnil);
881            len -= coding->consumed;            len -= coding->consumed;
882            dst += coding->produced;            dst += coding->produced;
883            if (result == CODING_FINISH_INSUFFICIENT_DST            if (coding->result == CODING_RESULT_INSUFFICIENT_DST)
               || (result == CODING_FINISH_INSUFFICIENT_SRC  
                   && len > dst_end - dst))  
884              /* The remaining output buffer is too short.  We must              /* The remaining output buffer is too short.  We must
885                 break the loop here without increasing SRC so that the                 break the loop here without increasing SRC so that the
886                 next call of this function starts from the same glyph.  */                 next call of this function starts from the same glyph.  */
# Line 981  write_glyphs (string, len) Line 984  write_glyphs (string, len)
984    if (CODING_REQUIRE_FLUSHING (&terminal_coding))    if (CODING_REQUIRE_FLUSHING (&terminal_coding))
985      {      {
986        terminal_coding.mode |= CODING_MODE_LAST_BLOCK;        terminal_coding.mode |= CODING_MODE_LAST_BLOCK;
987        encode_coding (&terminal_coding, "", conversion_buffer,        terminal_coding.source = (unsigned char *) "";
988                       0, conversion_buffer_size);        terminal_coding.destination = conversion_buffer;
989          terminal_coding.dst_bytes = conversion_buffer_size;
990          encode_coding_object (&terminal_coding, Qnil, 0, 0, 0, 0, Qnil);
991        if (terminal_coding.produced > 0)        if (terminal_coding.produced > 0)
992          {          {
993            fwrite (conversion_buffer, 1, terminal_coding.produced, stdout);            fwrite (conversion_buffer, 1, terminal_coding.produced, stdout);
# Line 1713  produce_glyphs (it) Line 1718  produce_glyphs (it)
1718      }      }
1719    else    else
1720      {      {
1721        /* A multi-byte character.  The display width is fixed for all        it->pixel_width = CHAR_WIDTH (it->c);
          characters of the set.  Some of the glyphs may have to be  
          ignored because they are already displayed in a continued  
          line.  */  
       int charset = CHAR_CHARSET (it->c);  
   
       it->pixel_width = CHARSET_WIDTH (charset);  
1722        it->nglyphs = it->pixel_width;        it->nglyphs = it->pixel_width;
1723                
1724        if (it->glyph_row)        if (it->glyph_row)

Legend:
Removed from v.1.137  
changed lines
  Added in v.1.137.2.1

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