some fixes to accented characters
[tangerine.git] / rom / utility / utility_init.c
blob98ec3ef8e716bbbd56b782c6cbc37af561e84969
1 /*
2 Copyright © 1995-2006, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Utility Resident and initialization.
6 Lang: english
7 */
9 #include <aros/symbolsets.h>
11 #include "intern.h"
12 #include LC_LIBDEFS_FILE
14 extern ULONG AROS_SLIB_ENTRY(SMult32_020,Utility)();
15 extern ULONG AROS_SLIB_ENTRY(UMult32_020,Utility)();
16 extern ULONG AROS_SLIB_ENTRY(SMult64_020,Utility)();
17 extern ULONG AROS_SLIB_ENTRY(UMult64_020,Utility)();
18 extern ULONG AROS_SLIB_ENTRY(SDivMod32_020,Utility)();
19 extern ULONG AROS_SLIB_ENTRY(UDivMod32_020,Utility)();
21 #define SetFunc(a,b) SetFunction((struct Library *)LIBBASETYPE, a * -LIB_VECTSIZE, AROS_SLIB_ENTRY(b,Utility))
23 static int UtilityInit(LIBBASETYPEPTR LIBBASE)
25 GetIntUtilityBase(LIBBASE)->ub_LastID = 0;
28 I no longer allocate memory here for the global namespace, since
29 that is not quite legal. (AllocMem is not Forbid() protected).
31 Also makes this a little bit shorter. (In time and length).
33 InitSemaphore(&GetIntUtilityBase(LIBBASE)->ub_NameSpace.ns_Lock);
34 NEWLIST((struct List *)&GetIntUtilityBase(LIBBASE)->ub_NameSpace.ns_List);
35 GetIntUtilityBase(LIBBASE)->ub_NameSpace.ns_Flags = NSF_NODUPS;
37 #if defined(__mc68000__)
38 /* Are we running on a m68020 or higher?
39 If so we should setfunction all the relevant functions to use
40 native code.
42 if(SysBase->AttnFlags & AFF_68020)
45 SetFunc(23, SMult32_020);
46 SetFunc(24, UMult32_020);
47 SetFunc(25, SDivMod32_020);
48 SetFunc(26, UDivMod32_020);
51 #if 0
52 /* The 060 doesn't have some of the instructions I use... */
53 if((SysBase->AttnFlags & AFF_68060) == 0)
55 SetFunc(33, SMult64_020);
56 SetFunc(34, UMult64_020);
58 #endif
60 #endif
62 return TRUE;
65 ADD2INITLIB(UtilityInit, 0);