diff options
author | Wohlstand <admin@wohlnet.ru> | 2021-01-07 13:17:37 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2021-01-07 13:17:37 +0300 |
commit | 57485b48ca9ce31e6b94b1ce5f1d892ff0b786bf (patch) | |
tree | 6efc3ff09f4cde2d9d0a7233518031b071d456af /utils/adlmidi-2/input.hpp | |
parent | 2712113e3895988a0f712e8bd1c0e109e6d6f139 (diff) | |
download | libADLMIDI-57485b48ca9ce31e6b94b1ce5f1d892ff0b786bf.tar.gz libADLMIDI-57485b48ca9ce31e6b94b1ce5f1d892ff0b786bf.tar.bz2 libADLMIDI-57485b48ca9ce31e6b94b1ce5f1d892ff0b786bf.zip |
adlmidi2: Add the test check for termio and termios type
#241
Diffstat (limited to 'utils/adlmidi-2/input.hpp')
-rw-r--r-- | utils/adlmidi-2/input.hpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/utils/adlmidi-2/input.hpp b/utils/adlmidi-2/input.hpp index 0cafd51..6d0a796 100644 --- a/utils/adlmidi-2/input.hpp +++ b/utils/adlmidi-2/input.hpp @@ -29,14 +29,23 @@ static const unsigned NewTimerFreq = 209; # include <csignal> #endif +#if defined(HAS_TERMIO) +typedef struct termio InputTermio_t; +#elif defined(HAS_TERMIOS) +typedef struct termios InputTermio_t; +#else +# error Undefined type for termio; +#endif + class xInput { - #ifdef _WIN32 +#ifdef _WIN32 void *inhandle; - #endif - #if (!defined(_WIN32) || defined(__CYGWIN__)) && !defined(__DJGPP__) && !defined(__APPLE__) - struct termio back; - #endif +#endif +#if (!defined(_WIN32) || defined(__CYGWIN__)) && !defined(__DJGPP__) && !defined(__APPLE__) + InputTermio_t back; +#endif + public: xInput(); ~xInput(); |