# HG changeset patch # User etisserant # Date 1186499883 -7200 # Node ID cab66ef3e68eb98ae6fd0a7dd453271dbf4e60c5 # Parent 39e22f84ce6ebde0c6f42dcc502ecd02bc20bb0c Some fixes for C++ diff -r 39e22f84ce6e -r cab66ef3e68e include/data.h --- a/include/data.h Mon Aug 06 17:59:06 2007 +0200 +++ b/include/data.h Tue Aug 07 17:18:03 2007 +0200 @@ -20,10 +20,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #ifndef __data_h__ #define __data_h__ +#ifdef __cplusplus +extern "C" { +#endif + /* declaration of CO_Data type let us include all necessary headers struct struct_CO_Data can then be defined later */ @@ -174,6 +177,10 @@ 1 /*dcf_count_targets*/\ } +#ifdef __cplusplus +}; +#endif + #endif /* __data_h__ */ diff -r 39e22f84ce6e -r cab66ef3e68e include/unix/canfestival.h --- a/include/unix/canfestival.h Mon Aug 06 17:59:06 2007 +0200 +++ b/include/unix/canfestival.h Tue Aug 07 17:18:03 2007 +0200 @@ -1,6 +1,10 @@ #ifndef UNIX_H_ #define UNIX_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include "timerscfg.h" #include "can_driver.h" #include "data.h" @@ -19,4 +23,8 @@ CAN_PORT canOpen(s_BOARD *board, CO_Data * d); int canClose(CO_Data * d); +#ifdef __cplusplus +}; +#endif + #endif /*UNIX_H_*/ diff -r 39e22f84ce6e -r cab66ef3e68e src/dcf.c --- a/src/dcf.c Mon Aug 06 17:59:06 2007 +0200 +++ b/src/dcf.c Tue Aug 07 17:18:03 2007 +0200 @@ -109,7 +109,7 @@ { /* pointer to the DCF string for NodeID */ target_Index = UNS16_LE(*((UNS16*)(d->dcf_cursor))); d->dcf_cursor += 2; - target_Subindex = *((UNS8*)(((UNS8*)d->dcf_cursor)++)); + target_Subindex = *((UNS8*)((UNS8*)d->dcf_cursor++)); target_Size = UNS32_LE(*((UNS32*)(d->dcf_cursor))); d->dcf_cursor += 4; /* printf("Master : ConfigureSlaveNode %2.2x (Concise