From 181e9c6d5d11cb1e5d36a2777eeb233ad8ed00e5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 9 Oct 2008 18:15:23 +0200 Subject: big pile of updates to match more what happened with libcanberra --- src/test-bufferq.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'src/test-bufferq.c') diff --git a/src/test-bufferq.c b/src/test-bufferq.c index 79cd618..b99474d 100644 --- a/src/test-bufferq.c +++ b/src/test-bufferq.c @@ -1,3 +1,23 @@ +/*** + This file is part of libsydney. + + Copyright 2007-2008 Lennart Poettering + + libsydney is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 2.1 of the + License, or (at your option) any later version. + + libsydney is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libsydney. If not, see + . +***/ + #ifdef HAVE_CONFIG_H #include #endif @@ -9,7 +29,7 @@ int main(int argc, char *argv[]) { sa_bufferq_t q; - sa_bufferq_init(&q, 1, 1); + sa_bufferq_init(&q, 1); sa_bufferq_push(&q, 0, "{AAAAAAAA}", 10, 0, SA_SEEK_RELATIVE, SA_BUFFERQ_ITEM_STATIC); sa_bufferq_push(&q, 0, "", 10, 5, SA_SEEK_RELATIVE, SA_BUFFERQ_ITEM_STATIC); @@ -29,7 +49,7 @@ int main(int argc, char *argv[]) { if (size == 0) break; - printf("Got %u bytes: ", size); + printf("Got %lu bytes: ", (unsigned long) size); if (b[0]) fwrite(b[0], size, 1, stdout); else @@ -37,7 +57,7 @@ int main(int argc, char *argv[]) { printf("\n"); - sa_bufferq_drop(&q, size); + sa_bufferq_drop(&q, (int64_t) size); } sa_bufferq_done(&q); -- cgit