diff --git a/xvaga/incstr.cpp b/xvaga/incstr.cpp new file mode 100755 index 000000000..4ce11bd12 --- /dev/null +++ b/xvaga/incstr.cpp @@ -0,0 +1,15 @@ +#include + +istream & eatwhite(istream & i) +{ + char c; + while (i.get(c)) + { + if (!isspace(c)) + { + i.putback(c); + break; + } + } + return i; +} diff --git a/xvaga/incstr.h b/xvaga/incstr.h index 2327f216f..f96f7c15a 100755 --- a/xvaga/incstr.h +++ b/xvaga/incstr.h @@ -1,13 +1,21 @@ #ifndef __INCSTR_H #define __INCRSTR_H + #ifdef WIN32 #ifndef _INC_FSTREAM #include #endif #include -#else + +istream & eatwhite(istream & i) { i.eatwhite(); } + +#else // WIN32 #include +#include #include using namespace std; -#endif + +istream & eatwhite(istream & i); +#endif //WIN32 + #endif