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