ObjFW  Check-in [abf95ba35e]

Overview
Comment:Make GCC happy again
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: abf95ba35ec489f43f44b4d2f96a51f19d5973d90f273de57e9d1b30559e205c
User & Date: js on 2018-06-17 02:54:49
Other Links: manifest | tags
Context
2018-06-17
11:03
OFLHAArchive: Correctly write directory name check-in: 816ec4d0f5 user: js tags: trunk
02:54
Make GCC happy again check-in: abf95ba35e user: js tags: trunk
01:01
OFLHAArchive: Add write and append support check-in: 54fe3999b7 user: js tags: trunk
Changes

Modified src/OFLHAArchive_LHStream.m from [3ba001d7d1] to [9b4adc6443].

275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
					if OF_UNLIKELY (!tryReadBits(self,
					    &bits, 9))
						return bytesWritten;

					skipCount = bits + 20;
					break;
				default:
					assert(0);
				}

				if OF_UNLIKELY (_codesReceived + skipCount >
				    _codesCount)
					@throw [OFInvalidFormatException
					    exception];








|







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
					if OF_UNLIKELY (!tryReadBits(self,
					    &bits, 9))
						return bytesWritten;

					skipCount = bits + 20;
					break;
				default:
					OF_ENSURE(0);
				}

				if OF_UNLIKELY (_codesReceived + skipCount >
				    _codesCount)
					@throw [OFInvalidFormatException
					    exception];

Modified src/OFTarArchive.m from [370be37c72] to [9cb41be19d].

50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@interface OFTarArchive_FileWriteStream: OFStream <OFReadyForWritingObserving>
{
	OFTarArchiveEntry *_entry;
	OF_KINDOF(OFStream *) _stream;
	uint64_t _toWrite;
}

- (instancetype)of_initWithStream: (OFStream *)stream
			    entry: (OFTarArchiveEntry *)entry;
@end

@implementation OFTarArchive: OFObject
@synthesize encoding = _encoding;

+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream







|







50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@interface OFTarArchive_FileWriteStream: OFStream <OFReadyForWritingObserving>
{
	OFTarArchiveEntry *_entry;
	OF_KINDOF(OFStream *) _stream;
	uint64_t _toWrite;
}

- (instancetype)of_initWithStream: (OF_KINDOF(OFStream *))stream
			    entry: (OFTarArchiveEntry *)entry;
@end

@implementation OFTarArchive: OFObject
@synthesize encoding = _encoding;

+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream

Modified src/OFURL.m from [543fd659f7] to [f9c0df659c].

65
66
67
68
69
70
71


72
73
74
75
76
77
78
static OFString *
pathToURLPath(OFString *path)
{
# if defined(OF_WINDOWS) || defined(OF_MSDOS)
	path = [path stringByReplacingOccurrencesOfString: @"\\"
					       withString: @"/"];
	path = [path stringByPrependingString: @"/"];


# elif defined(OF_AMIGAOS)
	OFArray OF_GENERIC(OFString *) *components = [path pathComponents];
	OFMutableString *ret = [OFMutableString string];

	for (OFString *component in components) {
		if ([component length] == 0)
			continue;







>
>







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
static OFString *
pathToURLPath(OFString *path)
{
# if defined(OF_WINDOWS) || defined(OF_MSDOS)
	path = [path stringByReplacingOccurrencesOfString: @"\\"
					       withString: @"/"];
	path = [path stringByPrependingString: @"/"];

	return path;
# elif defined(OF_AMIGAOS)
	OFArray OF_GENERIC(OFString *) *components = [path pathComponents];
	OFMutableString *ret = [OFMutableString string];

	for (OFString *component in components) {
		if ([component length] == 0)
			continue;
96
97
98
99
100
101
102


103
104
105
106
107
108
109
static OFString *
URLPathToPath(OFString *path)
{
# if defined(OF_WINDOWS) || defined(OF_MSDOS)
	path = [path substringWithRange: of_range(1, [path length] - 1)];
	path = [path stringByReplacingOccurrencesOfString: @"/"
					       withString: @"\\"];


# elif defined(OF_AMIGAOS)
	OFMutableArray OF_GENERIC(OFString *) *components;
	size_t count;

	path = [path substringWithRange: of_range(1, [path length] - 1)];
	components = [[[path
	    componentsSeparatedByString: @"/"] mutableCopy] autorelease];







>
>







98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
static OFString *
URLPathToPath(OFString *path)
{
# if defined(OF_WINDOWS) || defined(OF_MSDOS)
	path = [path substringWithRange: of_range(1, [path length] - 1)];
	path = [path stringByReplacingOccurrencesOfString: @"/"
					       withString: @"\\"];

	return path;
# elif defined(OF_AMIGAOS)
	OFMutableArray OF_GENERIC(OFString *) *components;
	size_t count;

	path = [path substringWithRange: of_range(1, [path length] - 1)];
	components = [[[path
	    componentsSeparatedByString: @"/"] mutableCopy] autorelease];