diff options
author | marha <marha@users.sourceforge.net> | 2011-03-07 16:16:30 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-03-07 16:16:30 +0000 |
commit | c1fc9700f5eddaf2cea1efd8bd1e67a1e9c8030d (patch) | |
tree | a3ed093721c50e42adafbbb87c9529c69e3195e4 /tools/plink/misc.h | |
parent | 41467367b93dff68246a6656d82e892184a520ea (diff) | |
download | vcxsrv-c1fc9700f5eddaf2cea1efd8bd1e67a1e9c8030d.tar.gz vcxsrv-c1fc9700f5eddaf2cea1efd8bd1e67a1e9c8030d.tar.bz2 vcxsrv-c1fc9700f5eddaf2cea1efd8bd1e67a1e9c8030d.zip |
Solved debug compilation
Diffstat (limited to 'tools/plink/misc.h')
-rw-r--r-- | tools/plink/misc.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/plink/misc.h b/tools/plink/misc.h index 11233147a..fc5b7d53d 100644 --- a/tools/plink/misc.h +++ b/tools/plink/misc.h @@ -92,18 +92,18 @@ void debug_memdump(void *buf, int len, int L); ((unsigned long)(unsigned char)(cp)[3] << 24))
#define PUT_32BIT_LSB_FIRST(cp, value) ( \
- (cp)[0] = (unsigned char)(value), \
- (cp)[1] = (unsigned char)((value) >> 8), \
- (cp)[2] = (unsigned char)((value) >> 16), \
- (cp)[3] = (unsigned char)((value) >> 24) )
+ (cp)[0] = (unsigned char)((value)&0xff), \
+ (cp)[1] = (unsigned char)(((value) >> 8)&0xff), \
+ (cp)[2] = (unsigned char)(((value) >> 16)&0xff), \
+ (cp)[3] = (unsigned char)(((value) >> 24)&0xff) )
#define GET_16BIT_LSB_FIRST(cp) \
(((unsigned long)(unsigned char)(cp)[0]) | \
((unsigned long)(unsigned char)(cp)[1] << 8))
#define PUT_16BIT_LSB_FIRST(cp, value) ( \
- (cp)[0] = (unsigned char)(value), \
- (cp)[1] = (unsigned char)((value) >> 8) )
+ (cp)[0] = (unsigned char)((value)&0xff), \
+ (cp)[1] = (unsigned char)(((value) >> 8)&0xff) )
#define GET_32BIT_MSB_FIRST(cp) \
(((unsigned long)(unsigned char)(cp)[0] << 24) | \
@@ -114,16 +114,16 @@ void debug_memdump(void *buf, int len, int L); #define GET_32BIT(cp) GET_32BIT_MSB_FIRST(cp)
#define PUT_32BIT_MSB_FIRST(cp, value) ( \
- (cp)[0] = (unsigned char)((value) >> 24), \
- (cp)[1] = (unsigned char)((value) >> 16), \
- (cp)[2] = (unsigned char)((value) >> 8), \
- (cp)[3] = (unsigned char)(value) )
+ (cp)[0] = (unsigned char)(((value) >> 24)&0xff), \
+ (cp)[1] = (unsigned char)(((value) >> 16)&0xff), \
+ (cp)[2] = (unsigned char)(((value) >> 8)&0xff), \
+ (cp)[3] = (unsigned char)((value)&0xff) )
#define PUT_32BIT(cp, value) PUT_32BIT_MSB_FIRST(cp, value)
#define GET_16BIT_MSB_FIRST(cp) \
- (((unsigned long)(unsigned char)(cp)[0] << 8) | \
- ((unsigned long)(unsigned char)(cp)[1]))
+ (((unsigned long)(unsigned char)((cp)[0] << 8)&0xff) | \
+ ((unsigned long)(unsigned char)((cp)[1])&0xff))
#define PUT_16BIT_MSB_FIRST(cp, value) ( \
(cp)[0] = (unsigned char)((value) >> 8), \
|