diff options
Diffstat (limited to 'qpdf/test_pdf_unicode.cc')
-rw-r--r-- | qpdf/test_pdf_unicode.cc | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/qpdf/test_pdf_unicode.cc b/qpdf/test_pdf_unicode.cc index 8964e8a5..ead143b3 100644 --- a/qpdf/test_pdf_unicode.cc +++ b/qpdf/test_pdf_unicode.cc @@ -1,41 +1,38 @@ -#include <qpdf/QUtil.hh> #include <qpdf/QPDFObjectHandle.hh> +#include <qpdf/QUtil.hh> #include <iostream> #include <stdlib.h> #include <string.h> static char const* whoami = 0; -void usage() +void +usage() { std::cerr << "Usage: " << whoami << " infile" << std::endl; exit(2); } -int main(int argc, char* argv[]) +int +main(int argc, char* argv[]) { - if ((whoami = strrchr(argv[0], '/')) == NULL) - { + if ((whoami = strrchr(argv[0], '/')) == NULL) { whoami = argv[0]; - } - else - { + } else { ++whoami; } - if (argc != 2) - { + if (argc != 2) { usage(); } char const* infilename = argv[1]; - std::list<std::string> lines = - QUtil::read_lines_from_file(infilename); + std::list<std::string> lines = QUtil::read_lines_from_file(infilename); for (std::list<std::string>::iterator iter = lines.begin(); - iter != lines.end(); ++iter) - { + iter != lines.end(); + ++iter) { QPDFObjectHandle str = QPDFObjectHandle::newUnicodeString(*iter); - std::cout << str.getUTF8Value() << " // " - << str.unparseBinary() << std::endl; + std::cout << str.getUTF8Value() << " // " << str.unparseBinary() + << std::endl; } return 0; } |