summaryrefslogtreecommitdiff
path: root/libmailutils/tests/Makefile.am
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-12-12 13:09:19 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2011-12-12 14:11:13 +0200
commit1e4c44886b7dd9d9995f60ae038e04b08ecbd786 (patch)
tree15ed7c39a999878328195c231840ec3869964516 /libmailutils/tests/Makefile.am
parentc42e619475166b5a6385d52fa0ed5f301d9db0b8 (diff)
downloadmailutils-1e4c44886b7dd9d9995f60ae038e04b08ecbd786.tar.gz
mailutils-1e4c44886b7dd9d9995f60ae038e04b08ecbd786.tar.bz2
Initialize standard I/O streams statically.
This allows programmers to use them right away, much like their stdio counterparts. The mu_stdstream_setup and friends can be used to re-initialize them, should the need be. * include/mailutils/sys/file_stream.h (_MU_FILE_STREAM_STATIC_FILENAME): New flag. (_mu_file_stream_setup): New proto. * include/mailutils/sys/logstream.h (_mu_log_stream_setup): New proto. * include/mailutils/sys/stream.h (_MU_STR_EVENT_BOOTSTRAP): New event code. (_mu_stream) <destroy>: New method. * libmailutils/stdstream/basestr.c: Define the three standard streams statically, use bootstrap event to initialize them. * libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create): Accept tag==NULL. * libmailutils/stream/file_stream.c (fd_done): Do not free filename if _MU_FILE_STREAM_STATIC_FILENAME is set. (_mu_file_stream_setup): New function. * libmailutils/stream/logstream.c (NEXT): Check size before advancing buffer pointer. (_mu_log_stream_setup): New function. * libmailutils/stream/stream.c (_bootstrap_event): New macro. (mu_stream_destroy): If .destroy is defined, use it instead of free(2). (mu_stream_open,mu_stream_seek,mu_stream_set_buffer) (mu_stream_read,mu_stream_readdelim,mu_stream_getdelim) (mu_stream_write,mu_stream_size,mu_stream_wait) (mu_stream_truncate,mu_stream_shutdown): Call _bootstrap_event at the beginning. * libmailutils/tests/.gitignore: Add strin, strout. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add strin, strout. (TESTSUITE_AT): Add stdstream tests. * libmailutils/tests/testsuite.at: Include stdstream tests. * libmailutils/tests/strerr.at: New test case. * libmailutils/tests/strin.at: Likewise. * libmailutils/tests/strout.at: Likewise. * libmailutils/tests/strin.c: New test program. * libmailutils/tests/strout.c: Likewise.
Diffstat (limited to 'libmailutils/tests/Makefile.am')
-rw-r--r--libmailutils/tests/Makefile.am5
1 files changed, 5 insertions, 0 deletions
diff --git a/libmailutils/tests/Makefile.am b/libmailutils/tests/Makefile.am
index 01c01acbe..1cb296868 100644
--- a/libmailutils/tests/Makefile.am
+++ b/libmailutils/tests/Makefile.am
@@ -53,6 +53,8 @@ noinst_PROGRAMS = \
prop\
scantime\
strftime\
+ strin\
+ strout\
tempfile\
url-comp\
url-parse\
@@ -85,6 +87,9 @@ TESTSUITE_AT = \
prop.at\
scantime.at\
strftime.at\
+ strerr.at\
+ strin.at\
+ strout.at\
testsuite.at\
url.at\
url-comp.at\

Return to:

Send suggestions and report system problems to the System administrator.