diff --git a/Makefile b/Makefile index d20b669..df1da37 100755 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ CXX = g++ endif ifndef CXXFLAGS -CXXFLAGS = -fPIC -Wall -pedantic -O2 -I/usr/local/include -I/home/tomek/roboczy/winix -I/home/tomek/roboczy/ezc/src -I/home/tomek/roboczy/tito/src -I/home/tomek/roboczy/pikotools -L/usr/local/lib -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM +CXXFLAGS = -fPIC -Wall -pedantic -O2 -pthread -I/usr/local/include -I/home/tomek/roboczy/winix -I/home/tomek/roboczy/ezc/src -I/home/tomek/roboczy/tito/src -I/home/tomek/roboczy/pikotools -L/usr/local/lib -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM endif export CXX @@ -26,7 +26,7 @@ winix.so: FORCE @cd ../ezc/src ; $(MAKE) -e @cd ../tito/src ; $(MAKE) -e @cd ../pikotools ; $(MAKE) -e - $(CXX) -shared -rdynamic -Wl,-whole-archive -o winix.so $(CXXFLAGS) core/*.o db/*.o functions/*.o templates/*.o notify/*.o ../ezc/src/ezc.a ../tito/src/tito.a ../pikotools/utf8/utf8.a ../pikotools/confparser/confparser.a ../pikotools/mainparser/mainparser.a -lfcgi -lpq -lz -lpthread -lfetch -Wl,-no-whole-archive + $(CXX) -shared -rdynamic -Wl,-whole-archive -o winix.so $(CXXFLAGS) core/*.o db/*.o functions/*.o templates/*.o notify/*.o ../ezc/src/ezc.a ../tito/src/tito.a ../pikotools/utf8/utf8.a ../pikotools/confparser/confparser.a ../pikotools/mainparser/mainparser.a -lfcgi -lpq -lz -lfetch -lpthread -Wl,-no-whole-archive winix: FORCE diff --git a/core/log.cpp b/core/log.cpp index 868987f..1ce050c 100755 --- a/core/log.cpp +++ b/core/log.cpp @@ -233,16 +233,6 @@ Log & Log::operator<<(double s) } -Log & Log::operator<<(const PT::Space * s) -{ - if( current_level <= log_level ) - { - buffer << s; - } - -return *this; -} - Log & Log::operator<<(const PT::Space & s) { diff --git a/core/log.h b/core/log.h index ecba197..a7c1067 100755 --- a/core/log.h +++ b/core/log.h @@ -43,7 +43,6 @@ public: Log & operator<<(wchar_t s); Log & operator<<(size_t s); Log & operator<<(double s); - Log & operator<<(const PT::Space * space); Log & operator<<(const PT::Space & space); Log & operator<<(LogManipulators m); Log & operator<<(const tm & tm_); diff --git a/core/misc.cpp b/core/misc.cpp index afa9d82..3457753 100755 --- a/core/misc.cpp +++ b/core/misc.cpp @@ -536,7 +536,8 @@ return buffer; - +// !! IMPROVE ME +// in UNICODE there are some additional white characters bool IsWhite(wchar_t s) { if( s==' ' || s=='\t' || s==13 || s==160 ) diff --git a/core/textstream.h b/core/textstream.h index 34e79a3..806490d 100755 --- a/core/textstream.h +++ b/core/textstream.h @@ -57,7 +57,6 @@ public: TextStream & operator<<(unsigned long); TextStream & operator<<(double); TextStream & operator<<(const void *);// printing a pointer - TextStream & operator<<(const PT::Space * space); TextStream & operator<<(const PT::Space & space); TextStream & operator<<(const tm & tm_); @@ -307,19 +306,12 @@ TextStream & TextStream::write(const wchar_t * buf, size } -template -TextStream & TextStream::operator<<(const PT::Space * space) -{ - space->Serialize(*this, true, false); - -return *this; -} - - template TextStream & TextStream::operator<<(const PT::Space & space) { - return operator<<(&space); + space.Serialize(*this, true, false); + +return *this; } diff --git a/db/dbtextstream.cpp b/db/dbtextstream.cpp index 562fdde..4bbe5e4 100755 --- a/db/dbtextstream.cpp +++ b/db/dbtextstream.cpp @@ -577,12 +577,13 @@ return buffer; -DbTextStream & DbTextStream::operator<<(const PT::Space * space) + +DbTextStream & DbTextStream::operator<<(const PT::Space & space) { space_stream.Clear(); // !! IMPROVE ME // we can calculate how much memory is needed before serializing - space->Serialize(space_stream, true, false); + space.Serialize(space_stream, true, false); operator<<(space_stream.Str()); space_stream.Clear(); @@ -590,11 +591,5 @@ return *this; } -DbTextStream & DbTextStream::operator<<(const PT::Space & space) -{ - return operator<<(&space); -} - - diff --git a/db/dbtextstream.h b/db/dbtextstream.h index 4954bae..2f8843b 100755 --- a/db/dbtextstream.h +++ b/db/dbtextstream.h @@ -152,7 +152,6 @@ public: DbTextStream & operator<<(const void *); DbTextStream & operator<<(const tm & t); DbTextStream & operator<<(const std::vector & tabid); - DbTextStream & operator<<(const PT::Space * space); DbTextStream & operator<<(const PT::Space & space); diff --git a/templates/htmltextstream.cpp b/templates/htmltextstream.cpp index 948d7ce..2f259fe 100755 --- a/templates/htmltextstream.cpp +++ b/templates/htmltextstream.cpp @@ -409,12 +409,13 @@ return *this; } -HtmlTextStream & HtmlTextStream::operator<<(const PT::Space * space) + +HtmlTextStream & HtmlTextStream::operator<<(const PT::Space & space) { space_stream.Clear(); // !! IMPROVE ME // we can calculate how many memory is needed beforehand - space->Serialize(space_stream, true, false); + space.Serialize(space_stream, true, false); operator<<(space_stream.Str()); space_stream.Clear(); @@ -422,9 +423,3 @@ return *this; } -HtmlTextStream & HtmlTextStream::operator<<(const PT::Space & space) -{ - return operator<<(&space); -} - - diff --git a/templates/htmltextstream.h b/templates/htmltextstream.h index fa3a40e..8be7a93 100755 --- a/templates/htmltextstream.h +++ b/templates/htmltextstream.h @@ -144,7 +144,6 @@ public: HtmlTextStream & operator<<(double); HtmlTextStream & operator<<(const void *); HtmlTextStream & operator<<(const tm & t); - HtmlTextStream & operator<<(const PT::Space * space); HtmlTextStream & operator<<(const PT::Space & space); private: