diff options
| author | Stefan Monnier | 2001-11-28 07:25:03 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-11-28 07:25:03 +0000 |
| commit | 64ef29210e50f52e076ef49269eaf2a1f946ecc9 (patch) | |
| tree | 4bbef0e354516a2bffe45933803f2e496fde0b8a /src | |
| parent | a0aa2a49ba78a6261bf8f0d77b55c178f2d82199 (diff) | |
| download | emacs-64ef29210e50f52e076ef49269eaf2a1f946ecc9.tar.gz emacs-64ef29210e50f52e076ef49269eaf2a1f946ecc9.zip | |
Use AREF and ASIZE.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ccl.c | 143 |
1 files changed, 70 insertions, 73 deletions
| @@ -1076,10 +1076,9 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1076 | 1076 | ||
| 1077 | if (stack_idx >= 256 | 1077 | if (stack_idx >= 256 |
| 1078 | || prog_id < 0 | 1078 | || prog_id < 0 |
| 1079 | || prog_id >= XVECTOR (Vccl_program_table)->size | 1079 | || prog_id >= ASIZE (Vccl_program_table) |
| 1080 | || (slot = XVECTOR (Vccl_program_table)->contents[prog_id], | 1080 | || (slot = AREF (Vccl_program_table, prog_id), !VECTORP (slot)) |
| 1081 | !VECTORP (slot)) | 1081 | || !VECTORP (AREF (slot, 1))) |
| 1082 | || !VECTORP (XVECTOR (slot)->contents[1])) | ||
| 1083 | { | 1082 | { |
| 1084 | if (stack_idx > 0) | 1083 | if (stack_idx > 0) |
| 1085 | { | 1084 | { |
| @@ -1092,7 +1091,7 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1092 | ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog; | 1091 | ccl_prog_stack_struct[stack_idx].ccl_prog = ccl_prog; |
| 1093 | ccl_prog_stack_struct[stack_idx].ic = ic; | 1092 | ccl_prog_stack_struct[stack_idx].ic = ic; |
| 1094 | stack_idx++; | 1093 | stack_idx++; |
| 1095 | ccl_prog = XVECTOR (XVECTOR (slot)->contents[1])->contents; | 1094 | ccl_prog = XVECTOR (AREF (slot, 1))->contents; |
| 1096 | ic = CCL_HEADER_MAIN; | 1095 | ic = CCL_HEADER_MAIN; |
| 1097 | } | 1096 | } |
| 1098 | break; | 1097 | break; |
| @@ -1430,20 +1429,19 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1430 | for (;i < j;i++) | 1429 | for (;i < j;i++) |
| 1431 | { | 1430 | { |
| 1432 | 1431 | ||
| 1433 | size = XVECTOR (Vcode_conversion_map_vector)->size; | 1432 | size = ASIZE (Vcode_conversion_map_vector); |
| 1434 | point = XINT (ccl_prog[ic++]); | 1433 | point = XINT (ccl_prog[ic++]); |
| 1435 | if (point >= size) continue; | 1434 | if (point >= size) continue; |
| 1436 | map = | 1435 | map = AREF (Vcode_conversion_map_vector, point); |
| 1437 | XVECTOR (Vcode_conversion_map_vector)->contents[point]; | ||
| 1438 | 1436 | ||
| 1439 | /* Check map varidity. */ | 1437 | /* Check map varidity. */ |
| 1440 | if (!CONSP (map)) continue; | 1438 | if (!CONSP (map)) continue; |
| 1441 | map = XCDR (map); | 1439 | map = XCDR (map); |
| 1442 | if (!VECTORP (map)) continue; | 1440 | if (!VECTORP (map)) continue; |
| 1443 | size = XVECTOR (map)->size; | 1441 | size = ASIZE (map); |
| 1444 | if (size <= 1) continue; | 1442 | if (size <= 1) continue; |
| 1445 | 1443 | ||
| 1446 | content = XVECTOR (map)->contents[0]; | 1444 | content = AREF (map, 0); |
| 1447 | 1445 | ||
| 1448 | /* check map type, | 1446 | /* check map type, |
| 1449 | [STARTPOINT VAL1 VAL2 ...] or | 1447 | [STARTPOINT VAL1 VAL2 ...] or |
| @@ -1453,14 +1451,14 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1453 | point = XUINT (content); | 1451 | point = XUINT (content); |
| 1454 | point = op - point + 1; | 1452 | point = op - point + 1; |
| 1455 | if (!((point >= 1) && (point < size))) continue; | 1453 | if (!((point >= 1) && (point < size))) continue; |
| 1456 | content = XVECTOR (map)->contents[point]; | 1454 | content = AREF (map, point); |
| 1457 | } | 1455 | } |
| 1458 | else if (EQ (content, Qt)) | 1456 | else if (EQ (content, Qt)) |
| 1459 | { | 1457 | { |
| 1460 | if (size != 4) continue; | 1458 | if (size != 4) continue; |
| 1461 | if ((op >= XUINT (XVECTOR (map)->contents[2])) | 1459 | if ((op >= XUINT (AREF (map, 2))) |
| 1462 | && (op < XUINT (XVECTOR (map)->contents[3]))) | 1460 | && (op < XUINT (AREF (map, 3)))) |
| 1463 | content = XVECTOR (map)->contents[1]; | 1461 | content = AREF (map, 1); |
| 1464 | else | 1462 | else |
| 1465 | continue; | 1463 | continue; |
| 1466 | } | 1464 | } |
| @@ -1586,7 +1584,7 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1586 | break; | 1584 | break; |
| 1587 | } | 1585 | } |
| 1588 | } | 1586 | } |
| 1589 | map_vector_size = XVECTOR (Vcode_conversion_map_vector)->size; | 1587 | map_vector_size = ASIZE (Vcode_conversion_map_vector); |
| 1590 | 1588 | ||
| 1591 | do { | 1589 | do { |
| 1592 | for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--) | 1590 | for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--) |
| @@ -1607,17 +1605,16 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1607 | } | 1605 | } |
| 1608 | 1606 | ||
| 1609 | if (point >= map_vector_size) continue; | 1607 | if (point >= map_vector_size) continue; |
| 1610 | map = (XVECTOR (Vcode_conversion_map_vector) | 1608 | map = AREF (Vcode_conversion_map_vector, point); |
| 1611 | ->contents[point]); | ||
| 1612 | 1609 | ||
| 1613 | /* Check map varidity. */ | 1610 | /* Check map varidity. */ |
| 1614 | if (!CONSP (map)) continue; | 1611 | if (!CONSP (map)) continue; |
| 1615 | map = XCDR (map); | 1612 | map = XCDR (map); |
| 1616 | if (!VECTORP (map)) continue; | 1613 | if (!VECTORP (map)) continue; |
| 1617 | size = XVECTOR (map)->size; | 1614 | size = ASIZE (map); |
| 1618 | if (size <= 1) continue; | 1615 | if (size <= 1) continue; |
| 1619 | 1616 | ||
| 1620 | content = XVECTOR (map)->contents[0]; | 1617 | content = AREF (map, 0); |
| 1621 | 1618 | ||
| 1622 | /* check map type, | 1619 | /* check map type, |
| 1623 | [STARTPOINT VAL1 VAL2 ...] or | 1620 | [STARTPOINT VAL1 VAL2 ...] or |
| @@ -1627,14 +1624,14 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1627 | point = XUINT (content); | 1624 | point = XUINT (content); |
| 1628 | point = op - point + 1; | 1625 | point = op - point + 1; |
| 1629 | if (!((point >= 1) && (point < size))) continue; | 1626 | if (!((point >= 1) && (point < size))) continue; |
| 1630 | content = XVECTOR (map)->contents[point]; | 1627 | content = AREF (map, point); |
| 1631 | } | 1628 | } |
| 1632 | else if (EQ (content, Qt)) | 1629 | else if (EQ (content, Qt)) |
| 1633 | { | 1630 | { |
| 1634 | if (size != 4) continue; | 1631 | if (size != 4) continue; |
| 1635 | if ((op >= XUINT (XVECTOR (map)->contents[2])) && | 1632 | if ((op >= XUINT (AREF (map, 2))) && |
| 1636 | (op < XUINT (XVECTOR (map)->contents[3]))) | 1633 | (op < XUINT (AREF (map, 3)))) |
| 1637 | content = XVECTOR (map)->contents[1]; | 1634 | content = AREF (map, 1); |
| 1638 | else | 1635 | else |
| 1639 | continue; | 1636 | continue; |
| 1640 | } | 1637 | } |
| @@ -1707,12 +1704,12 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1707 | int size, point; | 1704 | int size, point; |
| 1708 | j = XINT (ccl_prog[ic++]); /* map_id */ | 1705 | j = XINT (ccl_prog[ic++]); /* map_id */ |
| 1709 | op = reg[rrr]; | 1706 | op = reg[rrr]; |
| 1710 | if (j >= XVECTOR (Vcode_conversion_map_vector)->size) | 1707 | if (j >= ASIZE (Vcode_conversion_map_vector)) |
| 1711 | { | 1708 | { |
| 1712 | reg[RRR] = -1; | 1709 | reg[RRR] = -1; |
| 1713 | break; | 1710 | break; |
| 1714 | } | 1711 | } |
| 1715 | map = XVECTOR (Vcode_conversion_map_vector)->contents[j]; | 1712 | map = AREF (Vcode_conversion_map_vector, j); |
| 1716 | if (!CONSP (map)) | 1713 | if (!CONSP (map)) |
| 1717 | { | 1714 | { |
| 1718 | reg[RRR] = -1; | 1715 | reg[RRR] = -1; |
| @@ -1724,8 +1721,8 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1724 | reg[RRR] = -1; | 1721 | reg[RRR] = -1; |
| 1725 | break; | 1722 | break; |
| 1726 | } | 1723 | } |
| 1727 | size = XVECTOR (map)->size; | 1724 | size = ASIZE (map); |
| 1728 | point = XUINT (XVECTOR (map)->contents[0]); | 1725 | point = XUINT (AREF (map, 0)); |
| 1729 | point = op - point + 1; | 1726 | point = op - point + 1; |
| 1730 | reg[RRR] = 0; | 1727 | reg[RRR] = 0; |
| 1731 | if ((size <= 1) || | 1728 | if ((size <= 1) || |
| @@ -1734,7 +1731,7 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) | |||
| 1734 | else | 1731 | else |
| 1735 | { | 1732 | { |
| 1736 | reg[RRR] = 0; | 1733 | reg[RRR] = 0; |
| 1737 | content = XVECTOR (map)->contents[point]; | 1734 | content = AREF (map, point); |
| 1738 | if (NILP (content)) | 1735 | if (NILP (content)) |
| 1739 | reg[RRR] = -1; | 1736 | reg[RRR] = -1; |
| 1740 | else if (NUMBERP (content)) | 1737 | else if (NUMBERP (content)) |
| @@ -1875,11 +1872,11 @@ resolve_symbol_ccl_program (ccl) | |||
| 1875 | Lisp_Object result, contents, val; | 1872 | Lisp_Object result, contents, val; |
| 1876 | 1873 | ||
| 1877 | result = ccl; | 1874 | result = ccl; |
| 1878 | veclen = XVECTOR (result)->size; | 1875 | veclen = ASIZE (result); |
| 1879 | 1876 | ||
| 1880 | for (i = 0; i < veclen; i++) | 1877 | for (i = 0; i < veclen; i++) |
| 1881 | { | 1878 | { |
| 1882 | contents = XVECTOR (result)->contents[i]; | 1879 | contents = AREF (result, i); |
| 1883 | if (INTEGERP (contents)) | 1880 | if (INTEGERP (contents)) |
| 1884 | continue; | 1881 | continue; |
| 1885 | else if (CONSP (contents) | 1882 | else if (CONSP (contents) |
| @@ -1895,7 +1892,7 @@ resolve_symbol_ccl_program (ccl) | |||
| 1895 | 1892 | ||
| 1896 | val = Fget (XCAR (contents), XCDR (contents)); | 1893 | val = Fget (XCAR (contents), XCDR (contents)); |
| 1897 | if (NATNUMP (val)) | 1894 | if (NATNUMP (val)) |
| 1898 | XVECTOR (result)->contents[i] = val; | 1895 | AREF (result, i) = val; |
| 1899 | else | 1896 | else |
| 1900 | unresolved = 1; | 1897 | unresolved = 1; |
| 1901 | continue; | 1898 | continue; |
| @@ -1910,17 +1907,17 @@ resolve_symbol_ccl_program (ccl) | |||
| 1910 | 1907 | ||
| 1911 | val = Fget (contents, Qtranslation_table_id); | 1908 | val = Fget (contents, Qtranslation_table_id); |
| 1912 | if (NATNUMP (val)) | 1909 | if (NATNUMP (val)) |
| 1913 | XVECTOR (result)->contents[i] = val; | 1910 | AREF (result, i) = val; |
| 1914 | else | 1911 | else |
| 1915 | { | 1912 | { |
| 1916 | val = Fget (contents, Qcode_conversion_map_id); | 1913 | val = Fget (contents, Qcode_conversion_map_id); |
| 1917 | if (NATNUMP (val)) | 1914 | if (NATNUMP (val)) |
| 1918 | XVECTOR (result)->contents[i] = val; | 1915 | AREF (result, i) = val; |
| 1919 | else | 1916 | else |
| 1920 | { | 1917 | { |
| 1921 | val = Fget (contents, Qccl_program_idx); | 1918 | val = Fget (contents, Qccl_program_idx); |
| 1922 | if (NATNUMP (val)) | 1919 | if (NATNUMP (val)) |
| 1923 | XVECTOR (result)->contents[i] = val; | 1920 | AREF (result, i) = val; |
| 1924 | else | 1921 | else |
| 1925 | unresolved = 1; | 1922 | unresolved = 1; |
| 1926 | } | 1923 | } |
| @@ -1955,22 +1952,22 @@ ccl_get_compiled_code (ccl_prog) | |||
| 1955 | 1952 | ||
| 1956 | val = Fget (ccl_prog, Qccl_program_idx); | 1953 | val = Fget (ccl_prog, Qccl_program_idx); |
| 1957 | if (! NATNUMP (val) | 1954 | if (! NATNUMP (val) |
| 1958 | || XINT (val) >= XVECTOR (Vccl_program_table)->size) | 1955 | || XINT (val) >= ASIZE (Vccl_program_table)) |
| 1959 | return Qnil; | 1956 | return Qnil; |
| 1960 | slot = XVECTOR (Vccl_program_table)->contents[XINT (val)]; | 1957 | slot = AREF (Vccl_program_table, XINT (val)); |
| 1961 | if (! VECTORP (slot) | 1958 | if (! VECTORP (slot) |
| 1962 | || XVECTOR (slot)->size != 3 | 1959 | || ASIZE (slot) != 3 |
| 1963 | || ! VECTORP (XVECTOR (slot)->contents[1])) | 1960 | || ! VECTORP (AREF (slot, 1))) |
| 1964 | return Qnil; | 1961 | return Qnil; |
| 1965 | if (NILP (XVECTOR (slot)->contents[2])) | 1962 | if (NILP (AREF (slot, 2))) |
| 1966 | { | 1963 | { |
| 1967 | val = resolve_symbol_ccl_program (XVECTOR (slot)->contents[1]); | 1964 | val = resolve_symbol_ccl_program (AREF (slot, 1)); |
| 1968 | if (! VECTORP (val)) | 1965 | if (! VECTORP (val)) |
| 1969 | return Qnil; | 1966 | return Qnil; |
| 1970 | XVECTOR (slot)->contents[1] = val; | 1967 | AREF (slot, 1) = val; |
| 1971 | XVECTOR (slot)->contents[2] = Qt; | 1968 | AREF (slot, 2) = Qt; |
| 1972 | } | 1969 | } |
| 1973 | return XVECTOR (slot)->contents[1]; | 1970 | return AREF (slot, 1); |
| 1974 | } | 1971 | } |
| 1975 | 1972 | ||
| 1976 | /* Setup fields of the structure pointed by CCL appropriately for the | 1973 | /* Setup fields of the structure pointed by CCL appropriately for the |
| @@ -2031,7 +2028,7 @@ See the documentation of `define-ccl-program' for the detail of CCL program. * | |||
| 2031 | 2028 | ||
| 2032 | val = Fget (object, Qccl_program_idx); | 2029 | val = Fget (object, Qccl_program_idx); |
| 2033 | return ((! NATNUMP (val) | 2030 | return ((! NATNUMP (val) |
| 2034 | || XINT (val) >= XVECTOR (Vccl_program_table)->size) | 2031 | || XINT (val) >= ASIZE (Vccl_program_table)) |
| 2035 | ? Qnil : Qt); | 2032 | ? Qnil : Qt); |
| 2036 | } | 2033 | } |
| 2037 | 2034 | ||
| @@ -2061,12 +2058,12 @@ programs. */) | |||
| 2061 | error ("Invalid CCL program"); | 2058 | error ("Invalid CCL program"); |
| 2062 | 2059 | ||
| 2063 | CHECK_VECTOR (reg); | 2060 | CHECK_VECTOR (reg); |
| 2064 | if (XVECTOR (reg)->size != 8) | 2061 | if (ASIZE (reg) != 8) |
| 2065 | error ("Length of vector REGISTERS is not 8"); | 2062 | error ("Length of vector REGISTERS is not 8"); |
| 2066 | 2063 | ||
| 2067 | for (i = 0; i < 8; i++) | 2064 | for (i = 0; i < 8; i++) |
| 2068 | ccl.reg[i] = (INTEGERP (XVECTOR (reg)->contents[i]) | 2065 | ccl.reg[i] = (INTEGERP (AREF (reg, i)) |
| 2069 | ? XINT (XVECTOR (reg)->contents[i]) | 2066 | ? XINT (AREF (reg, i)) |
| 2070 | : 0); | 2067 | : 0); |
| 2071 | 2068 | ||
| 2072 | ccl_driver (&ccl, (unsigned char *)0, (unsigned char *)0, 0, 0, (int *)0); | 2069 | ccl_driver (&ccl, (unsigned char *)0, (unsigned char *)0, 0, 0, (int *)0); |
| @@ -2075,7 +2072,7 @@ programs. */) | |||
| 2075 | error ("Error in CCL program at %dth code", ccl.ic); | 2072 | error ("Error in CCL program at %dth code", ccl.ic); |
| 2076 | 2073 | ||
| 2077 | for (i = 0; i < 8; i++) | 2074 | for (i = 0; i < 8; i++) |
| 2078 | XSETINT (XVECTOR (reg)->contents[i], ccl.reg[i]); | 2075 | XSETINT (AREF (reg, i), ccl.reg[i]); |
| 2079 | return Qnil; | 2076 | return Qnil; |
| 2080 | } | 2077 | } |
| 2081 | 2078 | ||
| @@ -2119,7 +2116,7 @@ See the documentation of `define-ccl-program' for the detail of CCL program. */ | |||
| 2119 | error ("Invalid CCL program"); | 2116 | error ("Invalid CCL program"); |
| 2120 | 2117 | ||
| 2121 | CHECK_VECTOR (status); | 2118 | CHECK_VECTOR (status); |
| 2122 | if (XVECTOR (status)->size != 9) | 2119 | if (ASIZE (status) != 9) |
| 2123 | error ("Length of vector STATUS is not 9"); | 2120 | error ("Length of vector STATUS is not 9"); |
| 2124 | CHECK_STRING (str); | 2121 | CHECK_STRING (str); |
| 2125 | 2122 | ||
| @@ -2127,14 +2124,14 @@ See the documentation of `define-ccl-program' for the detail of CCL program. */ | |||
| 2127 | 2124 | ||
| 2128 | for (i = 0; i < 8; i++) | 2125 | for (i = 0; i < 8; i++) |
| 2129 | { | 2126 | { |
| 2130 | if (NILP (XVECTOR (status)->contents[i])) | 2127 | if (NILP (AREF (status, i))) |
| 2131 | XSETINT (XVECTOR (status)->contents[i], 0); | 2128 | XSETINT (AREF (status, i), 0); |
| 2132 | if (INTEGERP (XVECTOR (status)->contents[i])) | 2129 | if (INTEGERP (AREF (status, i))) |
| 2133 | ccl.reg[i] = XINT (XVECTOR (status)->contents[i]); | 2130 | ccl.reg[i] = XINT (AREF (status, i)); |
| 2134 | } | 2131 | } |
| 2135 | if (INTEGERP (XVECTOR (status)->contents[i])) | 2132 | if (INTEGERP (AREF (status, i))) |
| 2136 | { | 2133 | { |
| 2137 | i = XFASTINT (XVECTOR (status)->contents[8]); | 2134 | i = XFASTINT (AREF (status, 8)); |
| 2138 | if (ccl.ic < i && i < ccl.size) | 2135 | if (ccl.ic < i && i < ccl.size) |
| 2139 | ccl.ic = i; | 2136 | ccl.ic = i; |
| 2140 | } | 2137 | } |
| @@ -2145,8 +2142,8 @@ See the documentation of `define-ccl-program' for the detail of CCL program. */ | |||
| 2145 | produced = ccl_driver (&ccl, XSTRING (str)->data, outbuf, | 2142 | produced = ccl_driver (&ccl, XSTRING (str)->data, outbuf, |
| 2146 | STRING_BYTES (XSTRING (str)), outbufsize, (int *) 0); | 2143 | STRING_BYTES (XSTRING (str)), outbufsize, (int *) 0); |
| 2147 | for (i = 0; i < 8; i++) | 2144 | for (i = 0; i < 8; i++) |
| 2148 | XSET (XVECTOR (status)->contents[i], Lisp_Int, ccl.reg[i]); | 2145 | XSET (AREF (status, i), Lisp_Int, ccl.reg[i]); |
| 2149 | XSETINT (XVECTOR (status)->contents[8], ccl.ic); | 2146 | XSETINT (AREF (status, 8), ccl.ic); |
| 2150 | UNGCPRO; | 2147 | UNGCPRO; |
| 2151 | 2148 | ||
| 2152 | if (NILP (unibyte_p)) | 2149 | if (NILP (unibyte_p)) |
| @@ -2178,7 +2175,7 @@ Return index number of the registered CCL program. */) | |||
| 2178 | (name, ccl_prog) | 2175 | (name, ccl_prog) |
| 2179 | Lisp_Object name, ccl_prog; | 2176 | Lisp_Object name, ccl_prog; |
| 2180 | { | 2177 | { |
| 2181 | int len = XVECTOR (Vccl_program_table)->size; | 2178 | int len = ASIZE (Vccl_program_table); |
| 2182 | int idx; | 2179 | int idx; |
| 2183 | Lisp_Object resolved; | 2180 | Lisp_Object resolved; |
| 2184 | 2181 | ||
| @@ -2203,16 +2200,16 @@ Return index number of the registered CCL program. */) | |||
| 2203 | { | 2200 | { |
| 2204 | Lisp_Object slot; | 2201 | Lisp_Object slot; |
| 2205 | 2202 | ||
| 2206 | slot = XVECTOR (Vccl_program_table)->contents[idx]; | 2203 | slot = AREF (Vccl_program_table, idx); |
| 2207 | if (!VECTORP (slot)) | 2204 | if (!VECTORP (slot)) |
| 2208 | /* This is the first unsed slot. Register NAME here. */ | 2205 | /* This is the first unsed slot. Register NAME here. */ |
| 2209 | break; | 2206 | break; |
| 2210 | 2207 | ||
| 2211 | if (EQ (name, XVECTOR (slot)->contents[0])) | 2208 | if (EQ (name, AREF (slot, 0))) |
| 2212 | { | 2209 | { |
| 2213 | /* Update this slot. */ | 2210 | /* Update this slot. */ |
| 2214 | XVECTOR (slot)->contents[1] = ccl_prog; | 2211 | AREF (slot, 1) = ccl_prog; |
| 2215 | XVECTOR (slot)->contents[2] = resolved; | 2212 | AREF (slot, 2) = resolved; |
| 2216 | return make_number (idx); | 2213 | return make_number (idx); |
| 2217 | } | 2214 | } |
| 2218 | } | 2215 | } |
| @@ -2225,8 +2222,8 @@ Return index number of the registered CCL program. */) | |||
| 2225 | 2222 | ||
| 2226 | new_table = Fmake_vector (make_number (len * 2), Qnil); | 2223 | new_table = Fmake_vector (make_number (len * 2), Qnil); |
| 2227 | for (j = 0; j < len; j++) | 2224 | for (j = 0; j < len; j++) |
| 2228 | XVECTOR (new_table)->contents[j] | 2225 | AREF (new_table, j) |
| 2229 | = XVECTOR (Vccl_program_table)->contents[j]; | 2226 | = AREF (Vccl_program_table, j); |
| 2230 | Vccl_program_table = new_table; | 2227 | Vccl_program_table = new_table; |
| 2231 | } | 2228 | } |
| 2232 | 2229 | ||
| @@ -2234,10 +2231,10 @@ Return index number of the registered CCL program. */) | |||
| 2234 | Lisp_Object elt; | 2231 | Lisp_Object elt; |
| 2235 | 2232 | ||
| 2236 | elt = Fmake_vector (make_number (3), Qnil); | 2233 | elt = Fmake_vector (make_number (3), Qnil); |
| 2237 | XVECTOR (elt)->contents[0] = name; | 2234 | AREF (elt, 0) = name; |
| 2238 | XVECTOR (elt)->contents[1] = ccl_prog; | 2235 | AREF (elt, 1) = ccl_prog; |
| 2239 | XVECTOR (elt)->contents[2] = resolved; | 2236 | AREF (elt, 2) = resolved; |
| 2240 | XVECTOR (Vccl_program_table)->contents[idx] = elt; | 2237 | AREF (Vccl_program_table, idx) = elt; |
| 2241 | } | 2238 | } |
| 2242 | 2239 | ||
| 2243 | Fput (name, Qccl_program_idx, make_number (idx)); | 2240 | Fput (name, Qccl_program_idx, make_number (idx)); |
| @@ -2261,7 +2258,7 @@ Return index number of the registered map. */) | |||
| 2261 | (symbol, map) | 2258 | (symbol, map) |
| 2262 | Lisp_Object symbol, map; | 2259 | Lisp_Object symbol, map; |
| 2263 | { | 2260 | { |
| 2264 | int len = XVECTOR (Vcode_conversion_map_vector)->size; | 2261 | int len = ASIZE (Vcode_conversion_map_vector); |
| 2265 | int i; | 2262 | int i; |
| 2266 | Lisp_Object index; | 2263 | Lisp_Object index; |
| 2267 | 2264 | ||
| @@ -2270,7 +2267,7 @@ Return index number of the registered map. */) | |||
| 2270 | 2267 | ||
| 2271 | for (i = 0; i < len; i++) | 2268 | for (i = 0; i < len; i++) |
| 2272 | { | 2269 | { |
| 2273 | Lisp_Object slot = XVECTOR (Vcode_conversion_map_vector)->contents[i]; | 2270 | Lisp_Object slot = AREF (Vcode_conversion_map_vector, i); |
| 2274 | 2271 | ||
| 2275 | if (!CONSP (slot)) | 2272 | if (!CONSP (slot)) |
| 2276 | break; | 2273 | break; |
| @@ -2291,15 +2288,15 @@ Return index number of the registered map. */) | |||
| 2291 | int j; | 2288 | int j; |
| 2292 | 2289 | ||
| 2293 | for (j = 0; j < len; j++) | 2290 | for (j = 0; j < len; j++) |
| 2294 | XVECTOR (new_vector)->contents[j] | 2291 | AREF (new_vector, j) |
| 2295 | = XVECTOR (Vcode_conversion_map_vector)->contents[j]; | 2292 | = AREF (Vcode_conversion_map_vector, j); |
| 2296 | Vcode_conversion_map_vector = new_vector; | 2293 | Vcode_conversion_map_vector = new_vector; |
| 2297 | } | 2294 | } |
| 2298 | 2295 | ||
| 2299 | index = make_number (i); | 2296 | index = make_number (i); |
| 2300 | Fput (symbol, Qcode_conversion_map, map); | 2297 | Fput (symbol, Qcode_conversion_map, map); |
| 2301 | Fput (symbol, Qcode_conversion_map_id, index); | 2298 | Fput (symbol, Qcode_conversion_map_id, index); |
| 2302 | XVECTOR (Vcode_conversion_map_vector)->contents[i] = Fcons (symbol, map); | 2299 | AREF (Vcode_conversion_map_vector, i) = Fcons (symbol, map); |
| 2303 | return index; | 2300 | return index; |
| 2304 | } | 2301 | } |
| 2305 | 2302 | ||