diff --git a/include/alex.cpp b/include/alex.cpp index 3eceda40f..d159483b9 100755 --- a/include/alex.cpp +++ b/include/alex.cpp @@ -7,6 +7,7 @@ #include #include #include +#include TVariant& TVariant_stack::peek(int depth) { diff --git a/include/utility.cpp b/include/utility.cpp index b1eef5ce1..deb495e89 100755 --- a/include/utility.cpp +++ b/include/utility.cpp @@ -494,3 +494,21 @@ const char * decode( return tmp; } +//salta gli spazi bianchi ad inizio file +istream & eatwhite(istream & i) +{ +#ifdef WIN32 + i.eatwhite(); +#else + char c; + while (i.get(c)) + { + if (!isspace(c)) + { + i.putback(c); + break; + } + } +#endif + return i; +} \ No newline at end of file diff --git a/include/utility.h b/include/utility.h index 8d2ead650..814f84352 100755 --- a/include/utility.h +++ b/include/utility.h @@ -5,6 +5,10 @@ #include #endif +#ifndef __INCSTR_H +#include <../xvaga/incstr.h> +#endif + class TString_array; class TFilename; @@ -33,6 +37,8 @@ inline bool is_not_slash(char s) // @parm Carattere da confrontare const char* esc(const char* str); // Trasforma le sequenze "\n" nel carattere '\n' const char* unesc(const char* str); // Trasforma i caratteri '\n' nella sequenza "\n" +istream& eatwhite (istream& i); + #define ODD(x) (x & 1) #define EVEN(x) !(x & 1)