diff options
Diffstat (limited to 'libtests/dct_uncompress.cc')
-rw-r--r-- | libtests/dct_uncompress.cc | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/libtests/dct_uncompress.cc b/libtests/dct_uncompress.cc index dd366852..1ab22e97 100644 --- a/libtests/dct_uncompress.cc +++ b/libtests/dct_uncompress.cc @@ -2,17 +2,16 @@ #include <qpdf/Pl_StdioFile.hh> #include <qpdf/QUtil.hh> -#include <stdio.h> -#include <string.h> #include <iostream> +#include <stdio.h> #include <stdlib.h> +#include <string.h> -int main(int argc, char* argv[]) +int +main(int argc, char* argv[]) { - if (argc != 3) - { - std::cerr << "Usage: dct_uncompress infile outfile" - << std::endl; + if (argc != 3) { + std::cerr << "Usage: dct_uncompress infile outfile" << std::endl; exit(2); } @@ -25,15 +24,11 @@ int main(int argc, char* argv[]) unsigned char buf[100]; bool done = false; Pl_DCT dct("dct", &out); - while (! done) - { + while (!done) { size_t len = fread(buf, 1, sizeof(buf), infile); - if (len <= 0) - { + if (len <= 0) { done = true; - } - else - { + } else { dct.write(buf, len); } } |