diff options
author | Max Kellermann <max@duempel.org> | 2013-10-23 22:08:59 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-23 23:12:02 +0200 |
commit | 93deb844996120b6326345d6d87e803142dd1968 (patch) | |
tree | d6c00669efffad1b15fc45e03158d6838a7e5827 /test/dump_text_file.cxx | |
parent | c4d4011c63808a64ca20a4b03fd455a83c23cc33 (diff) | |
download | mpd-93deb844996120b6326345d6d87e803142dd1968.tar.gz mpd-93deb844996120b6326345d6d87e803142dd1968.tar.xz mpd-93deb844996120b6326345d6d87e803142dd1968.zip |
input_stream: rename struct to InputStream
Diffstat (limited to 'test/dump_text_file.cxx')
-rw-r--r-- | test/dump_text_file.cxx | 25 |
1 files changed, 12 insertions, 13 deletions
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()) |