426 |
extended_command (rrr,RRR,Rrr,ARGS) |
extended_command (rrr,RRR,Rrr,ARGS) |
427 |
*/ |
*/ |
428 |
|
|
429 |
/* |
/* |
430 |
Here after, Extended CCL Instructions. |
Here after, Extended CCL Instructions. |
431 |
Bit length of extended command is 14. |
Bit length of extended command is 14. |
432 |
Therefore, the instruction code range is 0..16384(0x3fff). |
Therefore, the instruction code range is 0..16384(0x3fff). |
484 |
3:MAP-ID1 |
3:MAP-ID1 |
485 |
4:MAP-ID2 |
4:MAP-ID2 |
486 |
... |
... |
487 |
*/ |
*/ |
488 |
|
|
489 |
/* Map the code in reg[rrr] by MAPs starting from the Nth (N = |
/* Map the code in reg[rrr] by MAPs starting from the Nth (N = |
490 |
reg[RRR]) map. |
reg[RRR]) map. |
562 |
where |
where |
563 |
STARTPOINT is an offset to be used for indexing a map, |
STARTPOINT is an offset to be used for indexing a map, |
564 |
ENDPOINT is a maximum index number of a map, |
ENDPOINT is a maximum index number of a map, |
565 |
VAL and VALn is a number, nil, t, or lambda. |
VAL and VALn is a number, nil, t, or lambda. |
566 |
|
|
567 |
Valid index range of a map of type (a) is: |
Valid index range of a map of type (a) is: |
568 |
STARTPOINT <= index < STARTPOINT + map_size - 1 |
STARTPOINT <= index < STARTPOINT + map_size - 1 |
862 |
int ic; /* Instruction Counter. */ |
int ic; /* Instruction Counter. */ |
863 |
}; |
}; |
864 |
|
|
865 |
/* For the moment, we only support depth 256 of stack. */ |
/* For the moment, we only support depth 256 of stack. */ |
866 |
static struct ccl_prog_stack ccl_prog_stack_struct[256]; |
static struct ccl_prog_stack ccl_prog_stack_struct[256]; |
867 |
|
|
868 |
int |
int |
1096 |
} |
} |
1097 |
CCL_INVALID_CMD; |
CCL_INVALID_CMD; |
1098 |
} |
} |
1099 |
|
|
1100 |
ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog; |
ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog; |
1101 |
ccl_prog_stack_struct[stack_idx].ic = ic; |
ccl_prog_stack_struct[stack_idx].ic = ic; |
1102 |
stack_idx++; |
stack_idx++; |
1260 |
src++; |
src++; |
1261 |
goto ccl_read_multibyte_character_suspend; |
goto ccl_read_multibyte_character_suspend; |
1262 |
} |
} |
1263 |
|
|
1264 |
if (!ccl->multibyte) |
if (!ccl->multibyte) |
1265 |
{ |
{ |
1266 |
int bytes; |
int bytes; |
1274 |
i = *src++; |
i = *src++; |
1275 |
if (i == '\n' && ccl->eol_type != CODING_EOL_LF) |
if (i == '\n' && ccl->eol_type != CODING_EOL_LF) |
1276 |
{ |
{ |
1277 |
/* We are encoding. */ |
/* We are encoding. */ |
1278 |
if (ccl->eol_type == CODING_EOL_CRLF) |
if (ccl->eol_type == CODING_EOL_CRLF) |
1279 |
{ |
{ |
1280 |
if (ccl->cr_consumed) |
if (ccl->cr_consumed) |
1399 |
SPLIT_CHAR (op, reg[RRR], i, j); |
SPLIT_CHAR (op, reg[RRR], i, j); |
1400 |
if (j != -1) |
if (j != -1) |
1401 |
i = (i << 7) | j; |
i = (i << 7) | j; |
1402 |
|
|
1403 |
reg[rrr] = i; |
reg[rrr] = i; |
1404 |
break; |
break; |
1405 |
|
|
1411 |
SPLIT_CHAR (op, reg[RRR], i, j); |
SPLIT_CHAR (op, reg[RRR], i, j); |
1412 |
if (j != -1) |
if (j != -1) |
1413 |
i = (i << 7) | j; |
i = (i << 7) | j; |
1414 |
|
|
1415 |
reg[rrr] = i; |
reg[rrr] = i; |
1416 |
break; |
break; |
1417 |
|
|
1418 |
case CCL_LookupIntConstTbl: |
case CCL_LookupIntConstTbl: |
1419 |
op = XINT (ccl_prog[ic]); /* table */ |
op = XINT (ccl_prog[ic]); /* table */ |
1420 |
ic++; |
ic++; |
1421 |
{ |
{ |
1422 |
struct Lisp_Hash_Table *h = GET_HASH_TABLE (op); |
struct Lisp_Hash_Table *h = GET_HASH_TABLE (op); |
1423 |
|
|
1424 |
op = hash_lookup (h, make_number (reg[RRR]), NULL); |
op = hash_lookup (h, make_number (reg[RRR]), NULL); |
1443 |
op = XINT (ccl_prog[ic]); /* table */ |
op = XINT (ccl_prog[ic]); /* table */ |
1444 |
ic++; |
ic++; |
1445 |
CCL_MAKE_CHAR (reg[RRR], reg[rrr], i); |
CCL_MAKE_CHAR (reg[RRR], reg[rrr], i); |
1446 |
{ |
{ |
1447 |
struct Lisp_Hash_Table *h = GET_HASH_TABLE (op); |
struct Lisp_Hash_Table *h = GET_HASH_TABLE (op); |
1448 |
|
|
1449 |
op = hash_lookup (h, make_number (i), NULL); |
op = hash_lookup (h, make_number (i), NULL); |
1517 |
else |
else |
1518 |
continue; |
continue; |
1519 |
} |
} |
1520 |
else |
else |
1521 |
continue; |
continue; |
1522 |
|
|
1523 |
if (NILP (content)) |
if (NILP (content)) |
1553 |
ic = fin_ic; |
ic = fin_ic; |
1554 |
} |
} |
1555 |
break; |
break; |
1556 |
|
|
1557 |
case CCL_MapMultiple: |
case CCL_MapMultiple: |
1558 |
{ |
{ |
1559 |
Lisp_Object map, content, attrib, value; |
Lisp_Object map, content, attrib, value; |
1640 |
} |
} |
1641 |
} |
} |
1642 |
map_vector_size = ASIZE (Vcode_conversion_map_vector); |
map_vector_size = ASIZE (Vcode_conversion_map_vector); |
1643 |
|
|
1644 |
do { |
do { |
1645 |
for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--) |
for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--) |
1646 |
{ |
{ |
1690 |
else |
else |
1691 |
continue; |
continue; |
1692 |
} |
} |
1693 |
else |
else |
1694 |
continue; |
continue; |
1695 |
|
|
1696 |
if (NILP (content)) |
if (NILP (content)) |
1808 |
} |
} |
1809 |
} |
} |
1810 |
break; |
break; |
1811 |
|
|
1812 |
default: |
default: |
1813 |
CCL_INVALID_CMD; |
CCL_INVALID_CMD; |
1814 |
} |
} |
1881 |
bcopy (msg, dst, msglen); |
bcopy (msg, dst, msglen); |
1882 |
dst += msglen; |
dst += msglen; |
1883 |
} |
} |
1884 |
|
|
1885 |
if (ccl->status == CCL_STAT_INVALID_CMD) |
if (ccl->status == CCL_STAT_INVALID_CMD) |
1886 |
{ |
{ |
1887 |
#if 0 /* If the remaining bytes contain 0x80..0x9F, copying them |
#if 0 /* If the remaining bytes contain 0x80..0x9F, copying them |
2317 |
|
|
2318 |
CHECK_SYMBOL (symbol); |
CHECK_SYMBOL (symbol); |
2319 |
CHECK_VECTOR (map); |
CHECK_VECTOR (map); |
2320 |
|
|
2321 |
for (i = 0; i < len; i++) |
for (i = 0; i < len; i++) |
2322 |
{ |
{ |
2323 |
Lisp_Object slot = AREF (Vcode_conversion_map_vector, i); |
Lisp_Object slot = AREF (Vcode_conversion_map_vector, i); |