ObjFW  Diff

Differences From Artifact [abd59c7cd9]:

To Artifact [0b675f054e]:


218
219
220
221
222
223
224


225
226
227
228
229
230
231
232
233






234
235






236





237
238
239
240
241


242
243
244
245
246

247
248

249

250
251


252
253
254
255
256
257
258
218
219
220
221
222
223
224
225
226
227
228
229
230
231




232
233
234
235
236
237
238
239
240
241
242
243
244
245

246
247
248
249
250
251
252
253


254
255
256
257
258
259

260
261
262
263

264


265
266
267
268
269
270
271
272
273







+
+





-
-
-
-
+
+
+
+
+
+


+
+
+
+
+
+
-
+
+
+
+
+



-
-
+
+




-
+


+
-
+
-
-
+
+







{
	OFEnumerator *enumerator = [[archive entries] objectEnumerator];
	OFZIPArchiveEntry *entry;

	while ((entry = [enumerator nextObject]) != nil) {
		void *pool = objc_autoreleasePoolPush();

		[of_stdout writeLine: [entry fileName]];

		if (_outputLevel >= 1) {
			OFString *date = [[entry modificationDate]
			    localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"];

			[of_stdout writeFormat:
			    @"%@: %" PRIu64 @" (%" PRIu64 @") bytes; %08X; %@; "
			    @"%@", [entry fileName], [entry uncompressedSize],
			    [entry compressedSize], [entry CRC32], date,
			    [entry fileComment]];
			    @"\tCompressed: %" PRIu64 @" bytes\n"
			    @"\tUncompressed: %" PRIu64 @" bytes\n"
			    @"\tCRC32: %08X\n"
			    @"\tModification date: %@\n",
			    [entry compressedSize], [entry uncompressedSize],
			    [entry CRC32], date];

			if (_outputLevel >= 2) {
				uint16_t versionMadeBy = [entry versionMadeBy];

				[of_stdout writeFormat:
				    @"\tVersion made by: %@\n"
				    @"\tMinimum version needed: %@\n",
				    of_zip_archive_entry_version_to_string(
				if (([entry versionMadeBy] >> 8) ==
				    versionMadeBy),
				    of_zip_archive_entry_version_to_string(
				    [entry minVersionNeeded])];

				if ((versionMadeBy >> 8) ==
				    OF_ZIP_ARCHIVE_ENTRY_ATTR_COMPAT_UNIX) {
					uint32_t mode = [entry
					    versionSpecificAttributes] >> 16;
					[of_stdout writeFormat: @"; %06o",
								mode];
					[of_stdout writeFormat:
					    @"\tMode: %06o\n", mode];
				}
			}

			if (_outputLevel >= 3)
				[of_stdout writeFormat: @"; %@",
				[of_stdout writeFormat: @"\tExtra field: %@\n",
							[entry extraField]];

			if ([[entry fileComment] length] > 0)
			[of_stdout writeString: @"\n"];
				[of_stdout writeFormat: @"\tComment: %@\n",
		} else
			[of_stdout writeLine: [entry fileName]];
							[entry fileComment]];
		}

		objc_autoreleasePoolPop(pool);
	}
}

- (void)extractFiles: (OFArray*)files
	 fromArchive: (OFZIPArchive*)archive