1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-11 23:43:19 +00:00

Correct parameter type declaration error for N_OP_ubfloat1

Ensure pointers have appropriate alignment for data being referenced
This commit is contained in:
Nick Briggs 2023-01-08 22:11:05 -08:00
parent c10d339036
commit 96fcc9475a
2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
#ifndef UBF1DEFS_H
#define UBF1DEFS_H 1
#include "lispemul.h" /* for LispPTR */
LispPTR N_OP_ubfloat1(int arg, int alpha);
LispPTR N_OP_ubfloat1(LispPTR arg, int alpha);
#endif

View File

@ -27,21 +27,21 @@
355/4 UFIX
***********************************************************/
LispPTR N_OP_ubfloat1(int arg, int alpha) {
LispPTR N_OP_ubfloat1(LispPTR arg, int alpha) {
switch (alpha) {
case 0: /* box */
{
DLword *wordp;
LispPTR *wordp;
wordp = createcell68k(TYPE_FLOATP);
*((int *)wordp) = arg;
*wordp = arg;
return (LAddrFromNative(wordp));
}
case 1: /* unbox */
{
float dest;
int ret;
LispPTR ret;
N_MakeFloat(arg, dest, arg);
ret = *(int *)&dest;
ret = *(LispPTR *)&dest;
return (ret);
}
case 2: /* abs */ return (0x7FFFFFFF & arg);