[Tinyos-2-commits] CVS: tinyos-2.x/support/sdk/c message.h, 1.2, 1.3 serialsource.h, 1.2, 1.3 sfsource.c, 1.2, 1.3 sfsource.h, 1.2, 1.3

David Gay idgay at users.sourceforge.net
Mon Jul 2 13:52:53 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/support/sdk/c
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13604

Modified Files:
	message.h serialsource.h sfsource.c sfsource.h 
Log Message:
changes for C++


Index: message.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/support/sdk/c/message.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** message.h	12 Jul 2006 16:59:53 -0000	1.2
--- message.h	2 Jul 2007 20:52:51 -0000	1.3
***************
*** 16,19 ****
--- 16,23 ----
  #include <stdlib.h>
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  /** The type of message buffers */
  typedef struct tmsg tmsg_t;
***************
*** 146,148 ****
--- 150,156 ----
  void tmsg_write_float_be(tmsg_t *msg, size_t offset, float x);
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  #endif

Index: serialsource.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/support/sdk/c/serialsource.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** serialsource.h	12 Jul 2006 16:59:53 -0000	1.2
--- serialsource.h	2 Jul 2007 20:52:51 -0000	1.3
***************
*** 2,5 ****
--- 2,9 ----
  #define SERIALSOURCE_H
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  typedef struct serial_source *serial_source;
  
***************
*** 71,73 ****
--- 75,81 ----
  */
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  #endif

Index: sfsource.c
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/support/sdk/c/sfsource.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sfsource.c	12 Jul 2006 16:59:53 -0000	1.2
--- sfsource.c	2 Jul 2007 20:52:51 -0000	1.3
***************
*** 27,31 ****
        count -= n;
        actual += n;
!       buffer += n;
      }
    return actual;
--- 27,31 ----
        count -= n;
        actual += n;
!       buffer = (char*)buffer + n;
      }
    return actual;
***************
*** 47,51 ****
        count -= n;
        actual += n;
!       buffer += n;
      }
    return actual;
--- 47,51 ----
        count -= n;
        actual += n;
!       buffer = (char*)buffer + n;
      }
    return actual;

Index: sfsource.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/support/sdk/c/sfsource.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sfsource.h	12 Jul 2006 16:59:54 -0000	1.2
--- sfsource.h	2 Jul 2007 20:52:51 -0000	1.3
***************
*** 2,5 ****
--- 2,9 ----
  #define SFSOURCE_H
  
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ 
  int open_sf_source(const char *host, int port);
  /* Returns: file descriptor for TinyOS 2.0 serial forwarder at host:port, or
***************
*** 26,28 ****
--- 30,36 ----
  */
  
+ #ifdef __cplusplus
+ }
+ #endif
+ 
  #endif



More information about the Tinyos-2-commits mailing list