/* just dump MIME part without any decoding */
-static int mime_decode_asis(FILE* in, FILE* out, uschar* boundary)
+static ssize_t
+mime_decode_asis(FILE* in, FILE* out, uschar* boundary)
{
- int len, size = 0;
+ ssize_t len, size = 0;
uschar buffer[MIME_MAX_LINE_LENGTH];
while(fgets(CS buffer, MIME_MAX_LINE_LENGTH, mime_stream) != NULL) {
/* decode base64 MIME part */
-static int mime_decode_base64(FILE* in, FILE* out, uschar* boundary)
+static ssize_t
+mime_decode_base64(FILE* in, FILE* out, uschar* boundary)
{
uschar ibuf[MIME_MAX_LINE_LENGTH], obuf[MIME_MAX_LINE_LENGTH];
uschar *ipos, *opos;
- size_t len, size = 0;
+ ssize_t len, size = 0;
int bytestate = 0;
opos = obuf;
/* decode quoted-printable MIME part */
-static int mime_decode_qp(FILE* in, FILE* out, uschar* boundary)
+static ssize_t
+mime_decode_qp(FILE* in, FILE* out, uschar* boundary)
{
uschar ibuf[MIME_MAX_LINE_LENGTH], obuf[MIME_MAX_LINE_LENGTH];
uschar *ipos, *opos;
- size_t len, size = 0;
+ ssize_t len, size = 0;
while (fgets(CS ibuf, MIME_MAX_LINE_LENGTH, in) != NULL)
{
uschar decode_path[1024];
FILE *decode_file = NULL;
long f_pos = 0;
- unsigned int size_counter = 0;
- int (*decode_function)(FILE*, FILE*, uschar*);
+ ssize_t size_counter = 0;
+ ssize_t (*decode_function)(FILE*, FILE*, uschar*);
if (mime_stream == NULL)
return FAIL;