diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-04-02 23:14:10 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-04-04 14:10:40 +0200 |
commit | 12f1eb15ca3fed6310402847559a7c99d3c77847 (patch) | |
tree | 8935675b623c6f3b4914b8b44f7fa5f2816a9241 /libtests/dct_uncompress.cc | |
parent | f20fa61eb4c323eb1642c69c236b3d9a1f8b2cdb (diff) | |
download | qpdf-12f1eb15ca3fed6310402847559a7c99d3c77847.tar.zst |
Programmatically apply new formatting to code
Run this:
for i in **/*.cc **/*.c **/*.h **/*.hh; do
clang-format < $i >| $i.new && mv $i.new $i
done
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); } } |