certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi/libHLA MsgBuffer.h MsgBuffer.c MsgBufferT...


From: CERTI CVS commits
Subject: [certi-cvs] certi/libHLA MsgBuffer.h MsgBuffer.c MsgBufferT...
Date: Fri, 29 Jul 2011 09:08:45 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      11/07/29 09:08:45

Modified files:
        libHLA         : MsgBuffer.h MsgBuffer.c MsgBufferTests.c 

Log message:
        Be homogeneous even with bool

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libHLA/MsgBuffer.h?cvsroot=certi&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/certi/libHLA/MsgBuffer.c?cvsroot=certi&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/certi/libHLA/MsgBufferTests.c?cvsroot=certi&r1=1.1&r2=1.2

Patches:
Index: MsgBuffer.h
===================================================================
RCS file: /sources/certi/certi/libHLA/MsgBuffer.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- MsgBuffer.h 19 Jul 2011 20:21:20 -0000      1.3
+++ MsgBuffer.h 29 Jul 2011 09:08:45 -0000      1.4
@@ -444,8 +444,8 @@
 MB_write_bool(MsgBuffer_t* msg,  bool_t toggle);
 
 MB_EXPORT
-bool_t
-MB_read_bool(MsgBuffer_t* msg);
+int32_t
+MB_read_bool(MsgBuffer_t* msg, bool_t* toggle);
 
 /**
  * Update the reserved bytes area.

Index: MsgBuffer.c
===================================================================
RCS file: /sources/certi/certi/libHLA/MsgBuffer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- MsgBuffer.c 10 Jun 2011 14:39:33 -0000      1.2
+++ MsgBuffer.c 29 Jul 2011 09:08:45 -0000      1.3
@@ -93,9 +93,9 @@
     }
 }
 
-bool_t
-MB_read_bool(MsgBuffer_t* msg) {
-    return (1==MB_get_uint8(msg));
+int32_t
+MB_read_bool(MsgBuffer_t* msg, bool_t* toggle) {
+    return MB_read_uint8(msg,toggle);
 }
 
 static void MB_initialize(MsgBuffer_t* msg) {

Index: MsgBufferTests.c
===================================================================
RCS file: /sources/certi/certi/libHLA/MsgBufferTests.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- MsgBufferTests.c    10 Jun 2011 14:05:30 -0000      1.1
+++ MsgBufferTests.c    29 Jul 2011 09:08:45 -0000      1.2
@@ -95,8 +95,8 @@
     MB_read_int64(MsgBuf,&vi64); assert(vi64==i64);
     MB_read_float(MsgBuf,&vf32); assert(vf32==f32);
     MB_read_double(MsgBuf,&vd64); assert(vd64==d64);
-    vtrueBool = MB_read_bool(MsgBuf); assert(trueBool==vtrueBool);
-    vfalseBool = MB_read_bool(MsgBuf); assert(falseBool==vfalseBool);
+    MB_read_bool(MsgBuf,&vtrueBool); assert(trueBool==vtrueBool);
+    MB_read_bool(MsgBuf,&vfalseBool); assert(falseBool==vfalseBool);
     MB_read_string(MsgBuf,vstdstr,MYVSTR_SIZE); 
assert(0==strcmp(vstdstr,stdstr));
     printf("    std::string = %s\n",vstdstr);
     printf("    All encoded/decoded values are equal.\n");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]