From: Martin Mares Date: Mon, 30 Jun 2003 10:57:25 +0000 (+0000) Subject: Add GET_U8 and PUT_U8 for completeness. X-Git-Tag: holmes-import~1233 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=cd99e84d4147c54fef693c094e202dc40f91340b;p=libucw.git Add GET_U8 and PUT_U8 for completeness. --- diff --git a/lib/unaligned.h b/lib/unaligned.h index 7f8c417a..029452d3 100644 --- a/lib/unaligned.h +++ b/lib/unaligned.h @@ -1,7 +1,7 @@ /* * Sherlock Library -- Fast Access to Unaligned Data * - * (c) 1997--2001 Martin Mares + * (c) 1997--2003 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -44,4 +44,9 @@ #define PUT_U40(p,x) do { (p)[4] = ((x) >> 32); PUT_U32(p, x); } while(0) #endif +/* Just for completeness */ + +#define GET_U8(p) (*(byte *)(p)) +#define PUT_U8(p,x) *((byte *)(p)) = (x) + #endif