Skip to content

Commit

Permalink
Merge ../libmy into next
Browse files Browse the repository at this point in the history
  • Loading branch information
hstern committed Sep 18, 2015
2 parents 98b6c91 + 48bfeda commit c09d44f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
11 changes: 0 additions & 11 deletions libmy/b64_encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ For details, see http://sourceforge.net/projects/libb64

#include "b64_encode.h"

const int CHARS_PER_LINE = 56;

void base64_init_encodestate(base64_encodestate* state_in)
{
state_in->step = step_A;
state_in->result = 0;
state_in->stepcount = 0;
}

char base64_encode_value(char value_in)
Expand Down Expand Up @@ -71,13 +68,6 @@ int base64_encode_block(const char* plaintext_in, int length_in, char* code_out,
*codechar++ = base64_encode_value(result);
result = (fragment & 0x03f) >> 0;
*codechar++ = base64_encode_value(result);

++(state_in->stepcount);
if (state_in->stepcount == CHARS_PER_LINE/4)
{
*codechar++ = ' ';
state_in->stepcount = 0;
}
}
}
/* control should not reach here */
Expand All @@ -102,7 +92,6 @@ int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
case step_A:
break;
}
*codechar++ = ' ';

return codechar - code_out;
}
Expand Down
1 change: 0 additions & 1 deletion libmy/b64_encode.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ typedef struct
{
base64_encodestep step;
char result;
int stepcount;
} base64_encodestate;

void base64_init_encodestate(base64_encodestate* state_in);
Expand Down

0 comments on commit c09d44f

Please sign in to comment.