ref: 2d8cd749501b9a51a8dd8904e30b6e61e4ce4c6d
parent: fe98bdf4e982a6d4936f557f2c5f103647799301
author: Yaroslav Kolomiiets <yarikos@gmail.com>
date: Tue Feb 21 10:19:46 EST 2017
fix marshalling macros (broken since b892719bf367)
--- a/dat.h
+++ b/dat.h
@@ -9,10 +9,14 @@
#define GSHORTB(p) ((p)[0]<<8|((p)[1]))
#define GLONG(p) ((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24))
#define GLONGB(p) (((p)[0]<<24)|((p)[1]<<16)|((p)[2]<<8)|(p)[3])
-#define PSHORT(p,v) (p)[0]=(uchar)(v);(p)[1]=(uchar)(v)>>8
-#define PSHORTB(p,v) (p)[0]=(uchar)(v)>>8;(p)[1]=(uchar)(v)
-#define PLONG(p,v) (p)[0]=(uchar)(v);(p)[1]=(uchar)(v)>>8;(p)[2]=(uchar)(v)>>16;(p)[3]=(uchar)(v)>>24
-#define PLONGB(p,v) (p)[0]=(uchar)(v)>>24;(p)[1]=(uchar)(v)>>16;(p)[2]=(uchar)(v)>>8;(p)[3]=(uchar)(v)
+#define PSHORT(p,v) (p)[0]=(uchar)(v);(p)[1]=(uchar)((v)>>8)
+#define PSHORTB(p,v) (p)[0]=(uchar)((v)>>8);(p)[1]=(uchar)(v)
+#define PLONG(p,v) \
+ (p)[0]=(uchar)(v);(p)[1]=(uchar)((v)>>8);\
+ (p)[2]=(uchar)((v)>>16);(p)[3]=(uchar)((v)>>24)
+#define PLONGB(p,v) \
+ (p)[0]=(uchar)((v)>>24);(p)[1]=(uchar)((v)>>16);\
+ (p)[2]=(uchar)((v)>>8);(p)[3]=(uchar)(v)
#define MIN(x,y) (((x) < (y)) ? (x) : (y))