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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFOpenItemFailedException.h"
#ifdef OF_AMIGAOS
# ifdef OF_AMIGAOS4
# define __NOLIBBASE__
# define __NOGLOBALIFACE__
# define __USE_INLINE__
# endif
# include <proto/dos.h>
# include <proto/exec.h>
# include <proto/locale.h>
#endif
static OFLocale *currentLocale = nil;
#ifdef OF_AMIGAOS4
extern struct ExecIFace *IExec;
static struct Library *DOSBase = NULL;
static struct DOSIFace *IDOS = NULL;
static struct Library *LocaleBase = NULL;
static struct LocaleIFace *ILocale = NULL;
OF_DESTRUCTOR()
{
if (ILocale != NULL)
DropInterface(ILocale);
if (LocaleBase != NULL)
CloseLibrary(LocaleBase);
if (IDOS != NULL)
DropInterface(IDOS);
if (DOSBase != NULL)
CloseLibrary(DOSBase);
}
#endif
#ifndef OF_AMIGAOS
static void
parseLocale(char *locale, of_string_encoding_t *encoding,
OFString **language, OFString **territory)
{
if ((locale = of_strdup(locale)) == NULL)
return;
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFOpenItemFailedException.h"
#ifdef OF_AMIGAOS
# define __USE_INLINE__
# include <proto/dos.h>
# include <proto/exec.h>
# include <proto/locale.h>
#endif
static OFLocale *currentLocale = nil;
#ifndef OF_AMIGAOS
static void
parseLocale(char *locale, of_string_encoding_t *encoding,
OFString **language, OFString **territory)
{
if ((locale = of_strdup(locale)) == NULL)
return;
|