revert between 56095 -> 55830 in arch
[AROS.git] / arch / m68k-all / mathieeesingtrans / mathieeesingtrans_init.c
blobd6e77141f08c8313e7e6e75d3b75b9e6cf02c1c6
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Init of 68k/FPU mathieeesingtrans.library
6 Lang: english
7 */
8 #include <aros/symbolsets.h>
9 #include <aros/libcall.h>
10 #include <utility/utility.h> /* this must be before mathieeesingtrans_intern.h */
12 #include "mathieeesingtrans_intern.h"
14 #define SetFunc(a,b) SetFunction((struct Library *)lh, a * -LIB_VECTSIZE, AROS_SLIB_ENTRY(b,MathIeeeSingTrans,a))
16 extern void AROS_SLIB_ENTRY(ATan_6888x,MathIeeeSingTrans,5)(void);
17 extern void AROS_SLIB_ENTRY(Sin_6888x,MathIeeeSingTrans,6)(void);
18 extern void AROS_SLIB_ENTRY(Cos_6888x,MathIeeeSingTrans,7)(void);
19 extern void AROS_SLIB_ENTRY(Tan_6888x,MathIeeeSingTrans,8)(void);
20 extern void AROS_SLIB_ENTRY(Sincos_6888x,MathIeeeSingTrans,9)(void);
21 extern void AROS_SLIB_ENTRY(Sinh_6888x,MathIeeeSingTrans,10)(void);
22 extern void AROS_SLIB_ENTRY(Cosh_6888x,MathIeeeSingTrans,11)(void);
23 extern void AROS_SLIB_ENTRY(Tanh_6888x,MathIeeeSingTrans,12)(void);
24 extern void AROS_SLIB_ENTRY(Exp_6888x,MathIeeeSingTrans,13)(void);
25 extern void AROS_SLIB_ENTRY(Log_6888x,MathIeeeSingTrans,14)(void);
26 extern void AROS_SLIB_ENTRY(Pow_6888x,MathIeeeSingTrans,15)(void);
27 extern void AROS_SLIB_ENTRY(Sqrt_6888x,MathIeeeSingTrans,16)(void);
28 extern void AROS_SLIB_ENTRY(Tieee_6888x,MathIeeeSingTrans,17)(void);
29 extern void AROS_SLIB_ENTRY(Fieee_6888x,MathIeeeSingTrans,18)(void);
30 extern void AROS_SLIB_ENTRY(Asin_6888x,MathIeeeSingTrans,19)(void);
31 extern void AROS_SLIB_ENTRY(Acos_6888x,MathIeeeSingTrans,20)(void);
32 extern void AROS_SLIB_ENTRY(Log10_6888x,MathIeeeSingTrans,21)(void);
34 struct Library * MathIeeeSingBasBase;
36 static int IEEESPT_Init(struct Library *lh)
38 MathIeeeSingBasBase = OpenLibrary ("mathieeesingbas.library", 39);
39 if (!MathIeeeSingBasBase)
40 return FALSE;
42 if (SysBase->AttnFlags & (AFF_68881 | AFF_68882 | AFF_FPU40)) {
43 SetFunc(5, ATan_6888x);
44 SetFunc(6, Sin_6888x);
45 SetFunc(7, Cos_6888x);
46 SetFunc(8, Tan_6888x);
47 SetFunc(9, Sincos_6888x);
48 SetFunc(10, Sinh_6888x);
49 SetFunc(11, Cosh_6888x);
50 SetFunc(12, Tanh_6888x);
51 SetFunc(13, Exp_6888x);
52 SetFunc(14, Log_6888x);
53 /* SetFunc(15, Pow_6888x); */
54 SetFunc(16, Sqrt_6888x);
55 /* SetFunc(17, Tieee_6888x); */
56 /* SetFunc(18, Fieee_6888x); */
57 SetFunc(19, Asin_6888x);
58 SetFunc(20, Acos_6888x);
59 SetFunc(21, Log10_6888x);
61 return TRUE;
64 static int IEEESPT_Expunge(struct Library *lh)
66 if (MathIeeeSingBasBase)
67 CloseLibrary ((struct Library *)MathIeeeSingBasBase);
69 return TRUE;
72 ADD2INITLIB(IEEESPT_Init, 0)
73 ADD2EXPUNGELIB(IEEESPT_Expunge, 0);