19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#include <proto/exec.h>
#undef Class
#import "OFInitializationFailedException.h"
#import "macros.h"
#ifdef OF_AMIGAOS4
extern struct Library *DOSBase;
extern struct DOSIFace *IDOS;
#endif
struct Library *LocaleBase;
#ifdef OF_AMIGAOS4
struct LocaleIFace *ILocale;
#endif
OF_CONSTRUCTOR()
{
#ifdef OF_AMIGAOS4
if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL)
@throw [OFInitializationFailedException exception];
if ((IDOS = (struct DOSIFace *)
GetInterface(DOSBase, "main", 1, NULL)) == NULL)
@throw [OFInitializationFailedException exception];
#endif
if ((LocaleBase = OpenLibrary("locale.library", 38)) == NULL)
@throw [OFInitializationFailedException exception];
|
>
>
>
|
>
>
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#include <proto/exec.h>
#undef Class
#import "OFInitializationFailedException.h"
#import "macros.h"
#ifdef OF_COMPILING_AMIGA_LIBRARY
struct Library *DOSBase;
#endif
#ifdef OF_AMIGAOS4
extern struct Library *DOSBase;
extern struct DOSIFace *IDOS;
#endif
struct Library *LocaleBase;
#ifdef OF_AMIGAOS4
struct LocaleIFace *ILocale;
#endif
OF_CONSTRUCTOR()
{
#if defined(OF_COMPILING_AMIGA_LIBRARY) || defined(OF_AMIGAOS4)
if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL)
@throw [OFInitializationFailedException exception];
#endif
#ifdef OF_AMIGAOS4
if ((IDOS = (struct DOSIFace *)
GetInterface(DOSBase, "main", 1, NULL)) == NULL)
@throw [OFInitializationFailedException exception];
#endif
if ((LocaleBase = OpenLibrary("locale.library", 38)) == NULL)
@throw [OFInitializationFailedException exception];
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
DropInterface((struct Interface *)ILocale);
#endif
if (LocaleBase != NULL)
CloseLibrary(LocaleBase);
#ifdef OF_AMIGAOS4
if (DOSBase != NULL)
CloseLibrary(DOSBase);
if (IDOS != NULL)
DropInterface((struct Interface *)IDOS);
#endif
}
|
<
<
<
|
>
>
>
>
>
|
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
DropInterface((struct Interface *)ILocale);
#endif
if (LocaleBase != NULL)
CloseLibrary(LocaleBase);
#ifdef OF_AMIGAOS4
if (IDOS != NULL)
DropInterface((struct Interface *)IDOS);
#endif
#if defined(OF_COMPILING_AMIGA_LIBRARY) || defined(OF_AMIGAOS4)
if (DOSBase != NULL)
CloseLibrary(DOSBase);
#endif
}
|