From ac67f2d3eed20253e6a150b5e0b5936526ce1404 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 30 May 2012 13:46:12 -0400 Subject: Remove a kludge. Affects only the Evermore binary driver. If I botched incrementing any of the offsets, this could break the Evermore binary driver - no way to test that, we don't have a xapture log for it. But the regression tests we do have all pass. --- bits.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'bits.h') diff --git a/bits.h b/bits.h index 751423b5..3d598114 100644 --- a/bits.h +++ b/bits.h @@ -29,17 +29,10 @@ union long_double { double d; }; -#ifndef GET_ORIGIN -#define GET_ORIGIN 0 -#endif -#ifndef PUT_ORIGIN -#define PUT_ORIGIN 0 -#endif - /* these are independent of byte order */ -#define getsb(buf, off) ((int8_t)buf[(off)-(GET_ORIGIN)]) -#define getub(buf, off) ((uint8_t)buf[(off)-(GET_ORIGIN)]) -#define putbyte(buf,off,b) do {buf[(off)-(PUT_ORIGIN)] = (unsigned char)(b);} while (0) +#define getsb(buf, off) ((int8_t)buf[off]) +#define getub(buf, off) ((uint8_t)buf[off]) +#define putbyte(buf,off,b) do {buf[off] = (unsigned char)(b);} while (0) /* little-endian access */ #define getles16(buf, off) ((int16_t)(((uint16_t)getub((buf), (off)+1) << 8) | (uint16_t)getub((buf), (off)))) -- cgit v1.2.1