| 280 | } |
| 281 | |
| 282 | void mime_code::create_decode_tab(const unsigned char *toTab, string *out) |
| 283 | { |
| 284 | unsigned char tab[255]; |
| 285 | char buf[32]; |
| 286 | unsigned char *cp; |
| 287 | int i, n = (int) strlen((const char*) toTab); |
| 288 | |
| 289 | memset(tab, 0xff, sizeof(tab)); |
| 290 | |
| 291 | for (i = 0; i < n; i++) { |
| 292 | tab[toTab[i]] = (unsigned char) i; |
| 293 | } |
| 294 | |
| 295 | out->clear(); |
| 296 | for (i = 0, cp = tab; cp < tab + sizeof(tab); cp++) { |
| 297 | if (i++ % 16 == 0) { |
| 298 | out->append("\r\n"); |
| 299 | } |
| 300 | safe_snprintf(buf, sizeof(buf), "%d, ", *cp); |
| 301 | out->append((char*) buf); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | void mime_code::set_status(bool encoding) |
| 306 | { |
nothing calls this directly
no test coverage detected