From b008274afdbe375b32a7e66dbd073e200f6f0587 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 4 Feb 2011 12:57:53 +0100 Subject: Nuked almost all trailing white space. We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again. --- common/b64enc.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'common/b64enc.c') diff --git a/common/b64enc.c b/common/b64enc.c index 5d616198e..eae796c6e 100644 --- a/common/b64enc.c +++ b/common/b64enc.c @@ -34,25 +34,25 @@ #define B64ENC_USE_PGPCRC 32 /* The base-64 character list */ -static unsigned char bintoasc[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/"; +static unsigned char bintoasc[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; /* Stuff required to create the OpenPGP CRC. This crc_table has been created using this code: #include #include - + #define CRCPOLY 0x864CFB - + int main (void) { int i, j; uint32_t t; uint32_t crc_table[256]; - + crc_table[0] = 0; for (i=j=0; j < 128; j++ ) { @@ -70,7 +70,7 @@ static unsigned char bintoasc[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" crc_table[i++] = t ^ CRCPOLY; } } - + puts ("static const u32 crc_table[256] = {"); for (i=j=0; i < 256; i++) { @@ -224,11 +224,11 @@ b64enc_write (struct b64state *state, const void *buffer, size_t nbytes) || my_fputs (state->title, state) == EOF || my_fputs ("-----\n", state) == EOF) goto write_error; - if ( (state->flags & B64ENC_USE_PGPCRC) + if ( (state->flags & B64ENC_USE_PGPCRC) && my_fputs ("\n", state) == EOF) goto write_error; } - + state->flags |= B64ENC_DID_HEADER; } @@ -274,7 +274,7 @@ b64enc_write (struct b64state *state, const void *buffer, size_t nbytes) if (ferror (state->fp)) goto write_error; } - if (++quad_count >= (64/4)) + if (++quad_count >= (64/4)) { quad_count = 0; if (!(state->flags & B64ENC_NO_LINEFEEDS) @@ -328,8 +328,8 @@ b64enc_finish (struct b64state *state) tmp[2] = '='; tmp[3] = '='; } - else - { + else + { tmp[1] = bintoasc[(((*radbuf<<4)&060)|((radbuf[1]>>4)&017))&077]; tmp[2] = bintoasc[((radbuf[1] << 2) & 074) & 077]; tmp[3] = '='; @@ -351,7 +351,7 @@ b64enc_finish (struct b64state *state) goto write_error; } - if (++quad_count >= (64/4)) + if (++quad_count >= (64/4)) { quad_count = 0; if (!(state->flags & B64ENC_NO_LINEFEEDS) @@ -365,7 +365,7 @@ b64enc_finish (struct b64state *state) && !(state->flags & B64ENC_NO_LINEFEEDS) && my_fputs ("\n", state) == EOF) goto write_error; - + if ( (state->flags & B64ENC_USE_PGPCRC) ) { /* Write the CRC. */ @@ -420,4 +420,3 @@ b64enc_finish (struct b64state *state) state->lasterr = err; return err; } - -- cgit v1.2.3