X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fctf%2Fctf-types-bitfield.h;fp=include%2Fctf%2Fctf-types-bitfield.h;h=82ee1120192858cd3d10ed134e898ee1cd6d0d9f;hp=a6764bf5bdb72ab1f94dd5d9f050870dbfa1c8ce;hb=de0ba614e2c8243bfcd107febdaa44a19e658300;hpb=0822882635143b2de9b1d9488cb8b24f2a6d90a2 diff --git a/include/ctf/ctf-types-bitfield.h b/include/ctf/ctf-types-bitfield.h index a6764bf5..82ee1120 100644 --- a/include/ctf/ctf-types-bitfield.h +++ b/include/ctf/ctf-types-bitfield.h @@ -6,16 +6,28 @@ * * Bitfields read/write functions. * - * Copyright 2010 - Mathieu Desnoyers + * Copyright (c) 2010 Mathieu Desnoyers * - * Dual LGPL v2.1/GPL v2 license. + * This library 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. + * + * This library 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 this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include static inline -uint64_t ctf_bitfield_unsigned_read(const uint8_t *ptr, +uint64_t ctf_bitfield_unsigned_read(const unsigned char *ptr, unsigned long start, unsigned long len, int byte_order) { @@ -29,7 +41,7 @@ uint64_t ctf_bitfield_unsigned_read(const uint8_t *ptr, } static inline -int64_t ctf_bitfield_signed_read(const uint8_t *ptr, +int64_t ctf_bitfield_signed_read(const unsigned char *ptr, unsigned long start, unsigned long len, int byte_order) { @@ -43,7 +55,7 @@ int64_t ctf_bitfield_signed_read(const uint8_t *ptr, } static inline -size_t ctf_bitfield_unsigned_write(uint8_t *ptr, +size_t ctf_bitfield_unsigned_write(unsigned char *ptr, unsigned long start, unsigned long len, int byte_order, uint64_t v) { @@ -58,7 +70,7 @@ end: } static inline -size_t ctf_bitfield_signed_write(uint8_t *ptr, +size_t ctf_bitfield_signed_write(unsigned char *ptr, unsigned long start, unsigned long len, int byte_order, int64_t v) {