From: Michael Sweet Date: Thu, 31 Aug 2017 12:38:39 +0000 (-0400) Subject: Fix ipptool -P output (some was going to stdout...) X-Git-Tag: v2.2.5~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=befbadcef6fe25ad546dc271b501137f86e1d255;p=thirdparty%2Fcups.git Fix ipptool -P output (some was going to stdout...) --- diff --git a/CHANGES.md b/CHANGES.md index 95a42bfeea..9ce2ecf0cc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,4 @@ -CHANGES - 2.2.5 - 2017-08-29 +CHANGES - 2.2.5 - 2017-08-31 ============================ CHANGES IN CUPS V2.2.5 @@ -53,6 +53,7 @@ CHANGES IN CUPS V2.2.5 (rdar://33688003) - Fixed the localization fallback code on macOS (rdar://33583699) - The `ipptool` program now offers an option to validate response headers. +- The `ipptool` program's `-P` option did not work correctly. CHANGES IN CUPS V2.2.4 diff --git a/test/ipptool.c b/test/ipptool.c index 005800b6f5..2df9900943 100644 --- a/test/ipptool.c +++ b/test/ipptool.c @@ -4866,13 +4866,13 @@ print_xml_string(cups_file_t *outfile, /* I - Output file */ if ((s[1] & 0xc0) != 0x80) { - cupsFilePutChar(cupsFileStdout(), '?'); + cupsFilePutChar(outfile, '?'); s ++; } else { - cupsFilePutChar(cupsFileStdout(), *s++); - cupsFilePutChar(cupsFileStdout(), *s); + cupsFilePutChar(outfile, *s++); + cupsFilePutChar(outfile, *s); } } else if ((*s & 0xf0) == 0xe0) @@ -4883,14 +4883,14 @@ print_xml_string(cups_file_t *outfile, /* I - Output file */ if ((s[1] & 0xc0) != 0x80 || (s[2] & 0xc0) != 0x80) { - cupsFilePutChar(cupsFileStdout(), '?'); + cupsFilePutChar(outfile, '?'); s += 2; } else { - cupsFilePutChar(cupsFileStdout(), *s++); - cupsFilePutChar(cupsFileStdout(), *s++); - cupsFilePutChar(cupsFileStdout(), *s); + cupsFilePutChar(outfile, *s++); + cupsFilePutChar(outfile, *s++); + cupsFilePutChar(outfile, *s); } } else if ((*s & 0xf8) == 0xf0) @@ -4902,15 +4902,15 @@ print_xml_string(cups_file_t *outfile, /* I - Output file */ if ((s[1] & 0xc0) != 0x80 || (s[2] & 0xc0) != 0x80 || (s[3] & 0xc0) != 0x80) { - cupsFilePutChar(cupsFileStdout(), '?'); + cupsFilePutChar(outfile, '?'); s += 3; } else { - cupsFilePutChar(cupsFileStdout(), *s++); - cupsFilePutChar(cupsFileStdout(), *s++); - cupsFilePutChar(cupsFileStdout(), *s++); - cupsFilePutChar(cupsFileStdout(), *s); + cupsFilePutChar(outfile, *s++); + cupsFilePutChar(outfile, *s++); + cupsFilePutChar(outfile, *s++); + cupsFilePutChar(outfile, *s); } } else if ((*s & 0x80) || (*s < ' ' && !isspace(*s & 255))) @@ -4919,10 +4919,10 @@ print_xml_string(cups_file_t *outfile, /* I - Output file */ * Invalid control character... */ - cupsFilePutChar(cupsFileStdout(), '?'); + cupsFilePutChar(outfile, '?'); } else - cupsFilePutChar(cupsFileStdout(), *s); + cupsFilePutChar(outfile, *s); s ++; }