aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream-b64.c
diff options
context:
space:
mode:
authorbertrand <bertrand@helixcode.com>2000-03-03 10:54:25 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-03-03 10:54:25 +0800
commit2392d67981785dac17f56305f8ee3fc0b5884694 (patch)
tree40b56668dd5c95dbe50fd6f1b70c67d7ac2dac73 /camel/camel-stream-b64.c
parent9cf31d6b063eacf768ea835fad15377aaddf6dc1 (diff)
downloadgsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.gz
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.bz2
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.lz
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.xz
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.tar.zst
gsoc2013-evolution-2392d67981785dac17f56305f8ee3fc0b5884694.zip
don't forget to set the state to 0 after 3. (my_read_encode): don't forget
2000-03-02 bertrand <bertrand@helixcode.com> * camel-stream-b64.c (my_read_encode): don't forget to set the state to 0 after 3. (my_read_encode): don't forget to encode, even in state 3. * camel-simple-data-wrapper.c: static functions are prefixed with my_ instead of _ * camel-multipart.c: static functions are prefixed with my_ instead of _ (my_write_to_stream): commented. (my_write_to_stream): warning in case the boudary is set but is a zero length string. * camel-mime-part.c (camel_mime_part_encoding_from_string): remove debug trace. * camel-mime-part.c: Replaced all static functions with name begining with _ by the same name begining with "my_" to prevent the possible conflicts with system symbols Dan warned us about. Mime mail generation works now, at least with b64 encoding. QP needs to be done now. svn path=/trunk/; revision=2016
Diffstat (limited to 'camel/camel-stream-b64.c')
-rw-r--r--camel/camel-stream-b64.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/camel/camel-stream-b64.c b/camel/camel-stream-b64.c
index df4f755fac..eb99f40058 100644
--- a/camel/camel-stream-b64.c
+++ b/camel/camel-stream-b64.c
@@ -356,7 +356,8 @@ my_read_encode (CamelStream *stream,
* read to write in the stream
*/
if (status->state == 3) {
- buffer [j++] = status->keep;
+ buffer [j++] = six_bits_to_char [status->keep];
+ status->state = 0;
status->keep = 0;
status->line_length++;
break;
@@ -418,7 +419,7 @@ my_read_encode (CamelStream *stream,
* we are at the end of the input stream
* we must pad the output with '='.
*/
-
+ printf ("%d\n", status->end_state);
while ((j<n) && (status->end_state != 6)) {
if (status->end_state == 5) {
@@ -465,7 +466,6 @@ my_read_encode (CamelStream *stream,
}
- status->end_state++;
break;
@@ -570,8 +570,9 @@ camel_stream_b64_write_to_stream (CamelStreamB64 *stream_b64,
while (!camel_stream_eos (CAMEL_STREAM (stream_b64))) {
nb_read = camel_stream_read (CAMEL_STREAM (stream_b64), tmp_buf, 4096);
nb_written = 0;
+
while (nb_written < nb_read)
- nb_written += camel_stream_write (output_stream, tmp_buf, nb_read);
+ nb_written += camel_stream_write (output_stream, tmp_buf + nb_written, nb_read - nb_written);
}
}