Mercurial > hg > xemacs-beta
comparison src/mule-ccl.c @ 647:b39c14581166
[xemacs-hg @ 2001-08-13 04:45:47 by ben]
removal of unsigned, size_t, etc.
author | ben |
---|---|
date | Mon, 13 Aug 2001 04:46:48 +0000 |
parents | 023b83f4e54b |
children | fdefd0186b75 |
comparison
equal
deleted
inserted
replaced
646:00c54252fe4f | 647:b39c14581166 |
---|---|
969 break; | 969 break; |
970 | 970 |
971 case CCL_SetArray: /* CCCCCCCCCCCCCCCCCCCCRRRrrrXXXXX */ | 971 case CCL_SetArray: /* CCCCCCCCCCCCCCCCCCCCRRRrrrXXXXX */ |
972 i = reg[RRR]; | 972 i = reg[RRR]; |
973 j = field1 >> 3; | 973 j = field1 >> 3; |
974 if ((unsigned int) i < j) | 974 /* #### it's non-obvious to me that we need these casts, |
975 but the left one was already there so clearly the intention | |
976 was an unsigned comparison. --ben */ | |
977 if ((unsigned int) i < (unsigned int) j) | |
975 reg[rrr] = XINT (ccl_prog[ic + i]); | 978 reg[rrr] = XINT (ccl_prog[ic + i]); |
976 ic += j; | 979 ic += j; |
977 break; | 980 break; |
978 | 981 |
979 case CCL_Jump: /* A--D--D--R--E--S--S-000XXXXX */ | 982 case CCL_Jump: /* A--D--D--R--E--S--S-000XXXXX */ |
1021 break; | 1024 break; |
1022 | 1025 |
1023 case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */ | 1026 case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */ |
1024 i = reg[rrr]; | 1027 i = reg[rrr]; |
1025 j = XINT (ccl_prog[ic]); | 1028 j = XINT (ccl_prog[ic]); |
1026 if ((unsigned int) i < j) | 1029 /* #### see comment at CCL_SetArray */ |
1030 if ((unsigned int) i < (unsigned int) j) | |
1027 { | 1031 { |
1028 i = XINT (ccl_prog[ic + 1 + i]); | 1032 i = XINT (ccl_prog[ic + 1 + i]); |
1029 CCL_WRITE_CHAR (i); | 1033 CCL_WRITE_CHAR (i); |
1030 } | 1034 } |
1031 ic += j + 2; | 1035 ic += j + 2; |
1040 | 1044 |
1041 case CCL_ReadBranch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ | 1045 case CCL_ReadBranch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ |
1042 CCL_READ_CHAR (reg[rrr]); | 1046 CCL_READ_CHAR (reg[rrr]); |
1043 /* fall through ... */ | 1047 /* fall through ... */ |
1044 case CCL_Branch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ | 1048 case CCL_Branch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ |
1045 if ((unsigned int) reg[rrr] < field1) | 1049 /* #### see comment at CCL_SetArray */ |
1050 if ((unsigned int) reg[rrr] < (unsigned int) field1) | |
1046 ic += XINT (ccl_prog[ic + reg[rrr]]); | 1051 ic += XINT (ccl_prog[ic + reg[rrr]]); |
1047 else | 1052 else |
1048 ic += XINT (ccl_prog[ic + field1]); | 1053 ic += XINT (ccl_prog[ic + field1]); |
1049 break; | 1054 break; |
1050 | 1055 |
1135 } | 1140 } |
1136 break; | 1141 break; |
1137 | 1142 |
1138 case CCL_WriteArray: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ | 1143 case CCL_WriteArray: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ |
1139 i = reg[rrr]; | 1144 i = reg[rrr]; |
1140 if ((unsigned int) i < field1) | 1145 /* #### see comment at CCL_SetArray */ |
1146 if ((unsigned int) i < (unsigned int) field1) | |
1141 { | 1147 { |
1142 j = XINT (ccl_prog[ic + i]); | 1148 j = XINT (ccl_prog[ic + i]); |
1143 CCL_WRITE_CHAR (j); | 1149 CCL_WRITE_CHAR (j); |
1144 } | 1150 } |
1145 ic += field1; | 1151 ic += field1; |
1446 content = XVECTOR (map)->contents[point]; | 1452 content = XVECTOR (map)->contents[point]; |
1447 } | 1453 } |
1448 else if (EQ (content, Qt)) | 1454 else if (EQ (content, Qt)) |
1449 { | 1455 { |
1450 if (size != 4) continue; | 1456 if (size != 4) continue; |
1451 if ((op >= XUINT (XVECTOR (map)->contents[2])) | 1457 /* #### see comment at CCL_SetArray; in this |
1452 && (op < XUINT (XVECTOR (map)->contents[3]))) | 1458 case the casts are added but the XUINT was |
1459 already present */ | |
1460 if (((unsigned int) op >= | |
1461 XUINT (XVECTOR (map)->contents[2])) | |
1462 && ((unsigned int) op < | |
1463 XUINT (XVECTOR (map)->contents[3]))) | |
1453 content = XVECTOR (map)->contents[1]; | 1464 content = XVECTOR (map)->contents[1]; |
1454 else | 1465 else |
1455 continue; | 1466 continue; |
1456 } | 1467 } |
1457 else | 1468 else |
1620 content = XVECTOR (map)->contents[point]; | 1631 content = XVECTOR (map)->contents[point]; |
1621 } | 1632 } |
1622 else if (EQ (content, Qt)) | 1633 else if (EQ (content, Qt)) |
1623 { | 1634 { |
1624 if (size != 4) continue; | 1635 if (size != 4) continue; |
1625 if ((op >= XUINT (XVECTOR (map)->contents[2])) && | 1636 /* #### see comment at CCL_SetArray; in this |
1626 (op < XUINT (XVECTOR (map)->contents[3]))) | 1637 case the casts are added but the XUINT was |
1638 already present */ | |
1639 if (((unsigned int) op >= | |
1640 XUINT (XVECTOR (map)->contents[2])) && | |
1641 ((unsigned int) op < | |
1642 XUINT (XVECTOR (map)->contents[3]))) | |
1627 content = XVECTOR (map)->contents[1]; | 1643 content = XVECTOR (map)->contents[1]; |
1628 else | 1644 else |
1629 continue; | 1645 continue; |
1630 } | 1646 } |
1631 else | 1647 else |