ObjFW  Diff

Differences From Artifact [c0aec31b97]:

To Artifact [1e6c9574a4]:


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"

#if defined(OF_MORPHOS) && !defined(OF_IXEMUL)
# define BOOL EXEC_BOOL
# include <proto/dos.h>
# include <proto/locale.h>
# undef BOOL
#endif

static OFLocalization *sharedLocalization = nil;

#if !defined(OF_MORPHOS) || defined(OF_IXEMUL)
static void
parseLocale(char *locale, of_string_encoding_t *encoding,
    OFString **language, OFString **territory)
{
	if ((locale = of_strdup(locale)) == NULL)
		return;








|








|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"

#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"

#ifdef OF_MORPHOS
# define BOOL EXEC_BOOL
# include <proto/dos.h>
# include <proto/locale.h>
# undef BOOL
#endif

static OFLocalization *sharedLocalization = nil;

#ifndef OF_MORPHOS
static void
parseLocale(char *locale, of_string_encoding_t *encoding,
    OFString **language, OFString **territory)
{
	if ((locale = of_strdup(locale)) == NULL)
		return;

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#endif

- init
{
	self = [super init];

	@try {
#if !defined(OF_MORPHOS) || defined(OF_IXEMUL)
		char *locale, *messagesLocale = NULL;

		_encoding = OF_STRING_ENCODING_UTF_8;
		_decimalPoint = @".";
		_localizedStrings = [[OFMutableArray alloc] init];

		if ((locale = setlocale(LC_ALL, "")) != NULL)







|







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#endif

- init
{
	self = [super init];

	@try {
#ifndef OF_MORPHOS
		char *locale, *messagesLocale = NULL;

		_encoding = OF_STRING_ENCODING_UTF_8;
		_decimalPoint = @".";
		_localizedStrings = [[OFMutableArray alloc] init];

		if ((locale = setlocale(LC_ALL, "")) != NULL)