mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-26 20:02:37 +00:00
Reformat all C source files with Clang-format in Google style w/ 100 col width.
This commit is contained in:
50
src/ubf3.c
Executable file → Normal file
50
src/ubf3.c
Executable file → Normal file
@@ -3,7 +3,6 @@ static char *id = "$Id: ubf3.c,v 1.3 1999/05/31 23:35:45 sybalsky Exp $ Copyrigh
|
||||
/* ubf3.c
|
||||
*/
|
||||
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* (C) Copyright 1989-95 Venue. All Rights Reserved. */
|
||||
@@ -18,10 +17,6 @@ static char *id = "$Id: ubf3.c,v 1.3 1999/05/31 23:35:45 sybalsky Exp $ Copyrigh
|
||||
|
||||
#include "version.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "lispemul.h"
|
||||
#include "lspglob.h"
|
||||
@@ -30,31 +25,30 @@ static char *id = "$Id: ubf3.c,v 1.3 1999/05/31 23:35:45 sybalsky Exp $ Copyrigh
|
||||
#include "medleyfp.h"
|
||||
|
||||
/************************************************************
|
||||
N_OP_ubfloat3 -- op 062
|
||||
N_OP_ubfloat3 -- op 062
|
||||
062/0 POLY
|
||||
***********************************************************/
|
||||
|
||||
LispPTR N_OP_ubfloat3(int arg3, LispPTR arg2, LispPTR arg1, int alpha)
|
||||
{
|
||||
REGISTER float val;
|
||||
REGISTER float ans;
|
||||
REGISTER float *fptr;
|
||||
register int degree;
|
||||
int ret;
|
||||
float flot;
|
||||
LispPTR N_OP_ubfloat3(int arg3, LispPTR arg2, LispPTR arg1, int alpha) {
|
||||
REGISTER float val;
|
||||
REGISTER float ans;
|
||||
REGISTER float *fptr;
|
||||
register int degree;
|
||||
int ret;
|
||||
float flot;
|
||||
|
||||
val = *(float *)&arg3; /* why? */
|
||||
if (alpha) ERROR_EXIT(arg1);
|
||||
FPCLEAR;
|
||||
if ((arg1 & SEGMASK) != S_POSITIVE) ERROR_EXIT(arg1);
|
||||
degree = 0xFFFF & arg1;
|
||||
fptr = (float *)Addr68k_from_LADDR(arg2);
|
||||
ans = *((float *)fptr);
|
||||
while (degree--) ans = (ans * val) + *((float *)(++fptr));
|
||||
if (FPTEST(ans)) ERROR_EXIT(arg1); /* relies on contagion of inf, nan? */
|
||||
flot = ans;
|
||||
ret = *(int *)&flot; /* why? */
|
||||
return(ret);
|
||||
}/* end N_OP_ubfloat3() */
|
||||
val = *(float *)&arg3; /* why? */
|
||||
if (alpha) ERROR_EXIT(arg1);
|
||||
FPCLEAR;
|
||||
if ((arg1 & SEGMASK) != S_POSITIVE) ERROR_EXIT(arg1);
|
||||
degree = 0xFFFF & arg1;
|
||||
fptr = (float *)Addr68k_from_LADDR(arg2);
|
||||
ans = *((float *)fptr);
|
||||
while (degree--) ans = (ans * val) + *((float *)(++fptr));
|
||||
if (FPTEST(ans)) ERROR_EXIT(arg1); /* relies on contagion of inf, nan? */
|
||||
flot = ans;
|
||||
ret = *(int *)&flot; /* why? */
|
||||
return (ret);
|
||||
} /* end N_OP_ubfloat3() */
|
||||
|
||||
/* end module */
|
||||
/* end module */
|
||||
|
||||
Reference in New Issue
Block a user