From 6c63633545c254dc085402e0f927a6826d1dd229 Mon Sep 17 00:00:00 2001 From: Akinori Ito Date: Fri, 9 Nov 2001 04:59:17 +0000 Subject: Updates from 0.2.1 into 0.2.1-inu-1.5 --- istream.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'istream.c') diff --git a/istream.c b/istream.c index 27b8d47..401f9ef 100644 --- a/istream.c +++ b/istream.c @@ -1,7 +1,10 @@ -/* $Id: istream.c,v 1.1 2001/11/08 05:15:57 a-ito Exp $ */ +/* $Id: istream.c,v 1.2 2001/11/09 04:59:17 a-ito Exp $ */ #include "fm.h" #include "istream.h" #include +#ifdef __EMX__ +#include /* for bzero() */ +#endif /* __EMX__ */ #define uchar unsigned char @@ -156,7 +159,8 @@ InputStream newEncodedStream(InputStream is, char encoding) { InputStream stream; - if (is == NULL || (encoding != ENC_QUOTE && encoding != ENC_BASE64)) + if (is == NULL || (encoding != ENC_QUOTE && encoding != ENC_BASE64 && + encoding != ENC_UUENCODE)) return is; stream = New(union input_stream); init_base_stream(&stream->base, STREAM_BUF_SIZE); @@ -464,11 +468,18 @@ ens_read(struct ens_handle *handle, char *buf, int len) cleanup_line(handle->s, PAGER_MODE); if (handle->encoding == ENC_BASE64) Strchop(handle->s); + else if (handle->encoding == ENC_UUENCODE) { + if (! strncmp(handle->s->ptr, "begin", 5)) + handle->s = StrmyISgets(handle->is); + Strchop(handle->s); + } p = handle->s->ptr; if (handle->encoding == ENC_QUOTE) handle->s = decodeQP(&p); else if (handle->encoding == ENC_BASE64) handle->s = decodeB(&p); + else if (handle->encoding == ENC_UUENCODE) + handle->s = decodeU(&p); handle->pos = 0; } -- cgit v1.2.3