2 Copyright © 2013, The AROS Development Team. All rights reserved.
5 #include <proto/exec.h>
6 #include <proto/locale.h>
7 #include <proto/intuition.h>
9 /* Internal function __libfindandopen will only open a library when it is
10 already in the list of open libraries
12 struct LocaleBase
*LocaleBase
= NULL
;
13 struct IntuitionBase
*IntuitionBase
= NULL
;
15 static struct Library
*__libfindandopen(const char *libname
, int version
)
20 found
= FindName(&SysBase
->LibList
, libname
);
23 return (found
!= NULL
) ? OpenLibrary(libname
, version
) : NULL
;
26 int __locale_available(void)
28 if (LocaleBase
== NULL
)
29 LocaleBase
= (struct LocaleBase
*)__libfindandopen("locale.library", 0);
31 return LocaleBase
!= NULL
;
34 int __intuition_available(void)
36 if (IntuitionBase
== NULL
)
37 IntuitionBase
= (struct IntuitionBase
*)__libfindandopen("intuition.library", 0);
39 return IntuitionBase
!= NULL
;