diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2020-08-09 00:39:48 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2020-08-09 00:45:42 +0300 |
commit | 93970a7554512add3e9192a8eeabd0abbedcc5c0 (patch) | |
tree | acd4ab01a038dd293d86512a3ab8b4c316ae8acd /libmailutils/tests/.gitignore | |
parent | fd9a86d37b96789d59e25e64b5d9db8974158a2c (diff) | |
download | mailutils-93970a7554512add3e9192a8eeabd0abbedcc5c0.tar.gz mailutils-93970a7554512add3e9192a8eeabd0abbedcc5c0.tar.bz2 |
Implement temporary streams.
A temporary stream functions as a memory stream until its size reaches
a preconfigured threshold value. Once it is reached, the stream storage
is automatically converted to a temporary file, and all data written so far
are transferred to the new storage. If the temporary file cannot be
created, the stream continues to operate in memory-based mode.
This stream type is intended to decrease the number of used file
descriptors.
* include/mailutils/sys/Makefile.am: Add temp_stream.h
* include/mailutils/sys/temp_stream.h: New file.
* include/mailutils/stream.h (mu_temp_file_threshold_size): New extern.
(mu_temp_stream_create): New proto.
* libmailutils/stream/Makefile.am: Add temp_stream.c.
* libmailutils/stream/temp_stream.c: New file.
* libmailutils/string/Makefile.am: Add strtosize.c
* libmailutils/tests/.gitignore: Update.
* libmailutils/tests/Makefile.am
* libmailutils/tests/strtoc.c: Add tests for mu_c_hsize.
* libmailutils/tests/temp_stream.c: New test program.
* libmailutils/tests/testsuite.at: Test the temp_stream functionality.
* testsuite/testsuite.inc (MU_CHECK): New macro.
* libmailutils/mailbox/body.c (body_get_transport): Use mu_temp_stream_create.
Diffstat (limited to 'libmailutils/tests/.gitignore')
-rw-r--r-- | libmailutils/tests/.gitignore | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libmailutils/tests/.gitignore b/libmailutils/tests/.gitignore index 591f9befd..4a215ccb8 100644 --- a/libmailutils/tests/.gitignore +++ b/libmailutils/tests/.gitignore @@ -56,3 +56,4 @@ t-streamshift recenv readmesg stream-getdelim +temp_stream |