From 0e7dc75fd9a2c2226c3dca6199257465d9d86622 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sat, 13 Aug 2022 19:31:05 -0700 Subject: [PATCH] Use correct type for pointer to FIXP in arith.h --- inc/arith.h | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/inc/arith.h b/inc/arith.h index 4915e41..1c420c2 100644 --- a/inc/arith.h +++ b/inc/arith.h @@ -75,50 +75,26 @@ case 0: (result) = (S_POSITIVE | (int)(arg)); break; \ case (int)0xFFFF0000: (result) = (S_NEGATIVE | (0xFFFF & (arg))); break; \ default: { \ - register LispPTR *wordp; \ + int *fixpp; \ /* arg is FIXP, call createcell */ \ - wordp = (LispPTR *)createcell68k(TYPE_FIXP); \ - *((int *)wordp) = (int)(arg); \ - (result) = (LADDR_from_68k(wordp)); \ + fixpp = (int *)createcell68k(TYPE_FIXP); \ + *((int *)fixpp) = (int)(arg); \ + (result) = (LADDR_from_68k(fixpp)); \ break; \ } \ } \ } while (0) -/* ******* - NEED to See if this is faster than the N_ARITH_SWITCH macro - - if( (MIN_FIXP <= result) && (result <= MAX_FIXP) ){ - if(0 <= result){ - if(result <= MAX_SMALL) - return(S_POSITIVE | result); - else{ - wordp = createcell68k(TYPE_FIXP); - *((unsigned int *)wordp) = result; - return(LADDR_from_68k(wordp)); - } - }else{ - if(MIN_SMALL <= result) - return(S_NEGATIVE | (0xFFFF & result)); - else{ - wordp = createcell68k(TYPE_FIXP); - *((unsigned int *)wordp) = result; - return(LADDR_from_68k(wordp)); - } - }/ - } -****** */ - #define N_ARITH_SWITCH(arg) \ do { \ switch ((arg) & (int)0xFFFF0000) { \ case 0: return (LispPTR) (S_POSITIVE | (arg)); \ case (int)0xFFFF0000: return (LispPTR)(S_NEGATIVE | (0xFFFF & (arg))); \ default: { \ - register LispPTR *fixpp; \ + int *fixpp; \ /* arg is FIXP, call createcell */ \ - fixpp = (LispPTR *)createcell68k(TYPE_FIXP); \ - *((int *)fixpp) = arg; \ + fixpp = (int *)createcell68k(TYPE_FIXP); \ + *fixpp = arg; \ return (LADDR_from_68k(fixpp)); \ } \ } \