/[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.42 by handa, Wed Oct 16 09:12:55 2002 UTC revision 1.239.2.43 by handa, Wed Nov 6 00:10:42 2002 UTC
# Line 1126  decode_coding_utf_8 (coding) Line 1126  decode_coding_utf_8 (coding)
1126                if (EQ (eol_type, Qdos))                if (EQ (eol_type, Qdos))
1127                  {                  {
1128                    if (src == src_end)                    if (src == src_end)
1129                      goto no_more_source;                      {
1130                          coding->result = CODING_RESULT_INSUFFICIENT_SRC;
1131                          goto no_more_source;
1132                        }
1133                    if (*src == '\n')                    if (*src == '\n')
1134                      ONE_MORE_BYTE (c);                      ONE_MORE_BYTE (c);
1135                  }                  }
# Line 1917  decode_coding_emacs_mule (coding) Line 1920  decode_coding_emacs_mule (coding)
1920                if (EQ (eol_type, Qdos))                if (EQ (eol_type, Qdos))
1921                  {                  {
1922                    if (src == src_end)                    if (src == src_end)
1923                      goto no_more_source;                      {
1924                          coding->result = CODING_RESULT_INSUFFICIENT_SRC;
1925                          goto no_more_source;
1926                        }
1927                    if (*src == '\n')                    if (*src == '\n')
1928                      ONE_MORE_BYTE (c);                      ONE_MORE_BYTE (c);
1929                  }                  }
# Line 2784  decode_coding_iso_2022 (coding) Line 2790  decode_coding_iso_2022 (coding)
2790    
2791        ONE_MORE_BYTE (c1);        ONE_MORE_BYTE (c1);
2792    
2793        /* We produce no character or one character.  */        /* We produce at most one character.  */
2794        switch (iso_code_class [c1])        switch (iso_code_class [c1])
2795          {          {
2796          case ISO_0x20_or_0x7F:          case ISO_0x20_or_0x7F:
# Line 2841  decode_coding_iso_2022 (coding) Line 2847  decode_coding_iso_2022 (coding)
2847                if (EQ (eol_type, Qdos))                if (EQ (eol_type, Qdos))
2848                  {                  {
2849                    if (src == src_end)                    if (src == src_end)
2850                      goto no_more_source;                      {
2851                          coding->result = CODING_RESULT_INSUFFICIENT_SRC;
2852                          goto no_more_source;
2853                        }                
2854                    if (*src == '\n')                    if (*src == '\n')
2855                      ONE_MORE_BYTE (c1);                      ONE_MORE_BYTE (c1);
2856                  }                  }
# Line 3796  decode_coding_sjis (coding) Line 3805  decode_coding_sjis (coding)
3805            if (EQ (eol_type, Qdos))            if (EQ (eol_type, Qdos))
3806              {              {
3807                if (src == src_end)                if (src == src_end)
3808                  goto no_more_source;                  {
3809                      coding->result = CODING_RESULT_INSUFFICIENT_SRC;
3810                      goto no_more_source;
3811                    }
3812                if (*src == '\n')                if (*src == '\n')
3813                  ONE_MORE_BYTE (c);                  ONE_MORE_BYTE (c);
3814              }              }
# Line 3885  decode_coding_big5 (coding) Line 3897  decode_coding_big5 (coding)
3897            if (EQ (eol_type, Qdos))            if (EQ (eol_type, Qdos))
3898              {              {
3899                if (src == src_end)                if (src == src_end)
3900                  goto no_more_source;                  {
3901                      coding->result = CODING_RESULT_INSUFFICIENT_SRC;
3902                      goto no_more_source;
3903                    }
3904                if (*src == '\n')                if (*src == '\n')
3905                  ONE_MORE_BYTE (c);                  ONE_MORE_BYTE (c);
3906              }              }
# Line 4429  decode_coding_charset (coding) Line 4444  decode_coding_charset (coding)
4444               else.  */               else.  */
4445            if (EQ (eol_type, Qdos))            if (EQ (eol_type, Qdos))
4446              {              {
4447                if (src < src_end                if (src == src_end)
4448                    && *src == '\n')                  {
4449                      coding->result = CODING_RESULT_INSUFFICIENT_SRC;
4450                      goto no_more_source;
4451                    }
4452                  if (*src == '\n')
4453                  ONE_MORE_BYTE (c);                  ONE_MORE_BYTE (c);
4454              }              }
4455            else if (EQ (eol_type, Qmac))            else if (EQ (eol_type, Qmac))
# Line 5272  produce_chars (coding) Line 5291  produce_chars (coding)
5291                      {                      {
5292                        if (EQ (eol_type, Qdos))                        if (EQ (eol_type, Qdos))
5293                          {                          {
5294                            if (src < src_end                            if (src == src_end)
5295                                && *src == '\n')                              {
5296                                  coding->result = CODING_RESULT_INSUFFICIENT_SRC;
5297                                  goto no_more_source;
5298                                }
5299                              if (*src == '\n')
5300                              c = *src++;                              c = *src++;
5301                          }                          }
5302                        else if (EQ (eol_type, Qmac))                        else if (EQ (eol_type, Qmac))
# Line 5621  decode_coding (coding) Line 5644  decode_coding (coding)
5644            /* Flush out unprocessed data as binary chars.  We are sure            /* Flush out unprocessed data as binary chars.  We are sure
5645               that the number of data is less than the size of               that the number of data is less than the size of
5646               coding->charbuf.  */               coding->charbuf.  */
           int *charbuf = coding->charbuf;  
   
5647            while (nbytes-- > 0)            while (nbytes-- > 0)
5648              {              {
5649                int c = *src++;                int c = *src++;
5650                *charbuf++ =  (c & 0x80 ? - c : c);  
5651                  coding->charbuf[coding->charbuf_used++] = (c & 0x80 ? - c : c);
5652              }              }
5653            produce_chars (coding);            produce_chars (coding);
5654          }          }
# Line 5883  decode_coding_gap (coding, chars, bytes) Line 5905  decode_coding_gap (coding, chars, bytes)
5905    coding->dst_pos = PT;    coding->dst_pos = PT;
5906    coding->dst_pos_byte = PT_BYTE;    coding->dst_pos_byte = PT_BYTE;
5907    coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters);    coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters);
5908      coding->mode |= CODING_MODE_LAST_BLOCK;
5909    
5910    if (CODING_REQUIRE_DETECTION (coding))    if (CODING_REQUIRE_DETECTION (coding))
5911      detect_coding (coding);      detect_coding (coding);

Legend:
Removed from v.1.239.2.42  
changed lines
  Added in v.1.239.2.43

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