ObjFW  Diff

Differences From Artifact [2207aef52d]:

To Artifact [2e4f49497d]:


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFApplication.h"

#import "OFNotImplementedException.h"

#ifdef __APPLE__
# include <NSSystemDirectories.h>
#endif
#ifdef _WIN32
# include <windows.h>
#endif
#ifdef __HAIKU__
# include <FindDirectory.h>







|







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#import "OFString.h"
#import "OFArray.h"
#import "OFDictionary.h"
#import "OFApplication.h"

#import "OFNotImplementedException.h"

#if defined(__APPLE__) && !defined(OF_IOS)
# include <NSSystemDirectories.h>
#endif
#ifdef _WIN32
# include <windows.h>
#endif
#ifdef __HAIKU__
# include <FindDirectory.h>
133
134
135
136
137
138
139

140
141
142
143
144
145
146
147
{
	/* FIXME */
	return OF_STRING_ENCODING_UTF_8;
}

+ (OFString*)userDataPath
{

#if defined(__APPLE__)
	void *pool = objc_autoreleasePoolPush();
	char pathC[PATH_MAX];
	NSSearchPathEnumerationState state;
	OFMutableString *path;
	OFString *home;

	state = NSStartSearchPathEnumeration(NSApplicationSupportDirectory,







>
|







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
	/* FIXME */
	return OF_STRING_ENCODING_UTF_8;
}

+ (OFString*)userDataPath
{
	/* TODO: Return something more sensible for iOS */
#if defined(__APPLE__) && !defined(OF_IOS)
	void *pool = objc_autoreleasePoolPush();
	char pathC[PATH_MAX];
	NSSearchPathEnumerationState state;
	OFMutableString *path;
	OFString *home;

	state = NSStartSearchPathEnumeration(NSApplicationSupportDirectory,
212
213
214
215
216
217
218

219
220
221
222
223
224
225
226
	objc_autoreleasePoolPop(pool);
	return [var autorelease];
#endif
}

+ (OFString*)userConfigPath
{

#if defined(__APPLE__)
	void *pool = objc_autoreleasePoolPush();
	char pathC[PATH_MAX];
	NSSearchPathEnumerationState state;
	OFMutableString *path;
	OFString *home;

	state = NSStartSearchPathEnumeration(NSLibraryDirectory,







>
|







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
	objc_autoreleasePoolPop(pool);
	return [var autorelease];
#endif
}

+ (OFString*)userConfigPath
{
	/* TODO: Return something more sensible for iOS */
#if defined(__APPLE__) && !defined(OF_IOS)
	void *pool = objc_autoreleasePoolPush();
	char pathC[PATH_MAX];
	NSSearchPathEnumerationState state;
	OFMutableString *path;
	OFString *home;

	state = NSStartSearchPathEnumeration(NSLibraryDirectory,