From 26877dedbda6a33d98217e5b9a1560bf41e62c3e Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Wed, 20 Feb 2019 15:11:07 +0100 Subject: [PATCH] move enum Commands into class StreamCore to avoid collisions of enum state wait with function pid_t wait(int*) --- src/StreamCore.cc | 6 ++---- src/StreamCore.h | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/StreamCore.cc b/src/StreamCore.cc index 1595c3b..49c17fd 100644 --- a/src/StreamCore.cc +++ b/src/StreamCore.cc @@ -25,12 +25,10 @@ #define Z PRINTF_SIZE_T_PREFIX -ENUM (Commands, - end, in, out, wait, event, exec, connect, disconnect); - /// debug functions ///////////////////////////////////////////// -static char* printCommands(StreamBuffer& buffer, const char* c) +char* StreamCore:: +printCommands(StreamBuffer& buffer, const char* c) { unsigned long timeout; unsigned long eventnumber; diff --git a/src/StreamCore.h b/src/StreamCore.h index d360837..d2c4bcb 100644 --- a/src/StreamCore.h +++ b/src/StreamCore.h @@ -107,6 +107,9 @@ protected: ENUM(StartMode, StartNormal, StartInit, StartAsync); + ENUM (Commands, + end, in, out, wait, event, exec, connect, disconnect); + class MutexLock { StreamCore* stream; @@ -221,6 +224,9 @@ public: void printProtocol(FILE* = stdout); const char* name() { return streamname; } void printStatus(StreamBuffer& buffer); + +private: + char* printCommands(StreamBuffer& buffer, const char* c); }; #endif