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

Diff of /emacs/src/ccl.c

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

revision 1.71 by gerd, Thu May 17 09:09:14 2001 UTC revision 1.71.12.1 by handa, Fri May 30 08:13:01 2003 UTC
# Line 717  else Line 717  else
717          if (bytes == 1)                                                 \          if (bytes == 1)                                                 \
718            {                                                             \            {                                                             \
719              *dst++ = (ch);                                              \              *dst++ = (ch);                                              \
720              if ((ch) >= 0x80 && (ch) < 0xA0)                            \              if (extra_bytes && (ch) >= 0x80 && (ch) < 0xA0)             \
721                /* We may have to convert this eight-bit char to          \                /* We may have to convert this eight-bit char to          \
722                   multibyte form later.  */                              \                   multibyte form later.  */                              \
723                extra_bytes++;                                            \                extra_bytes++;                                            \
# Line 731  else Line 731  else
731        CCL_SUSPEND (CCL_STAT_SUSPEND_BY_DST);                            \        CCL_SUSPEND (CCL_STAT_SUSPEND_BY_DST);                            \
732    } while (0)    } while (0)
733    
734    
735  /* Encode one character CH to multibyte form and write to the current  /* Encode one character CH to multibyte form and write to the current
736     output buffer.  The output bytes always forms a valid multibyte     output buffer.  The output bytes always forms a valid multibyte
737     sequence.  */     sequence.  */
# Line 874  ccl_driver (ccl, source, destination, sr Line 875  ccl_driver (ccl, source, destination, sr
875       each of them will be converted to multibyte form of 2-byte       each of them will be converted to multibyte form of 2-byte
876       sequence.  For that conversion, we remember how many more bytes       sequence.  For that conversion, we remember how many more bytes
877       we must keep in DESTINATION in this variable.  */       we must keep in DESTINATION in this variable.  */
878    int extra_bytes = 0;    int extra_bytes = ccl->eight_bit_control;
879    
880    if (ic >= ccl->eof_ic)    if (ic >= ccl->eof_ic)
881      ic = CCL_HEADER_MAIN;      ic = CCL_HEADER_MAIN;
# Line 1849  ccl_driver (ccl, source, destination, sr Line 1850  ccl_driver (ccl, source, destination, sr
1850    ccl->ic = ic;    ccl->ic = ic;
1851    ccl->stack_idx = stack_idx;    ccl->stack_idx = stack_idx;
1852    ccl->prog = ccl_prog;    ccl->prog = ccl_prog;
1853    ccl->eight_bit_control = (extra_bytes > 0);    ccl->eight_bit_control = (extra_bytes > 1);
1854    if (consumed)    if (consumed)
1855      *consumed = src - source;      *consumed = src - source;
1856    return (dst ? dst - destination : 0);    return (dst ? dst - destination : 0);
# Line 2004  setup_ccl_program (ccl, ccl_prog) Line 2005  setup_ccl_program (ccl, ccl_prog)
2005    ccl->stack_idx = 0;    ccl->stack_idx = 0;
2006    ccl->eol_type = CODING_EOL_LF;    ccl->eol_type = CODING_EOL_LF;
2007    ccl->suppress_error = 0;    ccl->suppress_error = 0;
2008      ccl->eight_bit_control = 0;
2009    return 0;    return 0;
2010  }  }
2011    

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.71.12.1

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