diff options
author | Gaurav Narula <gnarula94@gmail.com> | 2012-01-18 20:51:54 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-01-18 21:07:17 +0100 |
commit | b481bbc32abd94e5dc1c1de731254a0fda2810ff (patch) | |
tree | f20ffed878ac3357374ffe230c962125bf3fff5c /tests/base64.c | |
parent | aa2e4bb0580b519156a6a34f1ee71cf063dfcaee (diff) | |
download | ffmpeg-b481bbc32abd94e5dc1c1de731254a0fda2810ff.tar.gz |
tests: K&R formatting cosmetics for test programs
Diffstat (limited to 'tests/base64.c')
-rw-r--r-- | tests/base64.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/base64.c b/tests/base64.c index aad7dfb7ea..6462d9aa7a 100644 --- a/tests/base64.c +++ b/tests/base64.c @@ -27,18 +27,19 @@ int main(void) static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; unsigned i_bits = 0; - int i_shift = 0; - int out_len = 0; + int i_shift = 0; + int out_len = 0; int in; -#define putb64() do { \ +#define putb64() \ + do { \ putchar(b64[(i_bits << 6 >> i_shift) & 0x3f]); \ out_len++; \ i_shift -= 6; \ } while (0) while ((in = getchar()) != EOF) { - i_bits = (i_bits << 8) + in; + i_bits = (i_bits << 8) + in; i_shift += 8; while (i_shift > 6) putb64(); |