summaryrefslogtreecommitdiffstats
path: root/src/interleave.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-10-09 18:15:23 +0200
committerLennart Poettering <lennart@poettering.net>2008-10-09 18:15:23 +0200
commit181e9c6d5d11cb1e5d36a2777eeb233ad8ed00e5 (patch)
tree7c280968ce3fded5b325b1480d7f2440ddf93207 /src/interleave.c
parent30a4b516c8d591c11f05df38531f46452d930d2b (diff)
big pile of updates to match more what happened with libcanberra
Diffstat (limited to 'src/interleave.c')
-rw-r--r--src/interleave.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/interleave.c b/src/interleave.c
index 31d1a6b..d5d68d3 100644
--- a/src/interleave.c
+++ b/src/interleave.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
+ <http://www.gnu.org/licenses/>.
+***/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -18,7 +38,7 @@ static void interleave8(void *_dst, size_t dstr, const void *_src, size_t sstr,
static void interleave16(void *_dst, size_t dstr, const void *_src, size_t sstr, size_t bytes) {
uint16_t *dst = _dst;
const uint16_t *src = _src;
- unsigned n = bytes / sizeof(uint16_t);
+ size_t n = bytes / sizeof(uint16_t);
for (; n > 0; n--, src += sstr/sizeof(uint16_t), dst += dstr/sizeof(uint16_t))
*dst = *src;
@@ -27,7 +47,7 @@ static void interleave16(void *_dst, size_t dstr, const void *_src, size_t sstr,
static void interleave24(void *_dst, size_t dstr, const void *_src, size_t sstr, size_t bytes) {
uint8_t *dst = _dst;
const uint8_t *src = _src;
- unsigned n = bytes / 3;
+ size_t n = bytes / 3;
for (; n > 0; n--, src += sstr/3, dst += dstr/3) {
dst[0] = src[0];
@@ -39,7 +59,7 @@ static void interleave24(void *_dst, size_t dstr, const void *_src, size_t sstr,
static void interleave32(void *_dst, size_t dstr, const void *_src, size_t sstr, size_t bytes) {
uint32_t *dst = _dst;
const uint32_t *src = _src;
- unsigned n = bytes / sizeof(uint32_t);
+ size_t n = bytes / sizeof(uint32_t);
for (; n > 0; n--, src += sstr/sizeof(uint32_t), dst += dstr/sizeof(uint32_t))
*dst = *src;