diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-01-18 03:21:11 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-01-18 03:21:11 +0800 |
commit | eea1e59abbbc3e8d26c454d13a9fb59d88e652e2 (patch) | |
tree | c0ac419b8c1e6f753f52b75775e78b559379f8be /camel/camel-mime-utils.h | |
parent | bda8b73fe19ec3881f79f8d3d8cfc575dceef6de (diff) | |
download | gsoc2013-evolution-eea1e59abbbc3e8d26c454d13a9fb59d88e652e2.tar gsoc2013-evolution-eea1e59abbbc3e8d26c454d13a9fb59d88e652e2.tar.gz gsoc2013-evolution-eea1e59abbbc3e8d26c454d13a9fb59d88e652e2.tar.bz2 gsoc2013-evolution-eea1e59abbbc3e8d26c454d13a9fb59d88e652e2.tar.lz gsoc2013-evolution-eea1e59abbbc3e8d26c454d13a9fb59d88e652e2.tar.xz gsoc2013-evolution-eea1e59abbbc3e8d26c454d13a9fb59d88e652e2.tar.zst gsoc2013-evolution-eea1e59abbbc3e8d26c454d13a9fb59d88e652e2.zip |
Stop uudecoding once the CAMEL_UUDECODE_STATE_END state bit gets set. Set
2002-01-17 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-filter-basic.c (filter): Stop uudecoding once the
CAMEL_UUDECODE_STATE_END state bit gets set. Set the
CAMEL_UUDECODE_STATE_BEGIN state bit once we find the begin line.
(reset): No longer have uu_begin or uulen state variables, these
are now stuffed into a single state variable.
* camel-mime-utils.c (uudecode_step): No longer needs a uulen
argument and also keeps track of whether or not the end of the
encoded data has been found in 'state'.
(uuencode_step): Now stuffs uulen into state so that the uulen
argument is no longer needed.
(uuencode_close): Same.
svn path=/trunk/; revision=15349
Diffstat (limited to 'camel/camel-mime-utils.h')
-rw-r--r-- | camel/camel-mime-utils.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/camel/camel-mime-utils.h b/camel/camel-mime-utils.h index fcd1a06fa5..8bd9c81993 100644 --- a/camel/camel-mime-utils.h +++ b/camel/camel-mime-utils.h @@ -28,6 +28,11 @@ /* maximum size of a line from header_fold() */ #define CAMEL_FOLD_SIZE (77) +#define CAMEL_UUDECODE_STATE_INIT (0) +#define CAMEL_UUDECODE_STATE_BEGIN (1 << 16) +#define CAMEL_UUDECODE_STATE_END (1 << 17) +#define CAMEL_UUDECODE_STATE_MASK (CAMEL_UUDECODE_STATE_BEGIN | CAMEL_UUDECODE_STATE_END) + /* a list of references for this message */ struct _header_references { struct _header_references *next; @@ -191,12 +196,12 @@ size_t base64_decode_step(unsigned char *in, size_t len, unsigned char *out, int size_t base64_encode_step(unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save); size_t base64_encode_close(unsigned char *in, size_t len, gboolean break_lines, unsigned char *out, int *state, int *save); -size_t uudecode_step (unsigned char *in, size_t len, unsigned char *out, int *state, guint32 *save, char *uulen); +size_t uudecode_step (unsigned char *in, size_t len, unsigned char *out, int *state, guint32 *save); size_t uuencode_step (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state, - guint32 *save, char *uulen); + guint32 *save); size_t uuencode_close (unsigned char *in, size_t len, unsigned char *out, unsigned char *uubuf, int *state, - guint32 *save, char *uulen); + guint32 *save); size_t quoted_decode_step(unsigned char *in, size_t len, unsigned char *out, int *savestate, int *saveme); |