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/ascii85.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/ascii85.cc')
-rw-r--r-- | libtests/ascii85.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/libtests/ascii85.cc b/libtests/ascii85.cc index 91f3b7f5..2acc56ba 100644 --- a/libtests/ascii85.cc +++ b/libtests/ascii85.cc @@ -4,31 +4,25 @@ #include <iostream> #include <stdlib.h> -int main() +int +main() { Pl_StdioFile out("stdout", stdout); Pl_ASCII85Decoder decode("decode", &out); - try - { + try { unsigned char buf[10000]; bool done = false; - while (! done) - { + while (!done) { size_t len = fread(buf, 1, sizeof(buf), stdin); - if (len <= 0) - { + if (len <= 0) { done = true; - } - else - { + } else { decode.write(buf, len); } } decode.finish(); - } - catch (std::exception& e) - { + } catch (std::exception& e) { std::cerr << e.what() << std::endl; exit(2); } |