[Pvfs2-cvs] commit by pw in pvfs2/src/proto: endecode-funcs.h

CVS commit program cvs at parl.clemson.edu
Sat Dec 2 13:52:21 EST 2006


Update of /projects/cvsroot/pvfs2/src/proto
In directory parlweb1:/tmp/cvs-serv32700/src/proto

Modified Files:
	endecode-funcs.h 
Log Message:
need 6-field encoding


Index: endecode-funcs.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/proto/endecode-funcs.h,v
diff -u -p -p -u -r1.20 -r1.21
--- endecode-funcs.h	26 Sep 2006 03:44:18 -0000	1.20
+++ endecode-funcs.h	2 Dec 2006 18:52:21 -0000	1.21
@@ -233,6 +233,29 @@ static inline void decode_##name(char **
 #define endecode_fields_5_struct(name, t1, x1, t2, x2, t3, x3, t4, x4, t5, x5) \
     endecode_fields_5_generic(name, struct name, t1, x1, t2, x2, t3, x3, t4, x4, t5, x5)
 
+#define endecode_fields_6_generic(name, sname, t1, x1, t2, x2, t3, x3, t4, x4, t5, x5, t6, x6) \
+static inline void encode_##name(char **pptr, const sname *x) { \
+    encode_##t1(pptr, &x->x1); \
+    encode_##t2(pptr, &x->x2); \
+    encode_##t3(pptr, &x->x3); \
+    encode_##t4(pptr, &x->x4); \
+    encode_##t5(pptr, &x->x5); \
+    encode_##t6(pptr, &x->x6); \
+} \
+static inline void decode_##name(char **pptr, sname *x) { \
+    decode_##t1(pptr, &x->x1); \
+    decode_##t2(pptr, &x->x2); \
+    decode_##t3(pptr, &x->x3); \
+    decode_##t4(pptr, &x->x4); \
+    decode_##t5(pptr, &x->x5); \
+    decode_##t6(pptr, &x->x6); \
+}
+
+#define endecode_fields_6(name, t1, x1, t2, x2, t3, x3, t4, x4, t5, x5, t6, x6) \
+    endecode_fields_6_generic(name, name, t1, x1, t2, x2, t3, x3, t4, x4, t5, x5, t6, x6)
+#define endecode_fields_6_struct(name, t1, x1, t2, x2, t3, x3, t4, x4, t5, x5, t6, x6) \
+    endecode_fields_6_generic(name, struct name, t1, x1, t2, x2, t3, x3, t4, x4, t5, x5, t6, x6)
+
 #define endecode_fields_7(name,t1,x1,t2,x2,t3,x3,t4,x4,t5,x5,t6,x6,t7,x7) \
 static inline void encode_##name(char **pptr, const name *x) { \
     encode_##t1(pptr, &x->x1); \



More information about the Pvfs2-cvs mailing list