ObjFW  Check-in [bf0db50a84]

Overview
Comment:OFZIPArchiveEntry: Export the extra field.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bf0db50a8402dd4cc722289a709a0c31e6b9c7238fd08887e0260ef4d374686d
User & Date: js on 2013-08-15 20:23:36
Other Links: manifest | tags
Context
2013-08-20
19:03
Only use _Unwind_Backtrace() if we have DWARF EH. check-in: 2bdac84cf3 user: js tags: trunk
2013-08-15
20:23
OFZIPArchiveEntry: Export the extra field. check-in: bf0db50a84 user: js tags: trunk
19:00
Move private methods into private headers. check-in: 1d7a1cbca0 user: js tags: trunk
Changes

Modified src/OFZIPArchiveEntry+Private.h from [dbac724b50] to [1b066367d9].

22
23
24
25
26
27
28
29
30
31
32
33
34
- (instancetype)OF_initWithFile: (OFFile*)file;
- (uint16_t)OF_madeWithVersion;
- (uint16_t)OF_minVersion;
- (uint16_t)OF_generalPurposeBitFlag;
- (uint16_t)OF_compressionMethod;
- (uint16_t)OF_lastModifiedFileTime;
- (uint16_t)OF_lastModifiedFileDate;
- (OFDataArray*)OF_extraField;
- (uint16_t)OF_startDiskNumber;
- (uint16_t)OF_internalAttributes;
- (uint32_t)OF_externalAttributes;
- (uint32_t)OF_localFileHeaderOffset;
@end







|





22
23
24
25
26
27
28
29
30
31
32
33
34
- (instancetype)OF_initWithFile: (OFFile*)file;
- (uint16_t)OF_madeWithVersion;
- (uint16_t)OF_minVersion;
- (uint16_t)OF_generalPurposeBitFlag;
- (uint16_t)OF_compressionMethod;
- (uint16_t)OF_lastModifiedFileTime;
- (uint16_t)OF_lastModifiedFileDate;
- (OFDataArray*)OF_extraFieldNoCopy;
- (uint16_t)OF_startDiskNumber;
- (uint16_t)OF_internalAttributes;
- (uint32_t)OF_externalAttributes;
- (uint32_t)OF_localFileHeaderOffset;
@end

Modified src/OFZIPArchiveEntry.h from [7e3c51448d] to [6ec34bda0a].

41
42
43
44
45
46
47

48
49
50
51
52
53
54
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, copy) OFString *fileName, *fileComment;
@property (readonly) off_t compressedSize, uncompressedSize;
@property (readonly, retain) OFDate *modificationDate;
@property (readonly) uint32_t CRC32;

#endif

/*!
 * @brief Returns the file name of the entry.
 *
 * @return The file name of the entry
 */







>







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, copy) OFString *fileName, *fileComment;
@property (readonly) off_t compressedSize, uncompressedSize;
@property (readonly, retain) OFDate *modificationDate;
@property (readonly) uint32_t CRC32;
@property (readonly, copy) OFDataArray *extraField;
#endif

/*!
 * @brief Returns the file name of the entry.
 *
 * @return The file name of the entry
 */
84
85
86
87
88
89
90







91

/*!
 * @brief Returns the CRC32 checksum of the entry's file.
 *
 * @return The CRC32 checksum of the entry's file
 */
- (uint32_t)CRC32;







@end







>
>
>
>
>
>
>

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

/*!
 * @brief Returns the CRC32 checksum of the entry's file.
 *
 * @return The CRC32 checksum of the entry's file
 */
- (uint32_t)CRC32;

/*!
 * @brief Returns the extra field of the entry.
 *
 * @return The extra field of the entry
 */
- (OFDataArray*)extraField;
@end

Modified src/OFZIPArchiveEntry.m from [24e2aa1cb7] to [440732d641].

131
132
133
134
135
136
137





138
139
140
141
142
143
144
145
146
147
148
149
150
151

152
153
154
155
156
157
158
159
160
161
162
	return [date autorelease];
}

- (uint32_t)CRC32
{
	return _CRC32;
}






- (OFString*)description
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *modificationDate = [self modificationDate];
	OFString *ret;

	ret = [[OFString alloc] initWithFormat: @"<%@: %p\n"
	    @"\tFile name = %@\n"
	    @"\tFile comment = %@\n"
	    @"\tCompressed size = %jd\n"
	    @"\tUncompressed size = %jd\n"
	    @"\tModification date = %@\n"
	    @"\tCRC32 = %" @PRIu32 @"\n"

	    @"}",
	    [self class], self, _fileName, _fileComment,
	    (intmax_t)_compressedSize, (intmax_t)_uncompressedSize,
	    modificationDate, _CRC32];

	objc_autoreleasePoolPop(pool);

	return [ret autorelease];
}

- (uint16_t)OF_madeWithVersion







>
>
>
>
>














>



|







131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
	return [date autorelease];
}

- (uint32_t)CRC32
{
	return _CRC32;
}

- (OFDataArray*)extraField
{
	return [[_extraField copy] autorelease];
}

- (OFString*)description
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *modificationDate = [self modificationDate];
	OFString *ret;

	ret = [[OFString alloc] initWithFormat: @"<%@: %p\n"
	    @"\tFile name = %@\n"
	    @"\tFile comment = %@\n"
	    @"\tCompressed size = %jd\n"
	    @"\tUncompressed size = %jd\n"
	    @"\tModification date = %@\n"
	    @"\tCRC32 = %" @PRIu32 @"\n"
	    @"\tExtra field = %@\n"
	    @"}",
	    [self class], self, _fileName, _fileComment,
	    (intmax_t)_compressedSize, (intmax_t)_uncompressedSize,
	    modificationDate, _CRC32, _extraField];

	objc_autoreleasePoolPop(pool);

	return [ret autorelease];
}

- (uint16_t)OF_madeWithVersion
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
}

- (uint16_t)OF_lastModifiedFileDate
{
	return _lastModifiedFileDate;
}

- (OFDataArray*)OF_extraField
{
	OF_GETTER(_extraField, true)
}

- (uint16_t)OF_startDiskNumber
{
	return _startDiskNumber;







|







191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
}

- (uint16_t)OF_lastModifiedFileDate
{
	return _lastModifiedFileDate;
}

- (OFDataArray*)OF_extraFieldNoCopy
{
	OF_GETTER(_extraField, true)
}

- (uint16_t)OF_startDiskNumber
{
	return _startDiskNumber;