for debugging only sync
authorVolker Birk <vb@pep-project.org>
Tue, 09 Jul 2019 11:44:53 +0200
branchsync
changeset 39134868b1702198
parent 3912 506818fe8cbd
child 3922 a2ebf83845c9
for debugging only
sync/gen_statemachine.ysl2
     1.1 --- a/sync/gen_statemachine.ysl2	Tue Jul 09 11:36:55 2019 +0200
     1.2 +++ b/sync/gen_statemachine.ysl2	Tue Jul 09 11:44:53 2019 +0200
     1.3 @@ -1046,8 +1046,10 @@
     1.4  
     1.5          // state machine
     1.6  
     1.7 +        #ifndef NDEBUG
     1.8          const char *«@name»_state_name(int state);
     1.9          const char *«@name»_event_name(int event);
    1.10 +        #endif
    1.11  
    1.12          // the state machine function is returning the next state in case of a
    1.13          // transition or None for staying
    1.14 @@ -1073,6 +1075,9 @@
    1.15          #include "«@name»_fsm.h"
    1.16          #include <stdlib.h>
    1.17  
    1.18 +        #ifdef NDEBUG
    1.19 +        static
    1.20 +        #endif
    1.21          const char *«@name»_state_name(int state)
    1.22          {
    1.23              switch (state) {
    1.24 @@ -1093,6 +1098,9 @@
    1.25              }
    1.26          }
    1.27  
    1.28 +        #ifdef NDEBUG
    1.29 +        static
    1.30 +        #endif
    1.31          const char *«@name»_event_name(int event)
    1.32          {
    1.33              switch (event) {