From 93deb844996120b6326345d6d87e803142dd1968 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 23 Oct 2013 22:08:59 +0200 Subject: input_stream: rename struct to InputStream --- test/dump_text_file.cxx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'test/dump_text_file.cxx') diff --git a/test/dump_text_file.cxx b/test/dump_text_file.cxx index 00281bd8b..bb84f5cce 100644 --- a/test/dump_text_file.cxx +++ b/test/dump_text_file.cxx @@ -57,46 +57,45 @@ dump_text_file(TextInputStream &is) } static int -dump_input_stream(struct input_stream *is) +dump_input_stream(InputStream &is) { Error error; - is->Lock(); + is.Lock(); /* wait until the stream becomes ready */ - is->WaitReady(); + is.WaitReady(); - if (!is->Check(error)) { + if (!is.Check(error)) { LogError(error); - is->Unlock(); + is.Unlock(); return EXIT_FAILURE; } /* read data and tags from the stream */ - is->Unlock(); + is.Unlock(); { TextInputStream tis(is); dump_text_file(tis); } - is->Lock(); + is.Lock(); - if (!is->Check(error)) { + if (!is.Check(error)) { LogError(error); - is->Unlock(); + is.Unlock(); return EXIT_FAILURE; } - is->Unlock(); + is.Unlock(); return 0; } int main(int argc, char **argv) { - struct input_stream *is; int ret; if (argc != 2) { @@ -134,9 +133,9 @@ int main(int argc, char **argv) Mutex mutex; Cond cond; - is = input_stream::Open(argv[1], mutex, cond, error); + InputStream *is = InputStream::Open(argv[1], mutex, cond, error); if (is != NULL) { - ret = dump_input_stream(is); + ret = dump_input_stream(*is); is->Close(); } else { if (error.IsDefined()) -- cgit v1.2.3