~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-updates

« back to all changes in this revision

Viewing changes to camel/camel-mime-filter-yenc.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-07-13 15:01:33 UTC
  • mfrom: (1.1.69 upstream)
  • Revision ID: james.westby@ubuntu.com-20090713150133-4lxw1fqpbo2b1i7w
Tags: 2.27.4-0ubuntu1
* New upstream version:
  Bug Fixes:
  Addressbook:
  - #540779 - Do not call e_book_new in the main thread (lp: #265044)
  - #563668 - Do not pop-down an empty completion list 
  - #586225 - Parse numeric name suffixes 
  Calendar:
  - #548702 - google calendar source does not show all events  (lp: #183846)
  Mail:
  - #575701 - Message disappear from unread vfolder, when reply. 
  - #568302 - create camel summary table if not exists on load 
  - #586602 – folder messages are lost on folder rename 
  - #327285 - Word "Success" in error message for failed action (lp: #175599)
  - #587699 - IMAP - Localize only Inbox folder name, no other 
  - #579065 - IMAP - Synchronize remote mail locally is not working 
    (lp: #331478)
  - #564388 - UI blocks for a long time when downloading mails with nntp 
  Misc:
  - #586442 – Various build cleanups 
  - #586477 – Fix quoting in configure.ac 
  - #586811 – Require automake 1.9 and fix whitespace 
  - #586813 – Fix iconv cflags/libs in configure.ac 
  - #586809 – Enable "silent rules" automake 1.11 option 
  - #587165 – Double free in initialize_categories 
  - #587374 - iconv test broken on some gcc 
      Other Fixes:
  Misc:
  Use G_BEGIN_DECLS / G_END_DECLS macros. 
  Work around deprecation of g_mapped_file_free
  Silence some compiler warnings 
  Fixes for windows build 
  Calendar:
  CalDav Fixes/improvements 
  Translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 *
21
21
 */
22
22
 
23
 
 
24
23
#ifdef HAVE_CONFIG_H
25
24
#include <config.h>
26
25
#endif
38
37
                             gchar **out, gsize *outlen, gsize *outprespace);
39
38
static void filter_reset (CamelMimeFilter *filter);
40
39
 
41
 
 
42
40
static CamelMimeFilterClass *parent_class = NULL;
43
41
 
44
 
 
45
42
CamelType
46
43
camel_mime_filter_yenc_get_type (void)
47
44
{
61
58
        return type;
62
59
}
63
60
 
64
 
 
65
61
static void
66
62
camel_mime_filter_yenc_class_init (CamelMimeFilterYencClass *klass)
67
63
{
82
78
        filter->crc = CAMEL_MIME_YENCODE_CRC_INIT;
83
79
}
84
80
 
85
 
 
86
81
/* here we do all of the basic yEnc filtering */
87
82
static void
88
83
filter_filter (CamelMimeFilter *filter, const gchar *in, gsize len, gsize prespace,
230
225
        yenc->crc = CAMEL_MIME_YENCODE_CRC_INIT;
231
226
}
232
227
 
233
 
 
234
228
/**
235
229
 * camel_mime_filter_yenc_new:
236
230
 * @direction: encode direction
261
255
        return (CamelMimeFilter *) new;
262
256
}
263
257
 
264
 
 
265
258
/**
266
259
 * camel_mime_filter_yenc_set_state:
267
260
 * @yenc: a #CamelMimeFilterYenc object
277
270
        yenc->state = state;
278
271
}
279
272
 
280
 
 
281
273
/**
282
274
 * camel_mime_filter_yenc_set_crc:
283
275
 * @yenc: a #CamelMimeFilterYenc object
293
285
        yenc->crc = crc;
294
286
}
295
287
 
296
 
 
297
288
#if 0
298
289
/* FIXME: once we parse out the yenc part id, we can re-enable this interface */
299
290
/**
333
324
        return CAMEL_MIME_YENCODE_CRC_FINAL (yenc->pcrc);
334
325
}
335
326
 
336
 
 
337
327
/**
338
328
 * camel_mime_filter_yenc_get_crc:
339
329
 * @yenc: a #CamelMimeFiletrYenc object
350
340
        return CAMEL_MIME_YENCODE_CRC_FINAL (yenc->crc);
351
341
}
352
342
 
353
 
 
354
343
static const gint yenc_crc_table[256] = {
355
344
        0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
356
345
        0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
390
379
 
391
380
#define YENC_NEWLINE_ESCAPE (CAMEL_MIME_YDECODE_STATE_EOLN | CAMEL_MIME_YDECODE_STATE_ESCAPE)
392
381
 
393
 
 
394
382
/**
395
383
 * camel_ydecode_step:
396
384
 * @in: input buffer
470
458
        return outptr - out;
471
459
}
472
460
 
473
 
 
474
461
/**
475
462
 * camel_yencode_step:
476
463
 * @in: input buffer
536
523
        return outptr - out;
537
524
}
538
525
 
539
 
 
540
526
/**
541
527
 * camel_yencode_close:
542
528
 * @in: input buffer