| 158 | #endif |
| 159 | |
| 160 | void mime_quoted_printable::decode_update(const char *src, int n, string* out) |
| 161 | { |
| 162 | int i = 0; |
| 163 | |
| 164 | while (n > 0) { |
| 165 | if (m_decodeCnt == (int) sizeof(m_decodeBuf)) { |
| 166 | decode(out); |
| 167 | } |
| 168 | i = n; |
| 169 | if (i > (int) sizeof(m_decodeBuf) - m_decodeCnt) { |
| 170 | i = (int) sizeof(m_decodeBuf) - m_decodeCnt; |
| 171 | } |
| 172 | memcpy(m_decodeBuf + m_decodeCnt, src, i); |
| 173 | src += i; |
| 174 | n -= i; |
| 175 | m_decodeCnt += i; |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | void mime_quoted_printable::decode_finish(string* out) |
| 180 | { |