X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Funaligned.h;h=6da60d4ddad3112200274b36d271403c2486caf6;hb=36689e3146ae5c7aca4112b9da88112c7bc85755;hp=7f8c417a0937a61745e20cf1a1ada82db2d78f81;hpb=49ed04e2e93a6a5b01058638224621d5c07db01c;p=libucw.git diff --git a/lib/unaligned.h b/lib/unaligned.h index 7f8c417a..6da60d4d 100644 --- a/lib/unaligned.h +++ b/lib/unaligned.h @@ -1,14 +1,14 @@ /* - * Sherlock Library -- Fast Access to Unaligned Data + * UCW 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. */ -#ifndef _SHERLOCK_UNALIGNED_H -#define _SHERLOCK_UNALIGNED_H +#ifndef _UCW_UNALIGNED_H +#define _UCW_UNALIGNED_H #ifdef CPU_ALLOW_UNALIGNED #define GET_U16(p) (*((u16 *)(p))) @@ -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