ObjFW  Diff

Differences From Artifact [1a087004fb]:

To Artifact [9bf92ef7e1]:


37
38
39
40
41
42
43

44
45
46
47
48
49
50
#import "OFDictionary.h"
#ifdef OF_HAVE_FILES
# import "OFFile.h"
# import "OFFileManager.h"
#endif
#import "OFLocale.h"
#import "OFStream.h"

#import "OFURL.h"
#import "OFURLHandler.h"
#import "OFUTF8String.h"
#import "OFUTF8String+Private.h"
#import "OFXMLElement.h"

#import "OFInitializationFailedException.h"







>







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#import "OFDictionary.h"
#ifdef OF_HAVE_FILES
# import "OFFile.h"
# import "OFFileManager.h"
#endif
#import "OFLocale.h"
#import "OFStream.h"
#import "OFSystemInfo.h"
#import "OFURL.h"
#import "OFURLHandler.h"
#import "OFUTF8String.h"
#import "OFUTF8String+Private.h"
#import "OFXMLElement.h"

#import "OFInitializationFailedException.h"
2707
2708
2709
2710
2711
2712
2713

2714
2715
2716
2717












2718
2719
2720
2721

2722

2723
2724
2725
2726
2727
2728
2729
	    OF_UNICODE_DECOMPOSITION_COMPAT_TABLE_SIZE);
}
#endif

#ifdef OF_WINDOWS
- (OFString *)stringByExpandingWindowsEnvironmentStrings
{

	wchar_t buffer[512];
	size_t length;

	if ((length = ExpandEnvironmentStringsW(self.UTF16String, buffer,












	    sizeof(buffer))) == 0)
		return self;

	return [OFString stringWithUTF16String: buffer

					length: length - 1];

}
#endif

#ifdef OF_HAVE_FILES
- (void)writeToFile: (OFString *)path
{
	[self writeToFile: path







>
|
|

|
>
>
>
>
>
>
>
>
>
>
>
>
|
|

|
>
|
>







2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
	    OF_UNICODE_DECOMPOSITION_COMPAT_TABLE_SIZE);
}
#endif

#ifdef OF_WINDOWS
- (OFString *)stringByExpandingWindowsEnvironmentStrings
{
	if ([OFSystemInfo isWindowsNT]) {
		wchar_t buffer[512];
		size_t length;

		if ((length = ExpandEnvironmentStringsW(self.UTF16String,
		    buffer, sizeof(buffer))) == 0)
			return self;

		return [OFString stringWithUTF16String: buffer
						length: length - 1];
	} else {
		of_string_encoding_t encoding = [OFLocale encoding];
		char buffer[512];
		size_t length;

		if ((length = ExpandEnvironmentStringsA(
		    [self cStringWithEncoding: encoding], buffer,
		    sizeof(buffer))) == 0)
			return self;

		return [OFString stringWithCString: buffer
					  encoding: encoding
					    length: length - 1];
	}
}
#endif

#ifdef OF_HAVE_FILES
- (void)writeToFile: (OFString *)path
{
	[self writeToFile: path