Don't count our filler when encoding our line-length octet.

2002-04-08  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (uuencode_close): Don't count our filler when
	encoding our line-length octet.

svn path=/trunk/; revision=16390
This commit is contained in:
Jeffrey Stedfast
2002-04-08 17:34:12 +00:00
committed by Jeffrey Stedfast
parent c357c63804
commit 600e799994
3 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2002-04-08 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-utils.c (uuencode_close): Don't count our filler when
encoding our line-length octet.
2002-04-05 Jeffrey Stedfast <fejj@ximian.com>
* camel-http-stream.c (http_get_headers): Don't get the statuscode

View File

@ -427,13 +427,15 @@ uuencode_close (unsigned char *in, size_t len, unsigned char *out, unsigned char
{
register unsigned char *outptr, *bufptr;
register guint32 saved;
int uulen, i;
int uulen, uufill, i;
outptr = out;
if (len > 0)
outptr += uuencode_step (in, len, out, uubuf, state, save);
uufill = 0;
saved = *save;
i = *state & 0xff;
uulen = (*state >> 8) & 0xff;
@ -443,6 +445,7 @@ uuencode_close (unsigned char *in, size_t len, unsigned char *out, unsigned char
if (i > 0) {
while (i < 3) {
saved <<= 8 | 0;
uufill++;
i++;
}
@ -468,7 +471,7 @@ uuencode_close (unsigned char *in, size_t len, unsigned char *out, unsigned char
if (uulen > 0) {
int cplen = ((uulen / 3) * 4);
*outptr++ = CAMEL_UUENCODE_CHAR (uulen & 0xff);
*outptr++ = CAMEL_UUENCODE_CHAR ((uulen - uufill) & 0xff);
memcpy (outptr, uubuf, cplen);
outptr += cplen;
*outptr++ = '\n';

View File

@ -152,8 +152,8 @@ char *header_content_encoding_decode(const char *in);
/* raw headers */
void header_raw_append(struct _header_raw **list, const char *name, const char *value, int offset);
void header_raw_append_parse(struct _header_raw **list, const char *header, int offset);
const char *header_raw_find(struct _header_raw **list, const char *name, int *ofset);
const char *header_raw_find_next(struct _header_raw **list, const char *name, int *ofset, const char *last);
const char *header_raw_find(struct _header_raw **list, const char *name, int *offset);
const char *header_raw_find_next(struct _header_raw **list, const char *name, int *offset, const char *last);
void header_raw_replace(struct _header_raw **list, const char *name, const char *value, int offset);
void header_raw_remove(struct _header_raw **list, const char *name);
void header_raw_fold(struct _header_raw **list);