mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-16 12:43:12 +00:00
some cleanups in the arithmetic operations code (#427)
* arithmetic opcode implementations should return LispPTR rather than int * all callers of ERROR_EXIT() have return type LispPTR, therefore ERROR_EXIT should too * N_[I]GETNUMBER, [N_]ARITH_SWITCH need (int) casts for some large constants that would otherwise be unsigned * Expand use of macro N_ARITH_BODY_1_UNSIGNED and correct types * Remove unused macros N_ARITH_BODY_1 and N_ARITH_BODY_1_UNSIGNED * Cast to correct type for storing to TopOfStack, and return type of TIMER_EXIT()
This commit is contained in:
10
src/arith4.c
10
src/arith4.c
@@ -43,7 +43,7 @@
|
||||
|
||||
*/
|
||||
/**********************************************************************/
|
||||
int N_OP_times2(int tosm1, int tos) {
|
||||
LispPTR N_OP_times2(int tosm1, int tos) {
|
||||
int arg1, arg2;
|
||||
int result;
|
||||
|
||||
@@ -72,7 +72,7 @@ doufn:
|
||||
|
||||
} /* end N_OP_times2 */
|
||||
|
||||
int N_OP_itimes2(int tosm1, int tos) {
|
||||
LispPTR N_OP_itimes2(int tosm1, int tos) {
|
||||
int arg1, arg2;
|
||||
int result;
|
||||
|
||||
@@ -107,7 +107,7 @@ doufn:
|
||||
|
||||
*/
|
||||
/**********************************************************************/
|
||||
int N_OP_quot(int tosm1, int tos) {
|
||||
LispPTR N_OP_quot(int tosm1, int tos) {
|
||||
int arg1, arg2;
|
||||
int result;
|
||||
|
||||
@@ -125,7 +125,7 @@ doufn:
|
||||
|
||||
} /* end N_OP_quot */
|
||||
|
||||
int N_OP_iquot(int tosm1, int tos) {
|
||||
LispPTR N_OP_iquot(int tosm1, int tos) {
|
||||
register int arg1, arg2;
|
||||
register int result;
|
||||
|
||||
@@ -149,7 +149,7 @@ doufn:
|
||||
*/
|
||||
/**********************************************************************/
|
||||
|
||||
int N_OP_iremainder(int tosm1, int tos) {
|
||||
LispPTR N_OP_iremainder(int tosm1, int tos) {
|
||||
register int arg1, arg2;
|
||||
register int result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user