int multibytep = coding->src_multibyte;
enum utf_bom_type bom = CODING_UTF_8_BOM (coding);
Lisp_Object attr, charset_list;
- int eol_crlf =
+ int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
int byte_after_cr = -1;
}
else if (UTF_8_1_OCTET_P (c1))
{
- if (eol_crlf && c1 == '\r')
+ if (eol_dos && c1 == '\r')
ONE_MORE_BYTE (byte_after_cr);
c = c1;
}
enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding);
int surrogate = CODING_UTF_16_SURROGATE (coding);
Lisp_Object attr, charset_list;
- int eol_crlf =
+ int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
int byte_after_cr1 = -1, byte_after_cr2 = -1;
CODING_UTF_16_SURROGATE (coding) = surrogate = c;
else
{
- if (eol_crlf && c == '\r')
+ if (eol_dos && c == '\r')
{
ONE_MORE_BYTE (byte_after_cr1);
ONE_MORE_BYTE (byte_after_cr2);
it because analyzing it is too heavy for detecting. But,
at least, we check that the composite character
constitutes of more than 4 bytes. */
- const unsigned char *src_base;
+ const unsigned char *src_start;
repeat:
- src_base = src;
+ src_start = src;
do
{
ONE_MORE_BYTE (c);
}
while (c >= 0xA0);
- if (src - src_base <= 4)
+ if (src - src_start <= 4)
break;
found = CATEGORY_MASK_EMACS_MULE;
if (c == 0x80)
const unsigned char *src_end = coding->source + coding->src_bytes;
const unsigned char *src_base = src;
int multibytep = coding->src_multibyte;
- int charset_id;
+ int charset_ID;
unsigned code;
int c;
int consumed_chars = 0;
if (c < 0)
{
c = -c;
- charset_id = emacs_mule_charset[0];
+ charset_ID = emacs_mule_charset[0];
}
else
{
switch (emacs_mule_bytes[c])
{
case 2:
- if ((charset_id = emacs_mule_charset[c]) < 0)
+ if ((charset_ID = emacs_mule_charset[c]) < 0)
goto invalid_code;
ONE_MORE_BYTE (c);
if (c < 0xA0)
|| c == EMACS_MULE_LEADING_CODE_PRIVATE_12)
{
ONE_MORE_BYTE (c);
- if (c < 0xA0 || (charset_id = emacs_mule_charset[c]) < 0)
+ if (c < 0xA0 || (charset_ID = emacs_mule_charset[c]) < 0)
goto invalid_code;
ONE_MORE_BYTE (c);
if (c < 0xA0)
}
else
{
- if ((charset_id = emacs_mule_charset[c]) < 0)
+ if ((charset_ID = emacs_mule_charset[c]) < 0)
goto invalid_code;
ONE_MORE_BYTE (c);
if (c < 0xA0)
case 4:
ONE_MORE_BYTE (c);
- if (c < 0 || (charset_id = emacs_mule_charset[c]) < 0)
+ if (c < 0 || (charset_ID = emacs_mule_charset[c]) < 0)
goto invalid_code;
ONE_MORE_BYTE (c);
if (c < 0xA0)
case 1:
code = c;
- charset_id = ASCII_BYTE_P (code) ? charset_ascii : charset_eight_bit;
+ charset_ID = ASCII_BYTE_P (code) ? charset_ascii : charset_eight_bit;
break;
default:
abort ();
}
CODING_DECODE_CHAR (coding, src, src_base, src_end,
- CHARSET_FROM_ID (charset_id), code, c);
+ CHARSET_FROM_ID (charset_ID), code, c);
if (c < 0)
goto invalid_code;
}
*nbytes = src - src_base;
*nchars = consumed_chars;
if (id)
- *id = charset_id;
+ *id = charset_ID;
return (mseq_found ? -c : c);
no_more_source:
int char_offset = coding->produced_char;
int last_offset = char_offset;
int last_id = charset_ascii;
- int eol_crlf =
+ int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
int byte_after_cr = -1;
struct composition_status *cmp_status = &coding->spec.emacs_mule.cmp_status;
if (c < 0x80)
{
- if (eol_crlf && c == '\r')
+ if (eol_dos && c == '\r')
ONE_MORE_BYTE (byte_after_cr);
id = charset_ascii;
if (cmp_status->state != COMPOSING_NO)
if (! single_shifting
&& ! (rejected & CATEGORY_MASK_ISO_8_2))
{
- int i = 1;
+ int len = 1;
while (src < src_end)
{
src_base = src;
src = src_base;
break;
}
- i++;
+ len++;
}
- if (i & 1 && src < src_end)
+ if (len & 1 && src < src_end)
{
rejected |= CATEGORY_MASK_ISO_8_2;
if (composition_count >= 0)
- composition_count += i;
+ composition_count += len;
}
else
{
found |= CATEGORY_MASK_ISO_8_2;
if (composition_count >= 0)
- composition_count += i / 2;
+ composition_count += len / 2;
}
}
break;
} \
else /* new format (after ver.21) */ \
{ \
- int c; \
+ int b; \
\
- ONE_MORE_BYTE (c); \
- rule = COMPOSITION_ENCODE_RULE (rule - 81, c - 32); \
+ ONE_MORE_BYTE (b); \
+ rule = COMPOSITION_ENCODE_RULE (rule - 81, b - 32); \
if (rule >= 0) \
rule += 0x100; /* to destinguish it from the old format */ \
nbytes = 2; \
int char_offset = coding->produced_char;
int last_offset = char_offset;
int last_id = charset_ascii;
- int eol_crlf =
+ int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
int byte_after_cr = -1;
int i;
break;
case ISO_control_0:
- if (eol_crlf && c1 == '\r')
+ if (eol_dos && c1 == '\r')
ONE_MORE_BYTE (byte_after_cr);
MAYBE_FINISH_COMPOSITION ();
charset = CHARSET_FROM_ID (charset_ascii);
const char *intermediate_char_94 = "()*+"; \
const char *intermediate_char_96 = ",-./"; \
int revision = -1; \
- int c; \
\
if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_REVISION) \
revision = CHARSET_ISO_REVISION (charset); \
EMIT_ONE_ASCII_BYTE (ISO_CODE_ESC); \
if (CHARSET_DIMENSION (charset) == 1) \
{ \
+ int b; \
if (! CHARSET_ISO_CHARS_96 (charset)) \
- c = intermediate_char_94[reg]; \
+ b = intermediate_char_94[reg]; \
else \
- c = intermediate_char_96[reg]; \
- EMIT_ONE_ASCII_BYTE (c); \
+ b = intermediate_char_96[reg]; \
+ EMIT_ONE_ASCII_BYTE (b); \
} \
else \
{ \
int char_offset = coding->produced_char;
int last_offset = char_offset;
int last_id = charset_ascii;
- int eol_crlf =
+ int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
int byte_after_cr = -1;
goto invalid_code;
if (c < 0x80)
{
- if (eol_crlf && c == '\r')
+ if (eol_dos && c == '\r')
ONE_MORE_BYTE (byte_after_cr);
charset = charset_roman;
}
int char_offset = coding->produced_char;
int last_offset = char_offset;
int last_id = charset_ascii;
- int eol_crlf =
+ int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
int byte_after_cr = -1;
goto invalid_code;
if (c < 0x80)
{
- if (eol_crlf && c == '\r')
+ if (eol_dos && c == '\r')
ONE_MORE_BYTE (byte_after_cr);
charset = charset_roman;
}
static void
decode_coding_raw_text (struct coding_system *coding)
{
- int eol_crlf =
+ int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
coding->chars_at_source = 1;
coding->consumed_char = coding->src_chars;
coding->consumed = coding->src_bytes;
- if (eol_crlf && coding->source[coding->src_bytes - 1] == '\r')
+ if (eol_dos && coding->source[coding->src_bytes - 1] == '\r')
{
coding->consumed_char--;
coding->consumed--;
int char_offset = coding->produced_char;
int last_offset = char_offset;
int last_id = charset_ascii;
- int eol_crlf =
+ int eol_dos =
!inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos);
int byte_after_cr = -1;
else
{
ONE_MORE_BYTE (c);
- if (eol_crlf && c == '\r')
+ if (eol_dos && c == '\r')
ONE_MORE_BYTE (byte_after_cr);
}
if (c < 0)
}
else if (CONSP (translation_table))
{
- Lisp_Object tail, val;
+ Lisp_Object tail;
for (tail = translation_table; CONSP (tail); tail = XCDR (tail))
if (CHAR_TABLE_P (XCAR (tail))
&& CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (XCAR (tail))) > 1)
{
- val = XCHAR_TABLE (XCAR (tail))->extras[1];
- if (NATNUMP (val) && *max_lookup < XFASTINT (val))
- *max_lookup = XFASTINT (val);
+ Lisp_Object tailval = XCHAR_TABLE (XCAR (tail))->extras[1];
+ if (NATNUMP (tailval) && *max_lookup < XFASTINT (tailval))
+ *max_lookup = XFASTINT (tailval);
}
}
}
}
else
{
- int s1 = c >> 8, s2 = c & 0xFF;
+ int c1 = c >> 8, c2 = c & 0xFF;
- if (s1 < 0x81 || (s1 > 0x9F && s1 < 0xE0) || s1 > 0xEF
- || s2 < 0x40 || s2 == 0x7F || s2 > 0xFC)
+ if (c1 < 0x81 || (c1 > 0x9F && c1 < 0xE0) || c1 > 0xEF
+ || c2 < 0x40 || c2 == 0x7F || c2 > 0xFC)
error ("Invalid code: %d", code);
SJIS_TO_JIS (c);
charset = charset_kanji;
else if (EQ (coding_type, Qiso_2022))
{
Lisp_Object initial, reg_usage, request, flags;
- int i;
if (nargs < coding_arg_iso2022_max)
goto short_args;
for (tail = request; ! NILP (tail); tail = Fcdr (tail))
{
int id;
- Lisp_Object tmp;
+ Lisp_Object tmp1;
val = Fcar (tail);
CHECK_CONS (val);
- tmp = XCAR (val);
- CHECK_CHARSET_GET_ID (tmp, id);
+ tmp1 = XCAR (val);
+ CHECK_CHARSET_GET_ID (tmp1, id);
CHECK_NATNUM_CDR (val);
if (XINT (XCDR (val)) >= 4)
error ("Invalid graphic register number: %d", XINT (XCDR (val)));