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 |
} |
} |
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 |
} |
} |
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: |
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 |
} |
} |
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 |
} |
} |
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 |
} |
} |
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)) |
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)) |
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 |
} |
} |
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); |