view src/lib-mail/quoted-printable.h @ 14682:d0d7b810646b

Make sure we check all the functions' return values. Minor API changes to simplify this. Checked using a patched clang that adds attribute(warn_unused_result) to all functions. This commit fixes several error handling mistakes.
author Timo Sirainen <tss@iki.fi>
date Mon, 25 Jun 2012 01:14:03 +0300
parents 2dce50fc0d9f
children 0be51d94b0d9
line wrap: on
line source

#ifndef QUOTED_PRINTABLE_H
#define QUOTED_PRINTABLE_H

/* Translates quoted printable data into binary. dest must be at least the
   size of src, and may be same as src. Decoding errors are ignored.

   This function may be called multiple times for parsing the same stream.
   src_pos is updated to first non-translated character in src. */
void quoted_printable_decode(const unsigned char *src, size_t src_size,
			     size_t *src_pos_r, buffer_t *dest);
/* Decode MIME "Q" encoding. */
void quoted_printable_q_decode(const unsigned char *src, size_t src_size,
			       buffer_t *dest);

#endif