aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/ascii85.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtests/ascii85.cc')
-rw-r--r--libtests/ascii85.cc20
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);
}