@@ -129,11 +129,11 @@ OFLHAArchiveEntry *entry; while ((entry = [_archive nextEntry]) != nil) { void *pool = objc_autoreleasePoolPush(); - [of_stdout writeLine: entry.fileName]; + [OFStdOut writeLine: entry.fileName]; if (app->_outputLevel >= 1) { OFString *date = [entry.date localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"]; OFString *compressedSize = [OFString stringWithFormat: @@ -141,78 +141,78 @@ OFString *uncompressedSize = [OFString stringWithFormat: @"%" PRIu32, entry.uncompressedSize]; OFString *CRC16 = [OFString stringWithFormat: @"%04" PRIX16, entry.CRC16]; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_compressed_size", @"[" @" 'Compressed: '," @" [" @" {'size == 1': '1 byte'}," @" {'': '%[size] bytes'}" @" ]" @"]".objectByParsingJSON, @"size", compressedSize)]; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_uncompressed_size", @"[" @" 'Uncompressed: '," @" [" @" {'size == 1': '1 byte'}," @" {'': '%[size] bytes'}" @" ]" @"]".objectByParsingJSON, @"size", uncompressedSize)]; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_compression_method", @"Compression method: %[method]", @"method", entry.compressionMethod)]; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED(@"list_crc16", + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED(@"list_crc16", @"CRC16: %[crc16]", @"crc16", CRC16)]; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED(@"list_date", + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED(@"list_date", @"Date: %[date]", @"date", date)]; if (entry.mode != nil) { OFString *modeString = [OFString stringWithFormat: @"%ho", entry.mode.unsignedShortValue]; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED(@"list_mode", + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED(@"list_mode", @"Mode: %[mode]", @"mode", modeString)]; } if (entry.UID != nil) { - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED(@"list_uid", + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED(@"list_uid", @"UID: %[uid]", @"uid", entry.UID)]; } if (entry.GID != nil) { - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED(@"list_gid", + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED(@"list_gid", @"GID: %[gid]", @"gid", entry.GID)]; } if (entry.owner != nil) { - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_owner", @"Owner: %[owner]", @"owner", entry.owner)]; } if (entry.group != nil) { - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_group", @"Group: %[group]", @"group", entry.group)]; } @@ -219,23 +219,23 @@ if (app->_outputLevel >= 2) { OFString *headerLevel = [OFString stringWithFormat: @"%" PRIu8, entry.headerLevel]; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_header_level", @"Header level: %[level]", @"level", headerLevel)]; if (entry.operatingSystemIdentifier != '\0') { OFString *OSID = [OFString stringWithFormat: @"%c", entry.operatingSystemIdentifier]; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_osid", @"Operating system identifier: " "%[osid]", @"osid", OSID)]; } @@ -242,12 +242,12 @@ if (entry.modificationDate != nil) { OFString *modificationDate = entry.modificationDate.description; - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_modification_date", @"Modification date: %[date]", @"date", modificationDate)]; } } @@ -254,12 +254,12 @@ if (app->_outputLevel >= 3) { OFString *extensions = indent(entry.extensions.description); - [of_stdout writeString: @"\t"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\t"]; + [OFStdOut writeLine: OF_LOCALIZED( @"list_extensions", @"Extensions: %[extensions]", @"extensions", extensions)]; } } @@ -290,21 +290,21 @@ [missing removeObject: fileName]; outFileName = [app safeLocalPathForPath: fileName]; if (outFileName == nil) { - [of_stderr writeLine: OF_LOCALIZED( + [OFStdErr writeLine: OF_LOCALIZED( @"refusing_to_extract_file", @"Refusing to extract %[file]!", @"file", fileName)]; app->_exitStatus = 1; goto outer_loop_end; } if (app->_outputLevel >= 0) - [of_stdout writeString: OF_LOCALIZED(@"extracting_file", + [OFStdOut writeString: OF_LOCALIZED(@"extracting_file", @"Extracting %[file]...", @"file", fileName)]; if ([fileName hasSuffix: @"/"]) { [fileManager createDirectoryAtPath: outFileName @@ -311,12 +311,12 @@ createParents: true]; setPermissions(outFileName, entry); setModificationDate(outFileName, entry); if (app->_outputLevel >= 0) { - [of_stdout writeString: @"\r"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\r"]; + [OFStdOut writeLine: OF_LOCALIZED( @"extracting_file_done", @"Extracting %[file]... done", @"file", fileName)]; } @@ -354,12 +354,12 @@ percent = newPercent; percentString = [OFString stringWithFormat: @"%3u", percent]; - [of_stdout writeString: @"\r"]; - [of_stdout writeString: OF_LOCALIZED( + [OFStdOut writeString: @"\r"]; + [OFStdOut writeString: OF_LOCALIZED( @"extracting_file_percent", @"Extracting %[file]... %[percent]%", @"file", fileName, @"percent", percentString)]; } @@ -367,12 +367,12 @@ [output close]; setModificationDate(outFileName, entry); if (app->_outputLevel >= 0) { - [of_stdout writeString: @"\r"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\r"]; + [OFStdOut writeLine: OF_LOCALIZED( @"extracting_file_done", @"Extracting %[file]... done", @"file", fileName)]; } @@ -380,11 +380,11 @@ objc_autoreleasePoolPop(pool); } if (missing.count > 0) { for (OFString *file in missing) - [of_stderr writeLine: OF_LOCALIZED( + [OFStdErr writeLine: OF_LOCALIZED( @"file_not_in_archive", @"File %[file] is not in the archive!", @"file", file)]; app->_exitStatus = 1; @@ -395,11 +395,11 @@ { OFMutableSet *files; OFLHAArchiveEntry *entry; if (files_.count < 1) { - [of_stderr writeLine: OF_LOCALIZED(@"print_no_file_specified", + [OFStdErr writeLine: OF_LOCALIZED(@"print_no_file_specified", @"Need one or more files to print!")]; app->_exitStatus = 1; return; } @@ -414,11 +414,11 @@ stream = [_archive streamForReadingCurrentEntry]; while (!stream.atEndOfStream) { ssize_t length = [app copyBlockFromStream: stream - toStream: of_stdout + toStream: OFStdOut fileName: fileName]; if (length < 0) { app->_exitStatus = 1; return; @@ -431,11 +431,11 @@ if (files.count == 0) break; } for (OFString *file in files) { - [of_stderr writeLine: OF_LOCALIZED(@"file_not_in_archive", + [OFStdErr writeLine: OF_LOCALIZED(@"file_not_in_archive", @"File %[file] is not in the archive!", @"file", file)]; app->_exitStatus = 1; } } @@ -443,11 +443,11 @@ - (void)addFiles: (OFArray OF_GENERIC(OFString *) *)files { OFFileManager *fileManager = [OFFileManager defaultManager]; if (files.count < 1) { - [of_stderr writeLine: OF_LOCALIZED(@"add_no_file_specified", + [OFStdErr writeLine: OF_LOCALIZED(@"add_no_file_specified", @"Need one or more files to add!")]; app->_exitStatus = 1; return; } @@ -457,11 +457,11 @@ OFFileAttributeType type; OFMutableLHAArchiveEntry *entry; OFStream *output; if (app->_outputLevel >= 0) - [of_stdout writeString: OF_LOCALIZED(@"adding_file", + [OFStdOut writeString: OF_LOCALIZED(@"adding_file", @"Adding %[file]...", @"file", fileName)]; attributes = [fileManager attributesOfItemAtPath: fileName]; type = attributes.fileType; @@ -516,23 +516,23 @@ percent = newPercent; percentString = [OFString stringWithFormat: @"%3u", percent]; - [of_stdout writeString: @"\r"]; - [of_stdout writeString: OF_LOCALIZED( + [OFStdOut writeString: @"\r"]; + [OFStdOut writeString: OF_LOCALIZED( @"adding_file_percent", @"Adding %[file]... %[percent]%", @"file", fileName, @"percent", percentString)]; } } } if (app->_outputLevel >= 0) { - [of_stdout writeString: @"\r"]; - [of_stdout writeLine: OF_LOCALIZED( + [OFStdOut writeString: @"\r"]; + [OFStdOut writeLine: OF_LOCALIZED( @"adding_file_done", @"Adding %[file]... done", @"file", fileName)]; }