summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-06-22 10:24:24 +0300
committerSergey Poznyakoff <gray@gnu.org>2020-06-22 10:24:24 +0300
commit2df53d14b9158a72aeb86cd7ff67bbc3c017e046 (patch)
tree1be79d2032c678d682b460bcc8ea4d63632e6fa4 /include
parent89883891c013fc4e8c762bbb62cb307b1cb79fba (diff)
downloadmailutils-2df53d14b9158a72aeb86cd7ff67bbc3c017e046.tar.gz
mailutils-2df53d14b9158a72aeb86cd7ff67bbc3c017e046.tar.bz2
decodemain: set 7bit or 8bit transfer encoding on decoded parts.
* decodemail/decodemail.c (message_decode): Set 8bit or 7bit transfer encoding, depending on the character of the decoded stream. * include/mailutils/cstr.h (mu_mem_8bit_count): New proto. * include/mailutils/stream.h (MU_STREAM_STAT_IN8BIT) (MU_STREAM_STAT_OUT8BIT): New constants. * libmailutils/stream/stream.c (_stream_read,_stream_write): Set MU_STREAM_STAT_IN8BIT (MU_STREAM_STAT_OUT8BIT) if requested * libmailutils/string/strcount.c (mu_mem_8bit_count): New function.
Diffstat (limited to 'include')
-rw-r--r--include/mailutils/cstr.h1
-rw-r--r--include/mailutils/stream.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/include/mailutils/cstr.h b/include/mailutils/cstr.h
index 860b44e0e..cecf25eb2 100644
--- a/include/mailutils/cstr.h
+++ b/include/mailutils/cstr.h
@@ -51,6 +51,7 @@ int mu_string_split (const char *string, char *delim, mu_list_t list);
size_t mu_str_count (char const *str, char const *chr, size_t *cnt);
size_t mu_mem_c_count (char const *str, int c, size_t len);
+size_t mu_mem_8bit_count (char const *str, size_t len);
int mu_c_str_escape (char const *str, char const *chr, char const *xtab,
char **ret_str);
diff --git a/include/mailutils/stream.h b/include/mailutils/stream.h
index 327493870..c3a920b6e 100644
--- a/include/mailutils/stream.h
+++ b/include/mailutils/stream.h
@@ -280,6 +280,8 @@ enum
MU_STREAM_STAT_SEEKS, /* Number of seeks */
MU_STREAM_STAT_INLN, /* Lines read */
MU_STREAM_STAT_OUTLN, /* Lines written */
+ MU_STREAM_STAT_IN8BIT, /* 8-bit octets read */
+ MU_STREAM_STAT_OUT8BIT, /* 8-bit octets written */
_MU_STREAM_STAT_MAX
};

Return to:

Send suggestions and report system problems to the System administrator.