Adjust to ObjFW changes

This commit is contained in:
Jonathan Schleifer 2017-04-15 19:56:14 +02:00
parent 5231f5d504
commit 7f15e8bb72
No known key found for this signature in database
GPG key ID: 28D65178B37F33E3
2 changed files with 5 additions and 5 deletions

View file

@ -1,5 +1,5 @@
all:
@objfw-compile -o scrypt-pwgen *.m
@objfw-compile -Werror -o scrypt-pwgen *.m
clean:
rm -f *.o *~ scrypt-pwgen

View file

@ -117,10 +117,10 @@ showHelp(OFStream *output, bool verbose)
@try {
generator.length = (size_t)[lengthStr decimalValue];
} @catch (OFInvalidArgumentException *e) {
invalid = true;
} @catch (OFInvalidFormatException *e) {
invalid = true;
} @catch (OFOutOfRangeException *e) {
invalid = true;
}
if (invalid) {
@ -136,7 +136,7 @@ showHelp(OFStream *output, bool verbose)
prompt = [OFString stringWithFormat: @"Passphrase for site \"%@\": ",
generator.site];
passphrase = getpass(
[prompt cStringWithEncoding: [OFSystemInfo native8BitEncoding]]);
[prompt cStringWithEncoding: [OFLocalization encoding]]);
@try {
if (_repeat) {
char *passphraseCopy = of_strdup(passphrase);
@ -146,7 +146,7 @@ showHelp(OFStream *output, bool verbose)
@try {
of_string_encoding_t encoding =
[OFSystemInfo native8BitEncoding];
[OFLocalization encoding];
prompt = [OFString stringWithFormat:
@"Repeat passphrase for site \"%@\": ",