Differences From Artifact [c0aec31b97]:
- File src/OFLocalization.m — part of check-in [d974e769c5] at 2017-06-04 01:30:12 on branch trunk — OFLocalization: Add support for MorphOS + libnix (user: js, size: 8776) [annotate] [blame] [check-ins using]
To Artifact [1e6c9574a4]:
- File
src/OFLocalization.m
— part of check-in
[c9621825fc]
at
2017-06-04 18:48:03
on branch trunk
— Treat MorphOS + ixemul as a separate platform
This reduces the ifdef hell and makes much more sense, as with ixemul,
no native calls are allowed. (user: js, size: 8691) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
22 23 24 25 26 27 28 | #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" | | | | 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 | #endif - init { self = [super init]; @try { | | | 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) |
︙ | ︙ |