@@ -40,11 +40,11 @@ OF_APPLICATION_DELEGATE(OFHash) static void help(void) { - [of_stderr writeLine: OF_LOCALIZED(@"usage", + [OFStdErr writeLine: OF_LOCALIZED(@"usage", @"Usage: %[prog] [--md5|--ripemd160|--sha1|--sha224|--sha256|" @"--sha384|--sha512] file1 [file2 ...]", @"prog", [OFApplication programName])]; [OFApplication terminateWithStatus: 1]; @@ -54,16 +54,16 @@ printHash(OFString *algo, OFString *path, id hash) { const unsigned char *digest = hash.digest; size_t digestSize = hash.digestSize; - [of_stdout writeFormat: @"%@ ", algo]; + [OFStdOut writeFormat: @"%@ ", algo]; for (size_t i = 0; i < digestSize; i++) - [of_stdout writeFormat: @"%02x", digest[i]]; + [OFStdOut writeFormat: @"%02x", digest[i]]; - [of_stdout writeFormat: @" %@\n", path]; + [OFStdOut writeFormat: @" %@\n", path]; } @implementation OFHash - (void)applicationDidFinishLaunching { @@ -99,19 +99,19 @@ while ((option = [optionsParser nextOption]) != '\0') { switch (option) { case '?': if (optionsParser.lastLongOption != nil) - [of_stderr writeLine: + [OFStdErr writeLine: OF_LOCALIZED(@"unknown_long_option", @"%[prog]: Unknown option: --%[opt]", @"prog", [OFApplication programName], @"opt", optionsParser.lastLongOption)]; else { OFString *optStr = [OFString stringWithFormat: @"%c", optionsParser.lastOption]; - [of_stderr writeLine: + [OFStdErr writeLine: OF_LOCALIZED(@"unknown_option", @"%[prog]: Unknown option: -%[opt]", @"prog", [OFApplication programName], @"opt", optStr)]; } @@ -166,20 +166,20 @@ for (OFString *path in optionsParser.remainingArguments) { void *pool = objc_autoreleasePoolPush(); OFStream *file; if ([path isEqual: @"-"]) - file = of_stdin; + file = OFStdIn; else { @try { file = [OFFile fileWithPath: path mode: @"r"]; } @catch (OFOpenItemFailedException *e) { OFString *error = [OFString stringWithCString: strerror(e.errNo) encoding: [OFLocale encoding]]; - [of_stderr writeLine: OF_LOCALIZED( + [OFStdErr writeLine: OF_LOCALIZED( @"failed_to_open_file", @"Failed to open file %[file]: %[error]", @"file", e.path, @"error", error)]; @@ -206,11 +206,11 @@ } @catch (OFReadFailedException *e) { OFString *error = [OFString stringWithCString: strerror(e.errNo) encoding: [OFLocale encoding]]; - [of_stderr writeLine: OF_LOCALIZED( + [OFStdErr writeLine: OF_LOCALIZED( @"failed_to_read_file", @"Failed to read %[file]: %[error]", @"file", path, @"error", error)];