From 9f5a1bd76069301856abdf7e6cb5cff7964ae838 Mon Sep 17 00:00:00 2001 From: Shinya Kitaoka Date: Apr 20 2016 01:24:44 +0000 Subject: use _WIN32 instead of WIN32 --- diff --git a/toonz/sources/common/tapptools/tcolorutils.cpp b/toonz/sources/common/tapptools/tcolorutils.cpp index e2075b3..b83d8fd 100644 --- a/toonz/sources/common/tapptools/tcolorutils.cpp +++ b/toonz/sources/common/tapptools/tcolorutils.cpp @@ -10,7 +10,7 @@ typedef float KEYER_FLOAT; //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 #define ISNAN _isnan #else extern "C" int isnan(double); diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cpp index 6441e23..c380469 100644 --- a/toonz/sources/common/tapptools/tenv.cpp +++ b/toonz/sources/common/tapptools/tenv.cpp @@ -69,7 +69,7 @@ public: TFilePath getSystemVarPath(string varName) { -#ifdef WIN32 +#ifdef _WIN32 return m_registryRoot + varName; #else QString settingsPath = QString::fromStdString(getApplicationName()) + QString("_") + @@ -90,7 +90,7 @@ public: string getSystemVarValue(string varName) { -#ifdef WIN32 +#ifdef _WIN32 return TSystem::getSystemValue(getSystemVarPath(varName)).toStdString(); #else TFilePath systemVarPath = getSystemVarPath(varName); @@ -146,7 +146,7 @@ public: m_applicationFullName = m_applicationName + " " + m_applicationVersion; m_moduleName = m_applicationName; m_rootVarName = toUpper(m_applicationName) + "ROOT"; -#ifdef WIN32 +#ifdef _WIN32 m_registryRoot = TFilePath("SOFTWARE\\OpenToonz\\") + m_applicationName + m_applicationVersion; #endif m_systemVarPrefix = m_applicationName; diff --git a/toonz/sources/common/tapptools/ttimer.cpp b/toonz/sources/common/tapptools/ttimer.cpp index 0e631ee..7482052 100644 --- a/toonz/sources/common/tapptools/ttimer.cpp +++ b/toonz/sources/common/tapptools/ttimer.cpp @@ -3,7 +3,7 @@ #include "ttimer.h" #include "texception.h" -#ifdef WIN32 +#ifdef _WIN32 #include diff --git a/toonz/sources/common/tcache/timagecache.cpp b/toonz/sources/common/tcache/timagecache.cpp index 7b139ef..2ff378f 100644 --- a/toonz/sources/common/tcache/timagecache.cpp +++ b/toonz/sources/common/tcache/timagecache.cpp @@ -41,7 +41,7 @@ #include #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif @@ -121,7 +121,7 @@ public: bool m_modified; }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif typedef TSmartPointerT CacheItemP; @@ -368,7 +368,7 @@ public: TImageP m_image; }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -417,7 +417,7 @@ public: TRasterP m_compressedRas; }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -518,7 +518,7 @@ public: TFilePath m_fp; }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -587,7 +587,7 @@ public: TFilePath m_fp; }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -854,7 +854,7 @@ void TImageCache::Imp::doCompress() } string id = it->first; -#ifdef WIN32 +#ifdef _WIN32 assert(itu->first == it->second->m_historyCount); itu = m_itemHistory.erase(itu); m_itemsByImagePointer.erase(getPointer(item->getImage())); @@ -939,7 +939,7 @@ void TImageCache::Imp::doCompress(string id) return; // id not found: return // delete itu from m_itemHistory -#ifdef WIN32 +#ifdef _WIN32 assert(itu->first == it->second->m_historyCount); itu = m_itemHistory.erase(itu); m_itemsByImagePointer.erase(getPointer(item->getImage())); @@ -1044,7 +1044,7 @@ UCHAR *TImageCache::Imp::compressAndMalloc(TUINT32 size) m_compressedItems[it->first] = newItem; } -#ifdef WIN32 +#ifdef _WIN32 assert(itu->first == it->second->m_historyCount); itu = m_itemHistory.erase(itu); m_itemsByImagePointer.erase(getPointer(item->getImage())); diff --git a/toonz/sources/common/tcontenthistory.cpp b/toonz/sources/common/tcontenthistory.cpp index 6ae89fc..b4ad776 100644 --- a/toonz/sources/common/tcontenthistory.cpp +++ b/toonz/sources/common/tcontenthistory.cpp @@ -6,7 +6,7 @@ #include #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif #include diff --git a/toonz/sources/common/tcore/tstopwatch.cpp b/toonz/sources/common/tcore/tstopwatch.cpp index dd0cb16..6b49ee3 100644 --- a/toonz/sources/common/tcore/tstopwatch.cpp +++ b/toonz/sources/common/tcore/tstopwatch.cpp @@ -17,7 +17,7 @@ #include #ifndef STW_TICKS_PER_SECOND -#ifndef WIN32 +#ifndef _WIN32 extern "C" long sysconf(int); #define STW_TICKS_PER_SECOND sysconf(_SC_CLK_TCK) #else @@ -36,7 +36,7 @@ enum TimerType { TTUUnknown, TTUTickCount }; static void determineTimer(); -#ifdef WIN32 +#ifdef _WIN32 static TimerType timerToUse = TTUUnknown; @@ -150,7 +150,7 @@ static void checkTime(START start, START_USER startUser, START_SYSTEM startSyste { assert(timerToUse == TTUTickCount); -#ifdef WIN32 +#ifdef _WIN32 DWORD tm_stop; FILETIME creationTime, exitTime, stopSystem, stopUser; @@ -166,7 +166,7 @@ static void checkTime(START start, START_USER startUser, START_SYSTEM startSyste tmUser += FileTimeToInt64(&stopUser) - FileTimeToInt64(&startUser); //user elapsed time tmSystem += FileTimeToInt64(&stopSystem) - FileTimeToInt64(&startSystem); //system elapsed time -#else //WIN32 +#else // _WIN32 struct tms clk; clock_t tm_stop; @@ -176,12 +176,12 @@ static void checkTime(START start, START_USER startUser, START_SYSTEM startSyste tmUser += clk.tms_utime - startUser; tmSystem += clk.tms_stime - startSystem; -#endif //WIN32 +#endif // _WIN32 } //----------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 // // come checkTime, ma usa i timer ad alta risoluzione @@ -255,7 +255,7 @@ void hrCheckTime(LARGE_INTEGER start, START_USER startUser, START_SYSTEM startSy } //namespace -#endif //WIN32 +#endif // _WIN32 //----------------------------------------------------------- @@ -264,7 +264,7 @@ void TStopWatch::stop() if (!m_isRunning) return; m_isRunning = false; -#ifdef WIN32 +#ifdef _WIN32 if (timerToUse == TTUTickCount) checkTime(m_start, m_startUser, m_startSystem, m_tm, m_tmUser, m_tmSystem); else @@ -283,7 +283,7 @@ void TStopWatch::getElapsedTime(TM_TOTAL &tm, TM_USER &user, TM_SYSTEM &system) TM_USER cur_tmUser = 0; TM_SYSTEM cur_tmSystem = 0; -#ifdef WIN32 +#ifdef _WIN32 if (timerToUse == TTUTickCount) checkTime(m_start, m_startUser, m_startSystem, cur_tm, cur_tmUser, cur_tmSystem); else @@ -390,7 +390,7 @@ void TStopWatch::printGlobals() } //----------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 void dummyFunction() { diff --git a/toonz/sources/common/tcore/tstring.cpp b/toonz/sources/common/tcore/tstring.cpp index 05a8d14..b2f1c93 100644 --- a/toonz/sources/common/tcore/tstring.cpp +++ b/toonz/sources/common/tcore/tstring.cpp @@ -8,7 +8,7 @@ #include #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include "windows.h" #endif @@ -206,7 +206,7 @@ wstring toWideString(double v, int p) string toUpper(string a) { -#ifdef WIN32 +#ifdef _WIN32 return _strupr(const_cast(a.c_str())); #else string ret = a; @@ -218,7 +218,7 @@ string toUpper(string a) string toLower(string a) { -#ifdef WIN32 +#ifdef _WIN32 return _strlwr(const_cast(a.c_str())); #else string ret = a; @@ -230,7 +230,7 @@ string toLower(string a) wstring toUpper(wstring a) { -#ifdef WIN32 +#ifdef _WIN32 return _wcsupr(const_cast(a.c_str())); #else wstring ret; @@ -244,7 +244,7 @@ wstring toUpper(wstring a) wstring toLower(wstring a) { -#ifdef WIN32 +#ifdef _WIN32 return _wcslwr(const_cast(a.c_str())); #else wstring ret; diff --git a/toonz/sources/common/tfx/trenderer.cpp b/toonz/sources/common/tfx/trenderer.cpp index e61c5fc..eb3ad71 100644 --- a/toonz/sources/common/tfx/trenderer.cpp +++ b/toonz/sources/common/tfx/trenderer.cpp @@ -369,7 +369,7 @@ public: void quitWaitingLoops(); }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/common/tfx/ttzpimagefx.cpp b/toonz/sources/common/tfx/ttzpimagefx.cpp index 9779846..5a1bf92 100644 --- a/toonz/sources/common/tfx/ttzpimagefx.cpp +++ b/toonz/sources/common/tfx/ttzpimagefx.cpp @@ -11,7 +11,7 @@ void parseIndexes(string indexes, vector &items) { -#ifdef WIN32 +#ifdef _WIN32 char seps[] = " ,;"; char *token; if (indexes == "all" || indexes == "All" || indexes == "ALL") @@ -39,7 +39,7 @@ void parseIndexes(string indexes, vector &items) void insertIndexes(vector items, PaletteFilterFxRenderData *t) { -#ifdef WIN32 +#ifdef _WIN32 for (int i = 0; i < (int)items.size(); i++) { char *starttoken, *endtoken; char subseps[] = "-"; diff --git a/toonz/sources/common/tgl/tgl.cpp b/toonz/sources/common/tgl/tgl.cpp index 687fe0a..e4bfeeb 100644 --- a/toonz/sources/common/tgl/tgl.cpp +++ b/toonz/sources/common/tgl/tgl.cpp @@ -9,7 +9,7 @@ #include "tcurves.h" #ifndef __sgi -#ifdef WIN32 +#ifdef _WIN32 #include #elif defined(LINUX) #include @@ -669,7 +669,7 @@ void tglBuildMipmaps(std::vector &rasters, //----------------------------------------------------------------------------- //Forse si potrebbe togliere l'ifdef ed usare QT -#if defined(WIN32) +#if defined(_WIN32) TGlContext tglGetCurrentContext() { diff --git a/toonz/sources/common/tiio/bmp/filebmp.c b/toonz/sources/common/tiio/bmp/filebmp.c index c084a6b..363bf84 100644 --- a/toonz/sources/common/tiio/bmp/filebmp.c +++ b/toonz/sources/common/tiio/bmp/filebmp.c @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/common/tiio/bmp/filebmp.h b/toonz/sources/common/tiio/bmp/filebmp.h index 56562e0..436cba2 100644 --- a/toonz/sources/common/tiio/bmp/filebmp.h +++ b/toonz/sources/common/tiio/bmp/filebmp.h @@ -7,7 +7,7 @@ extern "C" { #endif /* -#if defined(WIN32) +#if defined(_WIN32) typedef struct {unsigned char b,g,r,m;} LPIXEL; #elif defined(__sgi) typedef struct { unsigned char m,b,g,r; } LPIXEL; diff --git a/toonz/sources/common/tiio/compatibility/tfile_io.c b/toonz/sources/common/tiio/compatibility/tfile_io.c index 1995573..11c0cb5 100644 --- a/toonz/sources/common/tiio/compatibility/tfile_io.c +++ b/toonz/sources/common/tiio/compatibility/tfile_io.c @@ -2,7 +2,7 @@ #include "tfile_io.h" -#ifdef WIN32 +#ifdef _WIN32 #include #include diff --git a/toonz/sources/common/tiio/movsettings.cpp b/toonz/sources/common/tiio/movsettings.cpp index 5a52730..fb3a83f 100644 --- a/toonz/sources/common/tiio/movsettings.cpp +++ b/toonz/sources/common/tiio/movsettings.cpp @@ -13,8 +13,8 @@ // 32-bit version //******************************************************************************* -#ifdef WIN32 -#ifdef WIN32 +#ifdef _WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif @@ -299,7 +299,7 @@ static Boolean QTCmpr_FilterProc void openMovSettingsPopup(TPropertyGroup *props, bool macBringToFront) { -#ifdef WIN32 +#ifdef _WIN32 if (InitializeQTML(0) != noErr) return; #endif diff --git a/toonz/sources/common/tiio/tiio.cpp b/toonz/sources/common/tiio/tiio.cpp index f60c8b2..4c3fe02 100644 --- a/toonz/sources/common/tiio/tiio.cpp +++ b/toonz/sources/common/tiio/tiio.cpp @@ -13,7 +13,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4786) #include #endif @@ -205,7 +205,7 @@ void Tiio::defineWriterProperties(const char *ext, TPropertyGroup *prop) } /* -#ifdef WIN32 +#ifdef _WIN32 int Tiio::openForReading(char *fn) { int fd = _open(fn, _O_BINARY|_O_RDONLY); diff --git a/toonz/sources/common/tiio/tiio_bmp.cpp b/toonz/sources/common/tiio/tiio_bmp.cpp index 160de2b..d33948b 100644 --- a/toonz/sources/common/tiio/tiio_bmp.cpp +++ b/toonz/sources/common/tiio/tiio_bmp.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/common/tiio/tiio_jpg.cpp b/toonz/sources/common/tiio/tiio_jpg.cpp index 56759a6..c8e0ee2 100644 --- a/toonz/sources/common/tiio/tiio_jpg.cpp +++ b/toonz/sources/common/tiio/tiio_jpg.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif //#include "texception.h" diff --git a/toonz/sources/common/tiio/tiio_jpg_util.cpp b/toonz/sources/common/tiio/tiio_jpg_util.cpp index f782486..5d3af09 100644 --- a/toonz/sources/common/tiio/tiio_jpg_util.cpp +++ b/toonz/sources/common/tiio/tiio_jpg_util.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/common/timage_io/timage_io.cpp b/toonz/sources/common/timage_io/timage_io.cpp index 1ed32f2..3fd2e6b 100644 --- a/toonz/sources/common/timage_io/timage_io.cpp +++ b/toonz/sources/common/timage_io/timage_io.cpp @@ -16,7 +16,7 @@ #include // OS-specific includes -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include #endif diff --git a/toonz/sources/common/tipc/tipc.cpp b/toonz/sources/common/tipc/tipc.cpp index 3fca4bf..2eb0264 100644 --- a/toonz/sources/common/tipc/tipc.cpp +++ b/toonz/sources/common/tipc/tipc.cpp @@ -13,7 +13,7 @@ #include //System-specific includes -#ifdef WIN32 +#ifdef _WIN32 #include #elif MACOSX #include @@ -270,7 +270,7 @@ QString tipc::applicationSpecificServerName(QString srvName) bool tipc::startBackgroundProcess(QString cmdline) { -#ifdef WIN32 +#ifdef _WIN32 QProcess *proc = new QProcess; proc->start(cmdline); if (proc->state() == QProcess::NotRunning) { @@ -317,7 +317,7 @@ bool tipc::startSlaveServer(QString srvName, QString cmdline) //Wait up to msecs until the socket is connecting. Wait a small amount of time //until the server is up and listening to connection (there is no other way to tell). while (dummySock->state() == QLocalSocket::UnconnectedState) { -#ifdef WIN32 +#ifdef _WIN32 Sleep(10); #else usleep(10 << 10); //10.24 msecs diff --git a/toonz/sources/common/traster/traster.cpp b/toonz/sources/common/traster/traster.cpp index e7f5b48..aaf5624 100644 --- a/toonz/sources/common/traster/traster.cpp +++ b/toonz/sources/common/traster/traster.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #ifndef UNICODE #define UNICODE #endif @@ -35,7 +35,7 @@ TRaster::TRaster(int lx, int ly, int pixelSize) //m_buffer = new UCHAR[lx*ly*pixelSize]; if (!m_buffer) { -#ifdef WIN32 +#ifdef _WIN32 static bool firstTime = true; if (firstTime) { firstTime = false; @@ -57,7 +57,7 @@ TRaster::TRaster(int lx, int ly, int pixelSize) m_buffer = BigMemoryManager.getMemoryChunk(lx*ly*pixelSize, this); //m_buffer = new UCHAR[lx*ly*pixelSize]; m_totalMemory += ((lx*ly*pixelSize)>>10); - #ifdef WIN32 + #ifdef _WIN32 MessageBox( NULL, "Run out of contiguos phisical memory: please save all and restart toonz!", "Warning", MB_OK); #endif }*/ diff --git a/toonz/sources/common/trop/runsmap.h b/toonz/sources/common/trop/runsmap.h index 04e057a..5d33dd4 100644 --- a/toonz/sources/common/trop/runsmap.h +++ b/toonz/sources/common/trop/runsmap.h @@ -52,7 +52,7 @@ public: //--------------------------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif diff --git a/toonz/sources/common/trop/tblur.cpp b/toonz/sources/common/trop/tblur.cpp index 1fb3544..b4b8715 100644 --- a/toonz/sources/common/trop/tblur.cpp +++ b/toonz/sources/common/trop/tblur.cpp @@ -3,7 +3,7 @@ #include "traster.h" #include "trop.h" #include "tpixelgr.h" -#ifdef WIN32 +#ifdef _WIN32 #include #include #endif @@ -11,7 +11,7 @@ namespace { -#ifdef WIN32 +#ifdef _WIN32 template struct BlurPixel { T b; @@ -231,7 +231,7 @@ inline void blur_code( //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 //------------------------------------------------------------------- template @@ -484,7 +484,7 @@ inline void blur_code_SSE2( } } -#endif // WIN32 +#endif // _WIN32 //------------------------------------------------------------------- @@ -574,7 +574,7 @@ template void do_filtering_chan(BlurPixel

*row1, T *row2, int length, float coeff, float coeffq, int brad, float diff, bool useSSE) { -#ifdef WIN32 +#ifdef _WIN32 if (useSSE && T::maxChannelValue == 255) blur_code_SSE2(row1, row2, length, coeff, coeffq, brad, diff, 0.5); else @@ -769,7 +769,7 @@ void do_filtering_floatRgb(T *row1, BlurPixel

*row2, int length, BLUR_CODE(0, unsigned char) */ -#ifdef WIN32 +#ifdef _WIN32 if (useSSE) blur_code_SSE2(row1, row2, length, coeff, coeffq, brad, diff, 0); else @@ -805,7 +805,7 @@ void doBlurRgb(TRasterPT &dstRas, TRasterPT &srcRas, double blur, int dx, BlurPixel

*row2, *col1, *fbuffer; TRasterGR8P r1; -#ifdef WIN32 +#ifdef _WIN32 if (useSSE) { fbuffer = (BlurPixel

*)_aligned_malloc(llx * ly * sizeof(BlurPixel

), 16); row1 = (T *)_aligned_malloc((llx + 2 * brad) * sizeof(T), 16); @@ -853,7 +853,7 @@ void doBlurRgb(TRasterPT &dstRas, TRasterPT &srcRas, double blur, int dx, dstRas->clear(); } -#ifdef WIN32 +#ifdef _WIN32 if (useSSE) { _aligned_free(col2); _aligned_free(col1); diff --git a/toonz/sources/common/trop/toperators.cpp b/toonz/sources/common/trop/toperators.cpp index 4ef1fc8..384843c 100644 --- a/toonz/sources/common/trop/toperators.cpp +++ b/toonz/sources/common/trop/toperators.cpp @@ -4,7 +4,7 @@ #include "tpixel.h" #include "tpixelutils.h" -#ifdef WIN32 +#ifdef _WIN32 #include // per SSE2 #endif diff --git a/toonz/sources/common/trop/tover.cpp b/toonz/sources/common/trop/tover.cpp index 7346382..41dfb12 100644 --- a/toonz/sources/common/trop/tover.cpp +++ b/toonz/sources/common/trop/tover.cpp @@ -7,7 +7,7 @@ #include "tropcm.h" #include "tpalette.h" -#ifdef WIN32 +#ifdef _WIN32 #include // per SSE2 #endif @@ -171,7 +171,7 @@ void do_overT2(TRasterPT rout, const TRasterPT &rup) //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 void do_over_SSE2(TRaster32P rout, const TRaster32P &rup) { @@ -345,7 +345,7 @@ void TRop::over(const TRasterP &rout, const TRasterP &rup, const TPoint &pos) // TRaster64P rout64 = rout, rin64 = rin; if (rout32 && rup32) { -#ifdef WIN32 +#ifdef _WIN32 if (TSystem::getCPUExtensions() & TSystem::CpuSupportsSse2) do_over_SSE2(rout32, rup32); else diff --git a/toonz/sources/common/trop/tresample.cpp b/toonz/sources/common/trop/tresample.cpp index 3051bab..c570ea2 100644 --- a/toonz/sources/common/trop/tresample.cpp +++ b/toonz/sources/common/trop/tresample.cpp @@ -18,7 +18,7 @@ using namespace TConsts; -#ifdef WIN32 +#ifdef _WIN32 #include // per SSE2 #endif @@ -841,7 +841,7 @@ inline void calcValueNoCalc(UINT &calc_value){ //#define PIXVAL_EQ PIXVAL_EQ_EQUAL template -#ifdef WIN32 +#ifdef _WIN32 __forceinline #endif void @@ -1511,7 +1511,7 @@ void resample_main_rgbm(TRasterPT rout, const TRasterPT &rin, //--------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 namespace { @@ -1808,7 +1808,7 @@ void inline blendBySSE2(__m128 &pix_out_packed, } // namespace -#endif // WIN32 +#endif // _WIN32 //--------------------------------------------------------------------------- static void get_prow_gr8(const TRasterGR8P &rin, @@ -2747,7 +2747,7 @@ void rop_resample_rgbm(TRasterPT rout, const TRasterPT &rin, } } -#ifdef WIN32 +#ifdef _WIN32 if ((TSystem::getCPUExtensions() & TSystem::CpuSupportsSse2) && T::maxChannelValue == 255) resample_main_rgbm_SSE2(rout, rin, aff_xy2uv, aff0_uv2fg, min_pix_ref_u, min_pix_ref_v, @@ -3651,7 +3651,7 @@ void do_resample(TRasterCM32P rout, const TRasterCM32P &rin, const TAffine &aff) //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template void resample_main_cm32_rgbm_SSE2(TRasterPT rout, const TRasterCM32P &rin, const TAffine &aff_xy2uv, @@ -5082,7 +5082,7 @@ void rop_resample_rgbm_2(TRasterPT rout, const TRasterCM32P &rin, } } -#ifdef WIN32 +#ifdef _WIN32 TRaster32P rout32 = rout; if ((TSystem::getCPUExtensions() & TSystem::CpuSupportsSse2) && rout32) resample_main_cm32_rgbm_SSE2(rout32, rin, aff_xy2uv, aff0_uv2fg, diff --git a/toonz/sources/common/trop/tropcm.cpp b/toonz/sources/common/trop/tropcm.cpp index 8cfc930..f7c6911 100644 --- a/toonz/sources/common/trop/tropcm.cpp +++ b/toonz/sources/common/trop/tropcm.cpp @@ -22,7 +22,7 @@ extern "C" { #include "toonz4.6/raster.h" } -#ifdef WIN32 +#ifdef _WIN32 #define USE_SSE2 #endif @@ -78,7 +78,7 @@ void TRop::convert(const TRaster32P &rasOut, rasOut->lock(); rasIn->lock(); -#ifdef WIN32 +#ifdef _WIN32 if (TSystem::getCPUExtensions() & TSystem::CpuSupportsSse2) { __m128i zeros = _mm_setzero_si128(); TPixelFloat *paints = (TPixelFloat *)_aligned_malloc(count2 * sizeof(TPixelFloat), 16); @@ -171,7 +171,7 @@ void TRop::convert(const TRaster32P &rasOut, _aligned_free(inks); } else // SSE2 not supported -#endif // WIN32 +#endif // _WIN32 { std::vector paints(count2, TPixel32(255, 0, 0)); diff --git a/toonz/sources/common/tsystem/cpuextensions.cpp b/toonz/sources/common/tsystem/cpuextensions.cpp index 5920ef4..8423513 100644 --- a/toonz/sources/common/tsystem/cpuextensions.cpp +++ b/toonz/sources/common/tsystem/cpuextensions.cpp @@ -1,7 +1,7 @@ #include "tsystem.h" -#ifdef WIN32 +#ifdef _WIN32 #include #include #include @@ -16,7 +16,7 @@ long TSystem::getCPUExtensions() } #else -#ifndef WIN32 +#ifndef _WIN32 long TSystem::getCPUExtensions() { return TSystem::CPUExtensionsNone; @@ -29,7 +29,7 @@ long CPUExtensionsAvailable = TSystem::CPUExtensionsNone; bool CPUExtensionsEnabled = true; bool FistTime = true; -//#ifdef WIN32 +//#ifdef _WIN32 //------------------------------------------------------------------------------ diff --git a/toonz/sources/common/tsystem/tfilepath.cpp b/toonz/sources/common/tsystem/tfilepath.cpp index ff579d0..df7705b 100644 --- a/toonz/sources/common/tsystem/tfilepath.cpp +++ b/toonz/sources/common/tsystem/tfilepath.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 //#define UNICODE // per le funzioni di conversione da/a UNC #include #include @@ -128,7 +128,7 @@ bool isUncName = false; pos=2; if(path.length()==2 || !isSlash(path[pos])) m_path.append(1,slash); } -#ifdef WIN32 +#ifdef _WIN32 else //se si tratta di un path in formato UNC e' del tipo "\\\\MachineName" //RICONTROLLARE! SE SI HA IP ADDRESS FALLIVA! if (path.length() >= 3 && path[0] == '\\' && path[1] == '\\' && (isalpha(path[2]) || isdigit(path[2])) ) @@ -287,7 +287,7 @@ TFilePath::TFilePath(const QString &path) bool TFilePath::operator==(const TFilePath &fp) const { -#ifdef WIN32 +#ifdef _WIN32 return _wcsicmp(m_path.c_str(), fp.m_path.c_str()) == 0; #else return m_path == fp.m_path; @@ -304,7 +304,7 @@ bool TFilePath::operator<(const TFilePath &fp) const int i2 = m_path.find(L"\\"); int j2 = fp.m_path.find(L"\\"); if (i2 == j2 && j2 == -1) -#ifdef WIN32 +#ifdef _WIN32 return _wcsicmp(m_path.c_str(), fp.m_path.c_str()) < 0; #else return m_path < fp.m_path; @@ -323,7 +323,7 @@ bool TFilePath::operator<(const TFilePath &fp) const jName = (j2 != -1) ? fp.m_path.substr(j1, j2 - j1) : fp.m_path; //se le due parti di path, conpresi tra slash sono uguali //itero il processo di confronto altrimenti ritorno -#ifdef WIN32 +#ifdef _WIN32 char differ; differ = _wcsicmp(iName.c_str(), jName.c_str()); if (differ != 0) @@ -340,7 +340,7 @@ bool TFilePath::operator<(const TFilePath &fp) const iName = m_path.substr(i1, m_path.size() - i1); jName = fp.m_path.substr(j1, fp.m_path.size() - j1); -#ifdef WIN32 +#ifdef _WIN32 return _wcsicmp(iName.c_str(), jName.c_str()) < 0; #else return TFilePath(iName) < TFilePath(jName); diff --git a/toonz/sources/common/tsystem/tfilepath_io.cpp b/toonz/sources/common/tsystem/tfilepath_io.cpp index d6ff84d..7a5c410 100644 --- a/toonz/sources/common/tsystem/tfilepath_io.cpp +++ b/toonz/sources/common/tsystem/tfilepath_io.cpp @@ -11,7 +11,7 @@ #include using namespace std; -#ifdef WIN32 +#ifdef _WIN32 #include #include diff --git a/toonz/sources/common/tsystem/tpluginmanager.cpp b/toonz/sources/common/tsystem/tpluginmanager.cpp index 0e002aa..b30f191 100644 --- a/toonz/sources/common/tsystem/tpluginmanager.cpp +++ b/toonz/sources/common/tsystem/tpluginmanager.cpp @@ -5,7 +5,7 @@ #include "tconvert.h" #include "tlogger.h" -#ifdef WIN32 +#ifdef _WIN32 #include #else @@ -34,7 +34,7 @@ class TPluginManager::Plugin { public: -#ifdef WIN32 +#ifdef _WIN32 typedef HINSTANCE Handle; #else typedef void *Handle; @@ -65,7 +65,7 @@ typedef const TPluginInfo *TnzLibMainProcType(); namespace { const char *TnzLibMainProcName = "TLibMain"; -#if !defined(WIN32) +#if !defined(_WIN32) const char *TnzLibMainProcName2 = "_TLibMain"; #endif } @@ -107,7 +107,7 @@ void TPluginManager::unloadPlugins() it != m_pluginTable.end(); ++it) { Plugin::Handle handle = (*it)->getHandle(); #ifndef LINUX -#ifdef WIN32 +#ifdef _WIN32 FreeLibrary(handle); #else dlclose(handle); @@ -133,7 +133,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp) } TLogger::debug() << "Loading " << fp; -#ifdef WIN32 +#ifdef _WIN32 Plugin::Handle handle = LoadLibraryW(fp.getWideString().c_str()); #else wstring str_fp = fp.getWideString(); @@ -142,7 +142,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp) if (!handle) { // non riesce a caricare la libreria; TLogger::warning() << "Unable to load " << fp; -#ifdef WIN32 +#ifdef _WIN32 wstring getFormattedMessage(DWORD lastError); TLogger::warning() << toString(getFormattedMessage(GetLastError())); #else @@ -154,7 +154,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp) m_pluginTable.push_back(plugin); //cout << "loaded" << endl; TnzLibMainProcType *tnzLibMain = 0; -#ifdef WIN32 +#ifdef _WIN32 tnzLibMain = (TnzLibMainProcType *) GetProcAddress(handle, TnzLibMainProcName); #else @@ -168,7 +168,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp) // La libreria non esporta TLibMain; TLogger::warning() << "Corrupted " << fp; -#ifdef WIN32 +#ifdef _WIN32 FreeLibrary(handle); #else dlclose(handle); @@ -185,7 +185,7 @@ void TPluginManager::loadPlugin(const TFilePath &fp) void TPluginManager::loadPlugins(const TFilePath &dir) { -#if defined(WIN32) +#if defined(_WIN32) const string extension = "dll"; #elif defined(LINUX) || defined(__sgi) const string extension = "so"; @@ -204,7 +204,7 @@ void TPluginManager::loadPlugins(const TFilePath &dir) continue; wstring fullpath = fp.getWideString(); -#ifdef WIN32 +#ifdef _WIN32 bool isDebugLibrary = (fullpath.find(L".d.") == fullpath.size() - (extension.size() + 3)); diff --git a/toonz/sources/common/tsystem/tsystem.cpp b/toonz/sources/common/tsystem/tsystem.cpp index 1ceb34f..019687e 100644 --- a/toonz/sources/common/tsystem/tsystem.cpp +++ b/toonz/sources/common/tsystem/tsystem.cpp @@ -23,7 +23,7 @@ using namespace std; #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #include #include @@ -165,7 +165,7 @@ QString TSystem::getUserName() for (j = 0; j < list.size(); j++) { QString value = list.at(j); QString user; -#ifdef WIN32 +#ifdef _WIN32 if (value.startsWith("USERNAME=")) user = value.right(value.size() - 9); #else @@ -364,7 +364,7 @@ else */ //------------------------------------------------------------ /* -#ifdef WIN32 +#ifdef _WIN32 wstring getFormattedMessage(DWORD lastError) { @@ -446,7 +446,7 @@ void TSystem::deleteFile(const TFilePath &fp) void TSystem::hideFile(const TFilePath &fp) { -#ifdef WIN32 +#ifdef _WIN32 if (!SetFileAttributesW(fp.getWideString().c_str(), FILE_ATTRIBUTE_HIDDEN)) throw TSystemException(fp, "can't hide file!"); #else // MACOSX, and others @@ -931,7 +931,7 @@ bool TSystem::touchParentDir(const TFilePath &fp) bool TSystem::showDocument(const TFilePath &path) { -#ifdef WIN32 +#ifdef _WIN32 int ret = (int) ShellExecuteW(0, L"open", path.getWideString().c_str(), 0, 0, SW_SHOWNORMAL); if (ret <= 32) { diff --git a/toonz/sources/common/tsystem/tsystempd.cpp b/toonz/sources/common/tsystem/tsystempd.cpp index f1db615..16b77c5 100644 --- a/toonz/sources/common/tsystem/tsystempd.cpp +++ b/toonz/sources/common/tsystem/tsystempd.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #ifndef UNICODE #define UNICODE #endif @@ -21,7 +21,7 @@ #undef PLATFORM -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #define PLATFORM WIN32 #include @@ -102,7 +102,7 @@ PLATFORM_NOT_SUPPORTED using namespace std; -#ifdef WIN32 +#ifdef _WIN32 wstring getFormattedMessage(DWORD lastError) { @@ -138,7 +138,7 @@ wstring getFormattedMessage(DWORD lastError) void TSystem::outputDebug(string s) { #ifdef TNZCORE_LIGHT -#ifdef WIN32 +#ifdef _WIN32 OutputDebugString((LPCWSTR)s.c_str()); #else cerr << s << endl; @@ -159,7 +159,7 @@ int TSystem::getProcessId() bool TSystem::memoryShortage() { -#ifdef WIN32 +#ifdef _WIN32 MEMORYSTATUSEX memStatus; memStatus.dwLength = sizeof(MEMORYSTATUSEX); @@ -205,7 +205,7 @@ TINT64 TSystem::getFreeMemorySize(bool onlyPhisicalMemory) TINT64 totalFree = 0; -#ifdef WIN32 +#ifdef _WIN32 MEMORYSTATUSEX buff; buff.dwLength = sizeof(MEMORYSTATUSEX); @@ -263,7 +263,7 @@ TINT64 TSystem::getFreeMemorySize(bool onlyPhisicalMemory) @ @ @ERROR : PLATFORM NOT SUPPORTED #endif -#ifndef WIN32 +#ifndef _WIN32 #else #endif @@ -287,7 +287,7 @@ TINT64 TSystem::getDiskSize(const TFilePath &diskName) assert(0); return 0; } -#ifndef WIN32 +#ifndef _WIN32 struct statfs buf; wstring str_diskname = diskName.getWideString(); #ifdef __sgi @@ -327,7 +327,7 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName) assert(0); return 0; } -#ifndef WIN32 +#ifndef _WIN32 struct statfs buf; wstring str_diskname = diskName.getWideString(); #ifdef __sgi @@ -361,7 +361,7 @@ TINT64 TSystem::getFreeDiskSize(const TFilePath &diskName) TINT64 TSystem::getMemorySize(bool onlyPhisicalMemory) { -#ifdef WIN32 +#ifdef _WIN32 MEMORYSTATUS buff; GlobalMemoryStatus(&buff); @@ -400,7 +400,7 @@ TINT64 TSystem::getMemorySize(bool onlyPhisicalMemory) @ @ @ERROR : PLATFORM NOT SUPPORTED #endif -#ifndef WIN32 +#ifndef _WIN32 #else #endif } @@ -409,7 +409,7 @@ TINT64 TSystem::getMemorySize(bool onlyPhisicalMemory) void TSystem::moveFileToRecycleBin(const TFilePath &fp) { -#if defined(WIN32) +#if defined(_WIN32) // // from http://msdn.microsoft.com/msdnmag/issues/01/04/c/default.aspx // @@ -497,7 +497,7 @@ TString TSystemException::getMessage() const DEFAULT: msg = L": Unknown error"; -#ifndef WIN32 +#ifndef _WIN32 CASE ELOOP : msg = L": Too many symbolic links were encountered in translating path."; #ifndef MACOSX CASE EMULTIHOP : msg = L": Components of path require hopping to multiple remote machines and the file system does not allow it."; diff --git a/toonz/sources/common/tsystem/uncpath.cpp b/toonz/sources/common/tsystem/uncpath.cpp index fb1205d..92ed0ac 100644 --- a/toonz/sources/common/tsystem/uncpath.cpp +++ b/toonz/sources/common/tsystem/uncpath.cpp @@ -3,7 +3,7 @@ #include "tsystem.h" #include "tconvert.h" -#ifdef WIN32 +#ifdef _WIN32 #define UNICODE // per le funzioni di conversione da/a UNC #include #include @@ -22,7 +22,7 @@ bool TSystem::isUNC(const TFilePath &path) TFilePath TSystem::toUNC(const TFilePath &fp) { -#ifdef WIN32 +#ifdef _WIN32 if (QString::fromStdWString(fp.getWideString()).startsWith('+')) return fp; if (isUNC(fp)) @@ -146,7 +146,7 @@ TFilePath TSystem::toUNC(const TFilePath &fp) TFilePath TSystem::toLocalPath(const TFilePath &fp) { -#ifdef WIN32 +#ifdef _WIN32 if (!isUNC(fp)) return TFilePath(fp); diff --git a/toonz/sources/common/ttest/ttest.cpp b/toonz/sources/common/ttest/ttest.cpp index 568bf80..dba0d64 100644 --- a/toonz/sources/common/ttest/ttest.cpp +++ b/toonz/sources/common/ttest/ttest.cpp @@ -213,7 +213,7 @@ TFilePath getTestFile(string name) TFilePath testFile; TFilePath parentDir = TSystem::getBinDir().getParentDir(); -#ifndef WIN32 +#ifndef _WIN32 parentDir = parentDir.getParentDir(); #endif diff --git a/toonz/sources/common/tvectorimage/tl2lautocloser.cpp b/toonz/sources/common/tvectorimage/tl2lautocloser.cpp index f91ee2b..4c285c6 100644 --- a/toonz/sources/common/tvectorimage/tl2lautocloser.cpp +++ b/toonz/sources/common/tvectorimage/tl2lautocloser.cpp @@ -10,7 +10,7 @@ #include //============================================================================= -#ifdef WIN32 +#ifdef _WIN32 class MyTimer { @@ -393,7 +393,7 @@ void TL2LAutocloser::Imp::search( if (strokea == 0 || strokeb == 0) return; /* -#ifdef WIN32 +#ifdef _WIN32 MyTimer timer; qDebug() << "search started"; timer.start(); @@ -511,7 +511,7 @@ void TL2LAutocloser::Imp::search( segments.push_back(segment); } /* -#ifdef WIN32 +#ifdef _WIN32 double elapsed = timer.elapsedSeconds(); qDebug() << "search completed. time=" << elapsed << "s"; #endif diff --git a/toonz/sources/common/tvectorimage/tl2lautocloser.h b/toonz/sources/common/tvectorimage/tl2lautocloser.h index 2a4cbbd..39f22ca 100644 --- a/toonz/sources/common/tvectorimage/tl2lautocloser.h +++ b/toonz/sources/common/tvectorimage/tl2lautocloser.h @@ -15,7 +15,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/common/tvectorimage/tsegmentadjuster.h b/toonz/sources/common/tvectorimage/tsegmentadjuster.h index c0f21f1..8e0149c 100644 --- a/toonz/sources/common/tvectorimage/tsegmentadjuster.h +++ b/toonz/sources/common/tvectorimage/tsegmentadjuster.h @@ -16,7 +16,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/common/tvectorimage/tsweepboundary.cpp b/toonz/sources/common/tvectorimage/tsweepboundary.cpp index 03da58d..cb96328 100644 --- a/toonz/sources/common/tvectorimage/tsweepboundary.cpp +++ b/toonz/sources/common/tvectorimage/tsweepboundary.cpp @@ -12,7 +12,7 @@ //#include "drawutil.h" #include "tvectorimage.h" -#ifdef WIN32 +#ifdef _WIN32 #include #include #endif @@ -317,7 +317,7 @@ void removeFalseHoles(const vector &strokes); inline void TraceLinkedQuadraticList(LinkedQuadraticList &quadraticList) { -#ifdef WIN32 +#ifdef _WIN32 _RPT0(_CRT_WARN, "\n__________________________________________________\n"); LinkedQuadraticList::iterator it = quadraticList.begin(); diff --git a/toonz/sources/common/tvrender/qtofflinegl.cpp b/toonz/sources/common/tvrender/qtofflinegl.cpp index 4c4c4ff..60fbece 100644 --- a/toonz/sources/common/tvrender/qtofflinegl.cpp +++ b/toonz/sources/common/tvrender/qtofflinegl.cpp @@ -6,7 +6,7 @@ //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 void swapRedBlueChannels(void *buffer, int bufferSize) // Flips The Red And Blue Bytes (WidthxHeight) { @@ -127,7 +127,7 @@ void QtOfflineGL::createContext(TDimension rasterSize, std::shared_ptr &_v, const TStroke // DisplayListManager definition //************************************************************************************* -#ifdef WIN32 +#ifdef _WIN32 namespace { @@ -292,7 +292,7 @@ public: } // namespace -#endif // WIN32 +#endif // _WIN32 //************************************************************************************* // TSimpleStrokeStyle implementation @@ -1460,7 +1460,7 @@ void TVectorImagePatternStrokeStyle::computeTransformations(vector &tra void TVectorImagePatternStrokeStyle::clearGlDisplayLists() { -#ifdef WIN32 +#ifdef _WIN32 DisplayListManager *pmgr = DisplayListManager::instance(); assert(pmgr); pmgr->clearLists(); @@ -1590,7 +1590,7 @@ void TVectorImagePatternStrokeStyle::drawStroke(const TVectorRenderData &rd, con tglMultMatrix(totalTransformation); CHECK_GL_ERROR -#ifdef WIN32 +#ifdef _WIN32 GLuint listId = DisplayListManager::instance()->getDisplayListId(imgPointer, m_name, fid, rd); if (listId != 0) { diff --git a/toonz/sources/common/tvrender/ttessellator.cpp b/toonz/sources/common/tvrender/ttessellator.cpp index ab48aae..d91ada3 100644 --- a/toonz/sources/common/tvrender/ttessellator.cpp +++ b/toonz/sources/common/tvrender/ttessellator.cpp @@ -12,7 +12,7 @@ //#include "tlevel_io.h" -#ifndef WIN32 +#ifndef _WIN32 #define CALLBACK #endif // To avoid linking problems with HP ZX2000 @@ -93,7 +93,7 @@ extern "C" void CALLBACK myCombine(GLdouble coords[3], GLdouble *d[4], //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 typedef GLvoid(CALLBACK *GluCallback)(void); #endif diff --git a/toonz/sources/common/twain/ttwain.h b/toonz/sources/common/twain/ttwain.h index b1ba6b8..5e5c983 100644 --- a/toonz/sources/common/twain/ttwain.h +++ b/toonz/sources/common/twain/ttwain.h @@ -3,7 +3,7 @@ #ifndef __TTWAIN_H__ #define __TTWAIN_H__ -#ifdef WIN32 +#ifdef _WIN32 #include #else #ifndef _UNIX_ diff --git a/toonz/sources/common/twain/ttwainP.h b/toonz/sources/common/twain/ttwainP.h index 84ff961..86e88eb 100644 --- a/toonz/sources/common/twain/ttwainP.h +++ b/toonz/sources/common/twain/ttwainP.h @@ -25,7 +25,7 @@ typedef enum TWAINSTATE { TWAIN_TRANSFERRING /* image in transit */ } TWAINSTATE; -#ifdef WIN32 +#ifdef _WIN32 #ifdef x64 #define DSM_FILENAME "TWAINDSM.DLL" #else diff --git a/toonz/sources/common/twain/ttwain_error.c b/toonz/sources/common/twain/ttwain_error.c index 2df522d..0b2860b 100644 --- a/toonz/sources/common/twain/ttwain_error.c +++ b/toonz/sources/common/twain/ttwain_error.c @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif @@ -128,7 +128,7 @@ void TTWAIN_RecordError(void) } if (TTwainData.ErrRC == TWRC_FAILURE && TTwainData.ErrCC == TWCC_OPERATIONERROR) { -#ifdef WIN32 +#ifdef _WIN32 OutputDebugString(Msg_out); #else #ifdef TOONZDEBUG diff --git a/toonz/sources/common/twain/ttwain_global_def.h b/toonz/sources/common/twain/ttwain_global_def.h index c0a740d..994d46e 100644 --- a/toonz/sources/common/twain/ttwain_global_def.h +++ b/toonz/sources/common/twain/ttwain_global_def.h @@ -3,7 +3,7 @@ /*max@home*/ #ifndef __GLOBAL_DEF_H__ #define __GLOBAL_DEF_H__ -#ifdef WIN32 +#ifdef _WIN32 #define GLOBAL_LOCK(P) GlobalLock(P) #define GLOBAL_ALLOC(T, S) GlobalAlloc(T, S) #define GLOBAL_FREE(P) GlobalFree(P) diff --git a/toonz/sources/common/twain/ttwain_state.c b/toonz/sources/common/twain/ttwain_state.c index a0c360e..28db069 100644 --- a/toonz/sources/common/twain/ttwain_state.c +++ b/toonz/sources/common/twain/ttwain_state.c @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif @@ -203,7 +203,7 @@ int TTWAIN_MessageHook(void *lpmsg) //printf("%s\n", __PRETTY_FUNCTION__); if (TTWAIN_GetState() >= TWAIN_SOURCE_ENABLED) { /* source enabled */ -#ifdef WIN32 +#ifdef _WIN32 TW_EVENT twEvent; twEvent.pEvent = (TW_MEMREF)lpmsg; twEvent.TWMessage = MSG_NULL; @@ -639,7 +639,7 @@ void *TTWAIN_AcquireNative(void *hwnd) return hnative; } /*---------------------------------------------------------------------------*/ -#ifdef WIN32 +#ifdef _WIN32 typedef void(MyFun)(HWND); diff --git a/toonz/sources/common/twain/ttwain_util.c b/toonz/sources/common/twain/ttwain_util.c index d639227..af691b2 100644 --- a/toonz/sources/common/twain/ttwain_util.c +++ b/toonz/sources/common/twain/ttwain_util.c @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif @@ -782,7 +782,7 @@ l'immagine) if (!handle) return TRUE; /*non sono semplicamente riuscito a prendere info riguardo il pixelFlavor, ma setPixelType e' andato a buon fine */ -#ifdef WIN32 +#ifdef _WIN32 container = (TW_ENUMERATION *)handle; #else container = (TW_ENUMERATION *)GLOBAL_LOCK(handle); diff --git a/toonz/sources/common/twain/twain.h b/toonz/sources/common/twain/twain.h index 84ae0a1..771fdf2 100644 --- a/toonz/sources/common/twain/twain.h +++ b/toonz/sources/common/twain/twain.h @@ -103,11 +103,11 @@ #endif /* Microsoft C/C++ Compiler */ -#if defined(WIN32) || defined(WIN64) || defined(_WINDOWS) +#if defined(_WIN32) || defined(WIN64) || defined(_WINDOWS) #define TWH_CMP_MSC #if defined(_WIN64) || defined(WIN64) #define TWH_64BIT -#elif defined(WIN32) || defined(_WIN32) +#elif defined(_WIN32) || defined(_WIN32) #define TWH_32BIT #endif @@ -1844,7 +1844,7 @@ typedef struct { * Depreciated Items * ****************************************************************************/ #ifdef _MSWIN_ -#if defined(WIN32) || defined(WIN64) +#if defined(_WIN32) || defined(WIN64) #define TW_HUGE #elif !defined(TWH_CMP_GNU) #define TW_HUGE huge diff --git a/toonz/sources/image/avi/tiio_avi.cpp b/toonz/sources/image/avi/tiio_avi.cpp index cf85215..9fae64e 100644 --- a/toonz/sources/image/avi/tiio_avi.cpp +++ b/toonz/sources/image/avi/tiio_avi.cpp @@ -156,7 +156,7 @@ private: // //=========================================================== -#ifdef WIN32 +#ifdef _WIN32 TLevelWriterAvi::TLevelWriterAvi(const TFilePath &path, TPropertyGroup *winfo) : TLevelWriter(path, winfo), m_aviFile(0), m_videoStream(0), m_audioStream(0), m_bitmapinfo(0), m_outputFmt(0), m_hic(0), m_initDone(false), IOError(0), m_st(0), m_bpp(32), m_maxDataSize(0), m_buffer(0), m_firstframe(-1) @@ -647,10 +647,10 @@ private: // //=========================================================== -#ifdef WIN32 +#ifdef _WIN32 TLevelReaderAvi::TLevelReaderAvi(const TFilePath &path) : TLevelReader(path) -#ifdef WIN32 +#ifdef _WIN32 , m_srcBitmapInfo(0), m_dstBitmapInfo(0), m_hic(0), IOError(0), m_prevFrame(-1), m_decompressedBuffer(0) #endif @@ -1035,7 +1035,7 @@ TImageP TLevelReaderAvi::load(int frameIndex) // //=========================================================== -#ifdef WIN32 +#ifdef _WIN32 Tiio::AviWriterProperties::AviWriterProperties() : m_codec("Codec") { diff --git a/toonz/sources/image/avi/tiio_avi.h b/toonz/sources/image/avi/tiio_avi.h index 0b7ebf8..d69c3a3 100644 --- a/toonz/sources/image/avi/tiio_avi.h +++ b/toonz/sources/image/avi/tiio_avi.h @@ -3,7 +3,7 @@ #ifndef TIIO_AVI_H #define TIIO_AVI_H -#ifdef WIN32 +#ifdef _WIN32 #include #include #endif @@ -33,7 +33,7 @@ public: private: TThread::Mutex m_mutex; -#ifdef WIN32 +#ifdef _WIN32 PAVIFILE m_aviFile; PAVISTREAM m_videoStream; PAVISTREAM m_audioStream; @@ -53,7 +53,7 @@ private: void doSaveSoundTrack(); void searchForCodec(); -#ifdef WIN32 +#ifdef _WIN32 int compressFrame(BITMAPINFOHEADER *outHeader, void **bufferOut, int frameIndex, DWORD flagsIn, DWORD &flagsOut); #endif @@ -80,7 +80,7 @@ public: TThread::Mutex m_mutex; void *m_decompressedBuffer; -#ifdef WIN32 +#ifdef _WIN32 private: PAVISTREAM m_videoStream; BITMAPINFO *m_srcBitmapInfo, *m_dstBitmapInfo; diff --git a/toonz/sources/image/compatibility/tfile_io.c b/toonz/sources/image/compatibility/tfile_io.c index 1995573..11c0cb5 100644 --- a/toonz/sources/image/compatibility/tfile_io.c +++ b/toonz/sources/image/compatibility/tfile_io.c @@ -2,7 +2,7 @@ #include "tfile_io.h" -#ifdef WIN32 +#ifdef _WIN32 #include #include diff --git a/toonz/sources/image/compatibility/tnz4.h b/toonz/sources/image/compatibility/tnz4.h index 52ef231..d84950c 100644 --- a/toonz/sources/image/compatibility/tnz4.h +++ b/toonz/sources/image/compatibility/tnz4.h @@ -32,7 +32,7 @@ TNZ_LITTLE_ENDIAN undefined !! #define TBOOL int typedef struct LPIXEL { -#ifdef WIN32 +#ifdef _WIN32 unsigned char b, g, r, m; #elif defined(__sgi) unsigned char m, b, g, r; @@ -46,7 +46,7 @@ TNZ_LITTLE_ENDIAN undefined !! } LPIXEL; typedef struct SPIXEL { -#ifdef WIN32 +#ifdef _WIN32 unsigned short b, g, r, m; #elif defined(__sgi) unsigned short m, b, g, r; @@ -121,7 +121,7 @@ typedef struct IMAGE { #define CROP(X, MIN, MAX) (X < MIN ? MIN : (X > MAX ? MAX : X)) -#ifdef WIN32 +#ifdef _WIN32 #define LPIXEL_TO_BGRM(X) (X) #else #if TNZ_LITTLE_ENDIAN diff --git a/toonz/sources/image/compatibility/tnz4_cpp.cpp b/toonz/sources/image/compatibility/tnz4_cpp.cpp index c701a73..6c083b9 100644 --- a/toonz/sources/image/compatibility/tnz4_cpp.cpp +++ b/toonz/sources/image/compatibility/tnz4_cpp.cpp @@ -7,7 +7,7 @@ extern "C" { #include #include #include -#ifndef WIN32 +#ifndef _WIN32 #include #endif diff --git a/toonz/sources/image/mov/tiio_movW.cpp b/toonz/sources/image/mov/tiio_movW.cpp index 4e748c7..f41e612 100644 --- a/toonz/sources/image/mov/tiio_movW.cpp +++ b/toonz/sources/image/mov/tiio_movW.cpp @@ -326,7 +326,7 @@ Tiio::TifWriterProperties::TifWriterProperties() { m_byteOrdering.addValue(L"IBM PC"); m_byteOrdering.addValue(L"Mac"); -#ifdef WIN32 +#ifdef _WIN32 m_byteOrdering.setValue(L"IBM PC"); #else m_byteOrdering.setValue(L"Mac"); diff --git a/toonz/sources/image/pli/pli_io.cpp b/toonz/sources/image/pli/pli_io.cpp index 3184d72..c774fc9 100644 --- a/toonz/sources/image/pli/pli_io.cpp +++ b/toonz/sources/image/pli/pli_io.cpp @@ -19,7 +19,7 @@ #if defined(MACOSX) #include -#elif defined(WIN32) +#elif defined(_WIN32) #include #endif @@ -304,7 +304,7 @@ UINT TStyleParam::getSize() /*=====================================================================*/ -#ifdef WIN32 +#ifdef _WIN32 #define CHECK_FOR_READ_ERROR(filePath) #else #define CHECK_FOR_READ_ERROR(filePath) \ @@ -545,7 +545,7 @@ ParsedPliImp::ParsedPliImp(const TFilePath &filename, bool readInfo) // cerr< -#ifdef WIN32 +#ifdef _WIN32 #include #include #else @@ -291,7 +291,7 @@ static IMAGERGB *iopen(int fd, OpenMode openMode, tablesize = image->ysize * image->zsize * (int)sizeof(TINT32); lseek(f, 512L, 0); if (read(f, image->rowstart, tablesize) != tablesize) { -#ifdef WIN32 +#ifdef _WIN32 DWORD error; error = GetLastError(); #endif @@ -302,7 +302,7 @@ static IMAGERGB *iopen(int fd, OpenMode openMode, if (image->dorev) cvtTINT32s(image->rowstart, tablesize); if (read(f, image->rowsize, tablesize) != tablesize) { -#ifdef WIN32 +#ifdef _WIN32 DWORD error; error = GetLastError(); #endif diff --git a/toonz/sources/image/tif/tiio_tif.cpp b/toonz/sources/image/tif/tiio_tif.cpp index 2864e59..1a7cbf5 100644 --- a/toonz/sources/image/tif/tiio_tif.cpp +++ b/toonz/sources/image/tif/tiio_tif.cpp @@ -25,7 +25,7 @@ extern "C" { #include "tiio_tif.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include "windows.h" #endif @@ -658,7 +658,7 @@ Tiio::TifWriterProperties::TifWriterProperties() { m_byteOrdering.addValue(L"IBM PC"); m_byteOrdering.addValue(L"Mac"); -#ifdef WIN32 +#ifdef _WIN32 m_byteOrdering.setValue(L"IBM PC"); #else m_byteOrdering.setValue(L"Mac"); diff --git a/toonz/sources/image/tiio.cpp b/toonz/sources/image/tiio.cpp index fd4a893..4507a63 100644 --- a/toonz/sources/image/tiio.cpp +++ b/toonz/sources/image/tiio.cpp @@ -17,7 +17,7 @@ #include //Platform-specific includes -#ifdef WIN32 +#ifdef _WIN32 #ifndef x64 #define float_t Float_t @@ -153,14 +153,14 @@ void initImageIo(bool lightVersion) if (!lightVersion) { -#ifdef WIN32 +#ifdef _WIN32 TLevelWriter::define("avi", TLevelWriterAvi::create, true); TLevelReader::define("avi", TLevelReaderAvi::create); TFileType::declare("avi", TFileType::RASTER_LEVEL); Tiio::defineWriterProperties("avi", new Tiio::AviWriterProperties()); -#endif // WIN32 +#endif // _WIN32 if (IsQuickTimeInstalled()) { TLevelWriter::define("mov", TLevelWriterMov::create, true); @@ -175,7 +175,7 @@ void initImageIo(bool lightVersion) } /* -#if (defined(WIN32) && !defined(x64)) +#if (defined(_WIN32) && !defined(x64)) TLevelWriter::define("pct", TLevelWriterPicPct::create, true); TLevelReader::define("pct", TLevelReaderPicPct::create); @@ -190,7 +190,7 @@ void initImageIo(bool lightVersion) TFileType::declare("pict", TFileType::RASTER_LEVEL); Tiio::defineWriterProperties("pict", new Tiio::PctWriterProperties()); -#endif // WIN32 && 32-bit +#endif // _WIN32 && 32-bit */ } } diff --git a/toonz/sources/image/tzp/avl.c b/toonz/sources/image/tzp/avl.c index f7a9304..8e4999b 100644 --- a/toonz/sources/image/tzp/avl.c +++ b/toonz/sources/image/tzp/avl.c @@ -8,7 +8,7 @@ | | *----------------------------------------------------------------------------*/ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4113) #pragma warning(disable : 4996) diff --git a/toonz/sources/image/tzp/tiio_plt.cpp b/toonz/sources/image/tzp/tiio_plt.cpp index 019631b..a10beb6 100644 --- a/toonz/sources/image/tzp/tiio_plt.cpp +++ b/toonz/sources/image/tzp/tiio_plt.cpp @@ -7,7 +7,7 @@ #include "tiffio.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include "windows.h" #endif diff --git a/toonz/sources/image/tzp/tiio_tzp.cpp b/toonz/sources/image/tzp/tiio_tzp.cpp index 80213dd..84d9c4a 100644 --- a/toonz/sources/image/tzp/tiio_tzp.cpp +++ b/toonz/sources/image/tzp/tiio_tzp.cpp @@ -11,7 +11,7 @@ //#include "tspecialstyleid.h" #include -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include "windows.h" #endif diff --git a/toonz/sources/include/ext/Potential.h b/toonz/sources/include/ext/Potential.h index 35fbb6c..d8d224e 100644 --- a/toonz/sources/include/ext/Potential.h +++ b/toonz/sources/include/ext/Potential.h @@ -25,7 +25,7 @@ class TStroke; -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) // to avoid annoying warning #pragma warning(push) #pragma warning(disable : 4290) @@ -96,7 +96,7 @@ public: }; } -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) #pragma warning(pop) #endif diff --git a/toonz/sources/include/ext/StrokeDeformation.h b/toonz/sources/include/ext/StrokeDeformation.h index d4a306b..19ac29b 100644 --- a/toonz/sources/include/ext/StrokeDeformation.h +++ b/toonz/sources/include/ext/StrokeDeformation.h @@ -30,7 +30,7 @@ class TStroke; -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) // to avoid annoying warning #pragma warning(push) #pragma warning(disable : 4251) @@ -197,7 +197,7 @@ public: }; } -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) #pragma warning(pop) #endif diff --git a/toonz/sources/include/ext/StrokeDeformationImpl.h b/toonz/sources/include/ext/StrokeDeformationImpl.h index febf72f..693c4a1 100644 --- a/toonz/sources/include/ext/StrokeDeformationImpl.h +++ b/toonz/sources/include/ext/StrokeDeformationImpl.h @@ -21,7 +21,7 @@ #include "ExtUtil.h" -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) // to avoid annoying warning #pragma warning(push) #pragma warning(disable : 4251) @@ -194,7 +194,7 @@ public: }; } -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) #pragma warning(pop) #endif diff --git a/toonz/sources/include/ext/StrokeParametricDeformer.h b/toonz/sources/include/ext/StrokeParametricDeformer.h index abd3218..b32414a 100644 --- a/toonz/sources/include/ext/StrokeParametricDeformer.h +++ b/toonz/sources/include/ext/StrokeParametricDeformer.h @@ -20,7 +20,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) // to avoid annoying warning #pragma warning(push) #pragma warning(disable : 4290) @@ -154,7 +154,7 @@ private: }; } -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) #pragma warning(pop) #endif diff --git a/toonz/sources/include/ext/Types.h b/toonz/sources/include/ext/Types.h index bd1ccfe..6a101a4 100644 --- a/toonz/sources/include/ext/Types.h +++ b/toonz/sources/include/ext/Types.h @@ -24,7 +24,7 @@ #include #include -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) // to avoid annoying warning #pragma warning(push) #pragma warning(disable : 4290) @@ -127,7 +127,7 @@ public: }; } -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) #pragma warning(pop) #endif diff --git a/toonz/sources/include/ext/plasticskeleton.h b/toonz/sources/include/ext/plasticskeleton.h index 774ce79..17fc47a 100644 --- a/toonz/sources/include/ext/plasticskeleton.h +++ b/toonz/sources/include/ext/plasticskeleton.h @@ -152,7 +152,7 @@ private: //=============================================================================== -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/ext/plasticskeletondeformation.h b/toonz/sources/include/ext/plasticskeletondeformation.h index 17dad65..5776bab 100644 --- a/toonz/sources/include/ext/plasticskeletondeformation.h +++ b/toonz/sources/include/ext/plasticskeletondeformation.h @@ -251,7 +251,7 @@ typedef PlasticSkeletonDeformation SkD; //=============================================================================== -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/movsettings.h b/toonz/sources/include/movsettings.h index a6eb7fb..b75e0e3 100644 --- a/toonz/sources/include/movsettings.h +++ b/toonz/sources/include/movsettings.h @@ -15,7 +15,7 @@ #if !(defined(x64) || defined(__LP64__)) -#ifdef WIN32 +#ifdef _WIN32 #define list List #define map Map @@ -44,7 +44,7 @@ //#include "tlevel_io.h" #include "tproperty.h" -#else //WIN32 +#else // _WIN32 #define list List #define map Map @@ -60,7 +60,7 @@ #undef iterator #undef float_t -#endif //!WIN32 +#endif // !_WIN32 void DVAPI fromPropertiesToAtoms(TPropertyGroup &pg, QTAtomContainer &atoms); void DVAPI fromAtomsToProperties(const QTAtomContainer &atoms, TPropertyGroup &pg); diff --git a/toonz/sources/include/t32bitsrv_wrap.h b/toonz/sources/include/t32bitsrv_wrap.h index 5e2a6da..d12fc10 100644 --- a/toonz/sources/include/t32bitsrv_wrap.h +++ b/toonz/sources/include/t32bitsrv_wrap.h @@ -44,7 +44,7 @@ static QString srvName() return name; } -#ifdef WIN32 +#ifdef _WIN32 static QString srvCmdline() { static QString cmd("srv/t32bitsrv.exe " + srvName()); diff --git a/toonz/sources/include/tatomicvar.h b/toonz/sources/include/tatomicvar.h index a95ca8d..9be7724 100644 --- a/toonz/sources/include/tatomicvar.h +++ b/toonz/sources/include/tatomicvar.h @@ -13,7 +13,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #include #elif defined(__sgi) #include @@ -227,7 +227,7 @@ public: long operator++() { -#ifdef WIN32 +#ifdef _WIN32 return InterlockedIncrement(&m_var); #elif defined(__sgi) return ++m_var; @@ -244,7 +244,7 @@ public: long operator+=(long value) { -#ifdef WIN32 +#ifdef _WIN32 InterlockedExchangeAdd(&m_var, value); return m_var; @@ -266,7 +266,7 @@ public: long operator--() { -#ifdef WIN32 +#ifdef _WIN32 return InterlockedDecrement(&m_var); #elif defined(__sgi) return --m_var; @@ -300,7 +300,7 @@ public: #endif }; -#ifdef WIN32 +#ifdef _WIN32 long m_var; #elif defined(__sgi) long m_var; diff --git a/toonz/sources/include/tcachedlevel.h b/toonz/sources/include/tcachedlevel.h index 992ec4f..82584af 100644 --- a/toonz/sources/include/tcachedlevel.h +++ b/toonz/sources/include/tcachedlevel.h @@ -7,7 +7,7 @@ PER ORA SI PUO' USARE LA CACHE SOLO CON WINDOWS */ -#ifdef WIN32 +#ifdef _WIN32 #include #endif @@ -292,7 +292,7 @@ private: int m_viewFrameMin, m_viewFrameMax; -#ifdef WIN32 +#ifdef _WIN32 HANDLE m_hFile, m_hMap; LPVOID m_fileMapAddress; diff --git a/toonz/sources/include/tcolorstyles.h b/toonz/sources/include/tcolorstyles.h index 2700dbc..7aa65fe 100644 --- a/toonz/sources/include/tcolorstyles.h +++ b/toonz/sources/include/tcolorstyles.h @@ -362,7 +362,7 @@ protected: //-------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif typedef TSmartPointerT TColorStyleP; diff --git a/toonz/sources/include/tcolumnset.h b/toonz/sources/include/tcolumnset.h index 534f4bb..4a8b613 100644 --- a/toonz/sources/include/tcolumnset.h +++ b/toonz/sources/include/tcolumnset.h @@ -54,7 +54,7 @@ private: //--------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/tcommon.h b/toonz/sources/include/tcommon.h index 9bd6950..134430f 100644 --- a/toonz/sources/include/tcommon.h +++ b/toonz/sources/include/tcommon.h @@ -3,7 +3,7 @@ #ifndef T_COMMON_INCLUDED #define T_COMMON_INCLUDED -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4786) #pragma warning(disable : 4251) #pragma warning(disable : 4146) @@ -137,7 +137,7 @@ typedef unsigned short USHORT; typedef short SHORT; typedef unsigned int UINT; -#ifndef WIN32 +#ifndef _WIN32 typedef unsigned char BYTE; #endif @@ -232,7 +232,7 @@ const int c_minint = ~c_maxint; const unsigned int c_maxuint = (unsigned int)(~0U); -#ifdef WIN32 +#ifdef _WIN32 #define DV_EXPORT_API __declspec(dllexport) #define DV_IMPORT_API __declspec(dllimport) #define DV_EXPORT_VAR __declspec(dllexport) @@ -244,7 +244,7 @@ const unsigned int c_maxuint = (unsigned int)(~0U); #define DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #define DV_ALIGNED(val) __declspec(align(val)) #else #define DV_ALIGNED(val) __attribute__((aligned(val))) diff --git a/toonz/sources/include/tdata.h b/toonz/sources/include/tdata.h index 9ca3980..d34d8f9 100644 --- a/toonz/sources/include/tdata.h +++ b/toonz/sources/include/tdata.h @@ -19,7 +19,7 @@ //------------------------------------------------------------------- class TData; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif @@ -55,7 +55,7 @@ public: //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4251) #endif @@ -72,7 +72,7 @@ public: TFilePath getFilePath(int i) const; }; -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif diff --git a/toonz/sources/include/tdoubleparam.h b/toonz/sources/include/tdoubleparam.h index 3cc51f6..c391709 100644 --- a/toonz/sources/include/tdoubleparam.h +++ b/toonz/sources/include/tdoubleparam.h @@ -40,7 +40,7 @@ class Grammar; class CalculatorNodeVisitor; } -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TPersistDeclarationT; #endif diff --git a/toonz/sources/include/tfarmcontroller.h b/toonz/sources/include/tfarmcontroller.h index d484673..81faf5f 100644 --- a/toonz/sources/include/tfarmcontroller.h +++ b/toonz/sources/include/tfarmcontroller.h @@ -18,7 +18,7 @@ class TFilePath; #undef TFARMAPI #endif -#ifdef WIN32 +#ifdef _WIN32 #ifdef TFARM_EXPORTS #define TFARMAPI __declspec(dllexport) #else diff --git a/toonz/sources/include/tfarmserver.h b/toonz/sources/include/tfarmserver.h index 3470f04..9e57f89 100644 --- a/toonz/sources/include/tfarmserver.h +++ b/toonz/sources/include/tfarmserver.h @@ -15,7 +15,7 @@ #undef TFARMAPI #endif -#ifdef WIN32 +#ifdef _WIN32 #ifdef TFARM_EXPORTS #define TFARMAPI __declspec(dllexport) #else diff --git a/toonz/sources/include/tfarmtask.h b/toonz/sources/include/tfarmtask.h index aa05298..26346bd 100644 --- a/toonz/sources/include/tfarmtask.h +++ b/toonz/sources/include/tfarmtask.h @@ -12,7 +12,7 @@ #undef TFARMAPI #endif -#ifdef WIN32 +#ifdef _WIN32 #ifdef TFARM_EXPORTS #define TFARMAPI __declspec(dllexport) #else diff --git a/toonz/sources/include/tfont.h b/toonz/sources/include/tfont.h index 84763e7..6487c36 100644 --- a/toonz/sources/include/tfont.h +++ b/toonz/sources/include/tfont.h @@ -54,7 +54,7 @@ private: friend class TFontManager; Impl *m_pimpl; -#ifdef WIN32 +#ifdef _WIN32 TFont(const LOGFONTW &, HDC hdc); #else TFont(ATSUFontID, int size); diff --git a/toonz/sources/include/tfx.h b/toonz/sources/include/tfx.h index 4be1eaa..dc6807d 100644 --- a/toonz/sources/include/tfx.h +++ b/toonz/sources/include/tfx.h @@ -361,7 +361,7 @@ public: //=================================================================== -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif typedef TSmartPointerT TFxP; diff --git a/toonz/sources/include/tgeometry.h b/toonz/sources/include/tgeometry.h index d689575..28ac4a6 100644 --- a/toonz/sources/include/tgeometry.h +++ b/toonz/sources/include/tgeometry.h @@ -105,7 +105,7 @@ inline ostream &operator<<(ostream &out, const TPointT &p) typedef TPointT TPoint, TPointI; typedef TPointT TPointD; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TPointT; template class DVAPI TPointT; #endif @@ -330,7 +330,7 @@ inline ostream &operator<<(ostream &out, const T3DPointT &p) typedef T3DPointT T3DPoint, T3DPointI; typedef T3DPointT T3DPointD; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI T3DPointT; template class DVAPI T3DPointT; #endif @@ -618,7 +618,7 @@ inline ostream &operator<<(ostream &out, const TDimensionT &p) return out << "(" << p.lx << ", " << p.ly << ")"; } -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TDimensionT; template class DVAPI TDimensionT; #endif @@ -786,7 +786,7 @@ public: typedef TRectT TRect, TRectI; typedef TRectT TRectD; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TRectT; template class DVAPI TRectT; #endif diff --git a/toonz/sources/include/tgl.h b/toonz/sources/include/tgl.h index c41a05f..6f3e3cc 100644 --- a/toonz/sources/include/tgl.h +++ b/toonz/sources/include/tgl.h @@ -6,7 +6,7 @@ //#include "tgeometry.h" #include "tmachine.h" -#ifdef WIN32 +#ifdef _WIN32 #include //#endif @@ -247,7 +247,7 @@ void DVAPI tglBuildMipmaps(std::vector &rasters, //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 typedef std::pair TGlContext; #else typedef void *TGlContext; diff --git a/toonz/sources/include/timage.h b/toonz/sources/include/timage.h index 39129df..de5fa33 100644 --- a/toonz/sources/include/timage.h +++ b/toonz/sources/include/timage.h @@ -86,7 +86,7 @@ private: //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/timage_io.h b/toonz/sources/include/timage_io.h index 5918f94..ac80f00 100644 --- a/toonz/sources/include/timage_io.h +++ b/toonz/sources/include/timage_io.h @@ -181,7 +181,7 @@ public: //----------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif @@ -248,7 +248,7 @@ public: //----------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/timagecache.h b/toonz/sources/include/timagecache.h index ec44926..a9f8f94 100644 --- a/toonz/sources/include/timagecache.h +++ b/toonz/sources/include/timagecache.h @@ -169,7 +169,7 @@ public: //----------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/tlevel.h b/toonz/sources/include/tlevel.h index cf9b240..80d7ade 100644 --- a/toonz/sources/include/tlevel.h +++ b/toonz/sources/include/tlevel.h @@ -72,7 +72,7 @@ public: //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/tlevel_io.h b/toonz/sources/include/tlevel_io.h index 15d34ea..034a141 100644 --- a/toonz/sources/include/tlevel_io.h +++ b/toonz/sources/include/tlevel_io.h @@ -7,7 +7,7 @@ #include "timage_io.h" #include "tproperty.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4290) #pragma warning(disable : 4251) @@ -113,7 +113,7 @@ private: //----------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif @@ -221,7 +221,7 @@ public: //----------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/tmacrofx.h b/toonz/sources/include/tmacrofx.h index 9e200fe..23f4496 100644 --- a/toonz/sources/include/tmacrofx.h +++ b/toonz/sources/include/tmacrofx.h @@ -15,7 +15,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/tmeshimage.h b/toonz/sources/include/tmeshimage.h index 5c84e12..8d91328 100644 --- a/toonz/sources/include/tmeshimage.h +++ b/toonz/sources/include/tmeshimage.h @@ -145,7 +145,7 @@ public: //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif @@ -204,7 +204,7 @@ public: //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -215,7 +215,7 @@ public: TMeshImageP() {} TMeshImageP(TMeshImage *image) : DerivedSmartPointer(image) {} TMeshImageP(TImageP image) : DerivedSmartPointer(image) {} -#if !defined(WIN32) +#if !defined(_WIN32) TMeshImageP(TImage *image) : DerivedSmartPointer(TImageP(image)) { } diff --git a/toonz/sources/include/tnotanimatableparam.h b/toonz/sources/include/tnotanimatableparam.h index b4cab57..d44b5c2 100644 --- a/toonz/sources/include/tnotanimatableparam.h +++ b/toonz/sources/include/tnotanimatableparam.h @@ -26,7 +26,7 @@ // TNotAnimatableParamChange //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4251) #endif @@ -185,7 +185,7 @@ public: // //========================================================= -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TNotAnimatableParam; class TIntParam; template class DVAPI TPersistDeclarationT; @@ -220,7 +220,7 @@ DEFINE_PARAM_SMARTPOINTER(TIntParam, int) // //========================================================= -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TNotAnimatableParam; class TBoolParam; template class DVAPI TPersistDeclarationT; @@ -248,7 +248,7 @@ DEFINE_PARAM_SMARTPOINTER(TBoolParam, bool) // //========================================================= -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TNotAnimatableParam; class TFilePathParam; template class DVAPI TPersistDeclarationT; @@ -274,7 +274,7 @@ DEFINE_PARAM_SMARTPOINTER(TFilePathParam, TFilePath) // //========================================================= -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TNotAnimatableParam; class TStringParam; template class DVAPI TPersistDeclarationT; @@ -358,7 +358,7 @@ public: // //========================================================= -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TNotAnimatableParam; class TNADoubleParam; template class DVAPI TPersistDeclarationT; @@ -457,7 +457,7 @@ TUndo *TNotAnimatableParamChange::createUndo() const //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif diff --git a/toonz/sources/include/tnztypes.h b/toonz/sources/include/tnztypes.h index 3e70dfc..b6ada7e 100644 --- a/toonz/sources/include/tnztypes.h +++ b/toonz/sources/include/tnztypes.h @@ -3,7 +3,7 @@ #ifndef TNZTYPES_H #define TNZTYPES_H -#ifdef WIN32 +#ifdef _WIN32 #define TINT32 __int32 typedef unsigned __int32 TUINT32; typedef __int64 TINT64; diff --git a/toonz/sources/include/tools/cursors.h b/toonz/sources/include/tools/cursors.h index 3311174..0bfe01d 100644 --- a/toonz/sources/include/tools/cursors.h +++ b/toonz/sources/include/tools/cursors.h @@ -14,7 +14,7 @@ enum { CURSOR_HOURGLASS, CURSOR_NO, CURSOR_DUMMY, -#ifndef WIN32 +#ifndef _WIN32 CURSOR_DND, CURSOR_QUESTION, #endif diff --git a/toonz/sources/include/toonz/imagemanager.h b/toonz/sources/include/toonz/imagemanager.h index 273c056..94aa6c0 100644 --- a/toonz/sources/include/toonz/imagemanager.h +++ b/toonz/sources/include/toonz/imagemanager.h @@ -262,7 +262,7 @@ private: //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif diff --git a/toonz/sources/include/toonz/tproject.h b/toonz/sources/include/toonz/tproject.h index bd52fed..7be64a3 100644 --- a/toonz/sources/include/toonz/tproject.h +++ b/toonz/sources/include/toonz/tproject.h @@ -95,7 +95,7 @@ private: TProject &operator=(const TProject &); }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif typedef TSmartPointerT TProjectP; diff --git a/toonz/sources/include/toonz/tstageobject.h b/toonz/sources/include/toonz/tstageobject.h index 4d25db0..12177fc 100644 --- a/toonz/sources/include/toonz/tstageobject.h +++ b/toonz/sources/include/toonz/tstageobject.h @@ -547,7 +547,7 @@ private: //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/toonz/tstageobjectspline.h b/toonz/sources/include/toonz/tstageobjectspline.h index b2b46f9..345798d 100644 --- a/toonz/sources/include/toonz/tstageobjectspline.h +++ b/toonz/sources/include/toonz/tstageobjectspline.h @@ -92,7 +92,7 @@ private: void updatePosPathKeyframes(TStroke *oldSpline, TStroke *newSpline); }; -#ifdef WIN32 +#ifdef _WIN32 template class TSmartPointerT; #endif diff --git a/toonz/sources/include/toonz/txshchildlevel.h b/toonz/sources/include/toonz/txshchildlevel.h index f2613c3..846db0e 100644 --- a/toonz/sources/include/toonz/txshchildlevel.h +++ b/toonz/sources/include/toonz/txshchildlevel.h @@ -92,7 +92,7 @@ private: TXshChildLevel &operator=(const TXshChildLevel &); }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif typedef TSmartPointerT TXshChildLevelP; diff --git a/toonz/sources/include/toonz/txshcolumn.h b/toonz/sources/include/toonz/txshcolumn.h index 93f0a16..29f4a95 100644 --- a/toonz/sources/include/toonz/txshcolumn.h +++ b/toonz/sources/include/toonz/txshcolumn.h @@ -232,7 +232,7 @@ public: void setColorTag(int colorTag) { m_colorTag = colorTag; } //Usato solo in tabkids }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif typedef TSmartPointerT TXshColumnP; diff --git a/toonz/sources/include/toonz/txsheet.h b/toonz/sources/include/toonz/txsheet.h index ee91d06..9e2104f 100644 --- a/toonz/sources/include/toonz/txsheet.h +++ b/toonz/sources/include/toonz/txsheet.h @@ -456,7 +456,7 @@ private: //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif typedef TSmartPointerT TXsheetP; diff --git a/toonz/sources/include/toonz/txshlevel.h b/toonz/sources/include/toonz/txshlevel.h index 6d04bd5..7ac5b88 100644 --- a/toonz/sources/include/toonz/txshlevel.h +++ b/toonz/sources/include/toonz/txshlevel.h @@ -146,7 +146,7 @@ private: TXshLevel &operator=(const TXshLevel &); }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif diff --git a/toonz/sources/include/toonz/txshlevelcolumn.h b/toonz/sources/include/toonz/txshlevelcolumn.h index 1a1c5c2..fb2be48 100644 --- a/toonz/sources/include/toonz/txshlevelcolumn.h +++ b/toonz/sources/include/toonz/txshlevelcolumn.h @@ -90,7 +90,7 @@ private: TXshLevelColumn &operator=(const TXshLevelColumn &); }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif diff --git a/toonz/sources/include/toonz/txshmeshcolumn.h b/toonz/sources/include/toonz/txshmeshcolumn.h index d31129b..e7b88d5 100644 --- a/toonz/sources/include/toonz/txshmeshcolumn.h +++ b/toonz/sources/include/toonz/txshmeshcolumn.h @@ -44,7 +44,7 @@ private: //--------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/toonz/txshpalettecolumn.h b/toonz/sources/include/toonz/txshpalettecolumn.h index e633aea..70e8802 100644 --- a/toonz/sources/include/toonz/txshpalettecolumn.h +++ b/toonz/sources/include/toonz/txshpalettecolumn.h @@ -56,7 +56,7 @@ private: TXshPaletteColumn &operator=(const TXshPaletteColumn &); }; -#ifdef WIN32 +#ifdef _WIN32 template class TSmartPointerT; #endif diff --git a/toonz/sources/include/toonz/txshpalettelevel.h b/toonz/sources/include/toonz/txshpalettelevel.h index 3f14714..494e2a0 100644 --- a/toonz/sources/include/toonz/txshpalettelevel.h +++ b/toonz/sources/include/toonz/txshpalettelevel.h @@ -106,7 +106,7 @@ private: TXshPaletteLevel &operator=(const TXshPaletteLevel &); }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif typedef TSmartPointerT TXshPaletteLevelP; diff --git a/toonz/sources/include/toonz/txshsimplelevel.h b/toonz/sources/include/toonz/txshsimplelevel.h index 93eadb1..253478d 100644 --- a/toonz/sources/include/toonz/txshsimplelevel.h +++ b/toonz/sources/include/toonz/txshsimplelevel.h @@ -361,7 +361,7 @@ private: //===================================================================================== -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif typedef TSmartPointerT TXshSimpleLevelP; diff --git a/toonz/sources/include/toonz/txshsoundcolumn.h b/toonz/sources/include/toonz/txshsoundcolumn.h index 4a62f92..f121bd6 100644 --- a/toonz/sources/include/toonz/txshsoundcolumn.h +++ b/toonz/sources/include/toonz/txshsoundcolumn.h @@ -149,7 +149,7 @@ protected slots: void onTimerOut(); }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif typedef TSmartPointerT TXshSoundColumnP; diff --git a/toonz/sources/include/toonz/txshsoundlevel.h b/toonz/sources/include/toonz/txshsoundlevel.h index 9340f3a..9f4608c 100644 --- a/toonz/sources/include/toonz/txshsoundlevel.h +++ b/toonz/sources/include/toonz/txshsoundlevel.h @@ -93,7 +93,7 @@ private: TXshSoundLevel &operator=(const TXshSoundLevel &); }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif typedef TSmartPointerT TXshSoundLevelP; diff --git a/toonz/sources/include/toonz/txshsoundtextcolumn.h b/toonz/sources/include/toonz/txshsoundtextcolumn.h index bed8dff..fb7c88b 100644 --- a/toonz/sources/include/toonz/txshsoundtextcolumn.h +++ b/toonz/sources/include/toonz/txshsoundtextcolumn.h @@ -44,7 +44,7 @@ public: void saveData(TOStream &os); }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif typedef TSmartPointerT TXshSoundTextColumnP; diff --git a/toonz/sources/include/toonz/txshsoundtextlevel.h b/toonz/sources/include/toonz/txshsoundtextlevel.h index e9cfac8..17be83b 100644 --- a/toonz/sources/include/toonz/txshsoundtextlevel.h +++ b/toonz/sources/include/toonz/txshsoundtextlevel.h @@ -55,7 +55,7 @@ private: TXshSoundTextLevel &operator=(const TXshSoundTextLevel &); }; -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT; #endif typedef TSmartPointerT TXshSoundTextLevelP; diff --git a/toonz/sources/include/toonz/txshzeraryfxcolumn.h b/toonz/sources/include/toonz/txshzeraryfxcolumn.h index 6be833d..37f7318 100644 --- a/toonz/sources/include/toonz/txshzeraryfxcolumn.h +++ b/toonz/sources/include/toonz/txshzeraryfxcolumn.h @@ -85,7 +85,7 @@ private: TXshZeraryFxColumn &operator=(const TXshZeraryFxColumn &); }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/toonzqt/camerasettingswidget.h b/toonz/sources/include/toonzqt/camerasettingswidget.h index 9b863be..529de4f 100644 --- a/toonz/sources/include/toonzqt/camerasettingswidget.h +++ b/toonz/sources/include/toonzqt/camerasettingswidget.h @@ -3,7 +3,7 @@ #ifndef CAMERASETTINGSWIDGET_H #define CAMERASETTINGSWIDGET_H -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h b/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h index eee872c..03d2047 100644 --- a/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h +++ b/toonz/sources/include/toonzqt/cleanupcamerasettingswidget.h @@ -3,7 +3,7 @@ #ifndef CLEANUPCAMERASETTINGSWIDGET_H #define CLEANUPCAMERASETTINGSWIDGET_H -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/colorfield.h b/toonz/sources/include/toonzqt/colorfield.h index 83cb8d0..f0abda3 100644 --- a/toonz/sources/include/toonzqt/colorfield.h +++ b/toonz/sources/include/toonzqt/colorfield.h @@ -3,7 +3,7 @@ #ifndef COLORFIELD_H #define COLORFIELD_H -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/combohistogram.h b/toonz/sources/include/toonzqt/combohistogram.h index 7f4f9dc..e65f2ed 100644 --- a/toonz/sources/include/toonzqt/combohistogram.h +++ b/toonz/sources/include/toonzqt/combohistogram.h @@ -19,7 +19,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/dvdialog.h b/toonz/sources/include/toonzqt/dvdialog.h index b3bf857..fabd4cf 100644 --- a/toonz/sources/include/toonzqt/dvdialog.h +++ b/toonz/sources/include/toonzqt/dvdialog.h @@ -34,7 +34,7 @@ class QLabel; class TXsheetHandle; class TPalette; -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/dvtextedit.h b/toonz/sources/include/toonzqt/dvtextedit.h index 2b0f67e..63310bd 100644 --- a/toonz/sources/include/toonzqt/dvtextedit.h +++ b/toonz/sources/include/toonzqt/dvtextedit.h @@ -3,7 +3,7 @@ #ifndef DVTEXTEDIT_H #define DVTEXTEDIT_H -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/fxsettings.h b/toonz/sources/include/toonzqt/fxsettings.h index 1f2d590..fbec7b3 100644 --- a/toonz/sources/include/toonzqt/fxsettings.h +++ b/toonz/sources/include/toonzqt/fxsettings.h @@ -3,7 +3,7 @@ #ifndef FXSETTINGS_H #define FXSETTINGS_H -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/histogram.h b/toonz/sources/include/toonzqt/histogram.h index 15a7007..599bec8 100644 --- a/toonz/sources/include/toonzqt/histogram.h +++ b/toonz/sources/include/toonzqt/histogram.h @@ -21,7 +21,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/paramfield.h b/toonz/sources/include/toonzqt/paramfield.h index a73236f..047e1e6 100644 --- a/toonz/sources/include/toonzqt/paramfield.h +++ b/toonz/sources/include/toonzqt/paramfield.h @@ -3,7 +3,7 @@ #ifndef PARAMFIELD_H #define PARAMFIELD_H -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/swatchviewer.h b/toonz/sources/include/toonzqt/swatchviewer.h index 5ac3151..7cd8f5e 100644 --- a/toonz/sources/include/toonzqt/swatchviewer.h +++ b/toonz/sources/include/toonzqt/swatchviewer.h @@ -3,7 +3,7 @@ #ifndef SWATCHVIEWER_H #define SWATCHVIEWER_H -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/toonzqt/tabbar.h b/toonz/sources/include/toonzqt/tabbar.h index 0b2b033..a2170b8 100644 --- a/toonz/sources/include/toonzqt/tabbar.h +++ b/toonz/sources/include/toonzqt/tabbar.h @@ -16,7 +16,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/tpalette.h b/toonz/sources/include/tpalette.h index f641467..6d506f9 100644 --- a/toonz/sources/include/tpalette.h +++ b/toonz/sources/include/tpalette.h @@ -23,7 +23,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4251) #endif @@ -315,13 +315,13 @@ private: //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif diff --git a/toonz/sources/include/tparam.h b/toonz/sources/include/tparam.h index 639861a..dc34bad 100644 --- a/toonz/sources/include/tparam.h +++ b/toonz/sources/include/tparam.h @@ -153,14 +153,14 @@ private: //--------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif typedef TSmartPointerT TParamP; //========================================================= -#ifdef WIN32 +#ifdef _WIN32 #define DVAPI_PARAM_SMARTPOINTER(PARAM) \ template class DVAPI TSmartPointerT; \ template class DVAPI TDerivedSmartPointerT; diff --git a/toonz/sources/include/tparamset.h b/toonz/sources/include/tparamset.h index 9b13375..8b68c2a 100644 --- a/toonz/sources/include/tparamset.h +++ b/toonz/sources/include/tparamset.h @@ -42,7 +42,7 @@ public: //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4251) #endif @@ -107,11 +107,11 @@ private: TParamSetImp *m_imp; }; -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -131,7 +131,7 @@ public: //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 class TPointParam; template class DVAPI TPersistDeclarationT; #endif @@ -173,7 +173,7 @@ DEFINE_PARAM_SMARTPOINTER(TPointParam, TPointD) //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 class TPixelParam; template class DVAPI TPersistDeclarationT; #endif @@ -240,7 +240,7 @@ public: //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 class TRangeParam; template class DVAPI TPersistDeclarationT; #endif diff --git a/toonz/sources/include/tpixel.h b/toonz/sources/include/tpixel.h index 4014f18..a866945 100644 --- a/toonz/sources/include/tpixel.h +++ b/toonz/sources/include/tpixel.h @@ -160,7 +160,7 @@ public: undefined machine order !!!! #endif -#ifdef WIN32 +#ifdef _WIN32 TPixelRGBM64() : r(0), g(0), b(0), m(maxChannelValue){}; TPixelRGBM64(int rr, int gg, int bb, int mm = maxChannelValue) : r(rr), g(gg), b(bb), m(mm){}; diff --git a/toonz/sources/include/tpluginmanager.h b/toonz/sources/include/tpluginmanager.h index 9aa6598..e4c01f6 100644 --- a/toonz/sources/include/tpluginmanager.h +++ b/toonz/sources/include/tpluginmanager.h @@ -55,7 +55,7 @@ public: // // L'entry point del plugin e' TLIBMAIN {....} // -#ifdef WIN32 +#ifdef _WIN32 #define TLIBMAIN \ extern "C" __declspec(dllexport) \ const TPluginInfo * \ diff --git a/toonz/sources/include/tproperty.h b/toonz/sources/include/tproperty.h index f844562..98cc3fb 100644 --- a/toonz/sources/include/tproperty.h +++ b/toonz/sources/include/tproperty.h @@ -16,7 +16,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4251) #endif @@ -163,7 +163,7 @@ private: }; //--------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TRangeProperty; template class DVAPI TRangeProperty; #endif @@ -503,7 +503,7 @@ private: //--------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif diff --git a/toonz/sources/include/traster.h b/toonz/sources/include/traster.h index cc35663..9596a0d 100644 --- a/toonz/sources/include/traster.h +++ b/toonz/sources/include/traster.h @@ -212,7 +212,7 @@ private: // Smart Pointer a TRaster // -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif @@ -440,7 +440,7 @@ inline TRasterPT::TRasterPT(int lx, int ly, int wrap, T *buffer, bool bufferO //--------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 // su NT e' necessario per evitare un warning nelle classi // esportate che si riferiscono a TRaster32P/TRaster64P // su IRIX non compila perche' non riesce ad instanziare le diff --git a/toonz/sources/include/trastercm.h b/toonz/sources/include/trastercm.h index 513c239..852d973 100644 --- a/toonz/sources/include/trastercm.h +++ b/toonz/sources/include/trastercm.h @@ -18,7 +18,7 @@ typedef TRasterT TRasterCM32; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT>; template class DVAPI TRasterPT; #endif diff --git a/toonz/sources/include/trasterfx.h b/toonz/sources/include/trasterfx.h index 94f9f47..92778fa 100644 --- a/toonz/sources/include/trasterfx.h +++ b/toonz/sources/include/trasterfx.h @@ -20,7 +20,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif @@ -266,7 +266,7 @@ public: //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -285,7 +285,7 @@ public: //=================================================================== -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TFxPortT; #endif typedef TFxPortT TRasterFxPort; @@ -321,7 +321,7 @@ public: //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -343,7 +343,7 @@ public: //=================================================================== -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TFxPortT; #endif @@ -409,12 +409,12 @@ void DVAPI removeRenderCache(const std::string &alias); //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4251) #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif diff --git a/toonz/sources/include/trasterimage.h b/toonz/sources/include/trasterimage.h index fc62a45..90bd423 100644 --- a/toonz/sources/include/trasterimage.h +++ b/toonz/sources/include/trasterimage.h @@ -146,7 +146,7 @@ public: //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif diff --git a/toonz/sources/include/tregion.h b/toonz/sources/include/tregion.h index 2ac3e02..8c849b8 100644 --- a/toonz/sources/include/tregion.h +++ b/toonz/sources/include/tregion.h @@ -150,7 +150,7 @@ private: }; /* -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/trop_borders.h b/toonz/sources/include/trop_borders.h index c58359e..f98735b 100644 --- a/toonz/sources/include/trop_borders.h +++ b/toonz/sources/include/trop_borders.h @@ -147,7 +147,7 @@ class ImageMesh : public TSmartObject, public tcg::Mesh //-------------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class TSmartPointerT; #endif typedef TSmartPointerT ImageMeshP; diff --git a/toonz/sources/include/tscanner.h b/toonz/sources/include/tscanner.h index 4444c74..f34b7c3 100644 --- a/toonz/sources/include/tscanner.h +++ b/toonz/sources/include/tscanner.h @@ -3,7 +3,7 @@ #ifndef TSCANNER_H #define TSCANNER_H -#ifdef WIN32 +#ifdef _WIN32 #define NOMINMAX #endif diff --git a/toonz/sources/include/tsound.h b/toonz/sources/include/tsound.h index 1920805..0000b0d 100644 --- a/toonz/sources/include/tsound.h +++ b/toonz/sources/include/tsound.h @@ -35,7 +35,7 @@ const int RIGHT = LEFT + 1; class TSoundTrack; class TSoundTransform; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/tsound_io.h b/toonz/sources/include/tsound_io.h index 52cbbba..1f99200 100644 --- a/toonz/sources/include/tsound_io.h +++ b/toonz/sources/include/tsound_io.h @@ -54,7 +54,7 @@ public: TSoundTrackReaderCreateProc *proc); }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif @@ -98,7 +98,7 @@ public: TSoundTrackWriterCreateProc *proc); }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; #endif diff --git a/toonz/sources/include/tsound_t.h b/toonz/sources/include/tsound_t.h index 9f4690b..f22de24 100644 --- a/toonz/sources/include/tsound_t.h +++ b/toonz/sources/include/tsound_t.h @@ -164,7 +164,7 @@ public: //!Applies a trasformation (echo, reverb, ect) to the object and returns the transformed soundtrack #if defined(MACOSX) || defined(LINUX) TSoundTrackP apply(TSoundTransform *transform); -#else // WIN32 +#else // _WIN32 TSoundTrackP apply(TSoundTransform *transform) { assert(transform); @@ -392,7 +392,7 @@ public: //============================================================================== -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSoundTrackT; template class DVAPI TSoundTrackT; template class DVAPI TSoundTrackT; diff --git a/toonz/sources/include/tspectrum.h b/toonz/sources/include/tspectrum.h index d8fa40f..2a94749 100644 --- a/toonz/sources/include/tspectrum.h +++ b/toonz/sources/include/tspectrum.h @@ -16,7 +16,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif @@ -193,7 +193,7 @@ public: } }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSpectrumT; template class DVAPI TSpectrumT; #endif @@ -201,7 +201,7 @@ template class DVAPI TSpectrumT; typedef TSpectrumT TSpectrum; typedef TSpectrumT TSpectrum64; -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(default : 4251) #endif diff --git a/toonz/sources/include/tspectrumparam.h b/toonz/sources/include/tspectrumparam.h index 6ea7433..5627e2e 100644 --- a/toonz/sources/include/tspectrumparam.h +++ b/toonz/sources/include/tspectrumparam.h @@ -26,7 +26,7 @@ class TPixelParamP; //============================================================= -#ifdef WIN32 +#ifdef _WIN32 class TSpectrumParam; template class DVAPI TPersistDeclarationT; #endif @@ -93,7 +93,7 @@ public: double keyframeIndexToFrame(int index) const; }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif diff --git a/toonz/sources/include/tstepparam.h b/toonz/sources/include/tstepparam.h index 61b9156..35c4632 100644 --- a/toonz/sources/include/tstepparam.h +++ b/toonz/sources/include/tstepparam.h @@ -24,7 +24,7 @@ #endif class TDoubleStepParam; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TPersistDeclarationT; #endif diff --git a/toonz/sources/include/tstopwatch.h b/toonz/sources/include/tstopwatch.h index 141ab1d..e15b4e0 100644 --- a/toonz/sources/include/tstopwatch.h +++ b/toonz/sources/include/tstopwatch.h @@ -58,7 +58,7 @@ class DVAPI TStopWatch START_USER m_startUser; //process starting reference time (unit=100-nanosecond) START_SYSTEM m_startSystem; //system starting reference time (unit=100-nanosecond) -#ifdef WIN32 +#ifdef _WIN32 LARGE_INTEGER m_hrStart; // high resolution starting reference (total) time #endif diff --git a/toonz/sources/include/tstrokeoutline.h b/toonz/sources/include/tstrokeoutline.h index 952910d..b570128 100644 --- a/toonz/sources/include/tstrokeoutline.h +++ b/toonz/sources/include/tstrokeoutline.h @@ -18,7 +18,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/include/tsystem.h b/toonz/sources/include/tsystem.h index b7209d4..ec888ef 100644 --- a/toonz/sources/include/tsystem.h +++ b/toonz/sources/include/tsystem.h @@ -5,7 +5,7 @@ //#include "texception.h" -#ifndef WIN32 +#ifndef _WIN32 #include #endif diff --git a/toonz/sources/include/ttokenizer.h b/toonz/sources/include/ttokenizer.h index cd20ea7..9a70ad3 100644 --- a/toonz/sources/include/ttokenizer.h +++ b/toonz/sources/include/ttokenizer.h @@ -5,7 +5,7 @@ #include "tcommon.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4251) #endif @@ -107,7 +107,7 @@ public: } // namespace TSyntax -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif diff --git a/toonz/sources/include/ttonecurveparam.h b/toonz/sources/include/ttonecurveparam.h index 6f40f03..f09ada7 100644 --- a/toonz/sources/include/ttonecurveparam.h +++ b/toonz/sources/include/ttonecurveparam.h @@ -10,7 +10,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif @@ -99,7 +99,7 @@ public: void saveData(TOStream &os); }; -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif diff --git a/toonz/sources/include/ttoonzimage.h b/toonz/sources/include/ttoonzimage.h index c84faf5..0dd93d2 100644 --- a/toonz/sources/include/ttoonzimage.h +++ b/toonz/sources/include/ttoonzimage.h @@ -120,7 +120,7 @@ private: //------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif diff --git a/toonz/sources/include/tunit.h b/toonz/sources/include/tunit.h index 768a3ff..6f11b6a 100644 --- a/toonz/sources/include/tunit.h +++ b/toonz/sources/include/tunit.h @@ -15,7 +15,7 @@ #define DVVAR DV_IMPORT_VAR #endif -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4251) #endif @@ -191,7 +191,7 @@ DVAPI void setCurrentDpiGetter(CurrentDpiGetter f); //--------------------------- -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif diff --git a/toonz/sources/include/tutil.h b/toonz/sources/include/tutil.h index 3ef19bc..208b5a7 100644 --- a/toonz/sources/include/tutil.h +++ b/toonz/sources/include/tutil.h @@ -6,7 +6,7 @@ #include "tcommon.h" #include -#ifdef WIN32 +#ifdef _WIN32 #include #include #endif diff --git a/toonz/sources/include/tvectorgl.h b/toonz/sources/include/tvectorgl.h index f5b54d8..28945ef 100644 --- a/toonz/sources/include/tvectorgl.h +++ b/toonz/sources/include/tvectorgl.h @@ -3,7 +3,7 @@ #ifndef TVECTORGL_INCLUDED #define TVECTORGL_INCLUDED -#ifdef WIN32 +#ifdef _WIN32 #include // #endif diff --git a/toonz/sources/include/tvectorimage.h b/toonz/sources/include/tvectorimage.h index f80f239..669ecba 100644 --- a/toonz/sources/include/tvectorimage.h +++ b/toonz/sources/include/tvectorimage.h @@ -368,7 +368,7 @@ DVAPI void getClosingPoints(const TRectD &rect, double fac, const TVectorImageP //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DVAPI TSmartPointerT; template class DVAPI TDerivedSmartPointerT; #endif @@ -379,7 +379,7 @@ public: TVectorImageP() {} TVectorImageP(TVectorImage *image) : DerivedSmartPointer(image) {} TVectorImageP(TImageP image) : DerivedSmartPointer(image) {} -#if !defined(WIN32) +#if !defined(_WIN32) TVectorImageP(TImage *image) : DerivedSmartPointer(TImageP(image)) { } diff --git a/toonz/sources/stdfx/artcontourfx.cpp b/toonz/sources/stdfx/artcontourfx.cpp index 7c0cae2..b884a10 100644 --- a/toonz/sources/stdfx/artcontourfx.cpp +++ b/toonz/sources/stdfx/artcontourfx.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #define NOMINMAX #endif diff --git a/toonz/sources/stdfx/blendtzfx.cpp b/toonz/sources/stdfx/blendtzfx.cpp index c7b9e72..b05f2e3 100644 --- a/toonz/sources/stdfx/blendtzfx.cpp +++ b/toonz/sources/stdfx/blendtzfx.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #define NOMINMAX #endif diff --git a/toonz/sources/stdfx/blurfx.cpp b/toonz/sources/stdfx/blurfx.cpp index 514f5b1..27801c5 100644 --- a/toonz/sources/stdfx/blurfx.cpp +++ b/toonz/sources/stdfx/blurfx.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #define NOMINMAX #endif diff --git a/toonz/sources/stdfx/calligraphicfx.cpp b/toonz/sources/stdfx/calligraphicfx.cpp index ab9c900..c7166b0 100644 --- a/toonz/sources/stdfx/calligraphicfx.cpp +++ b/toonz/sources/stdfx/calligraphicfx.cpp @@ -2,7 +2,7 @@ #include "stdfx.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include "windows.h" #endif diff --git a/toonz/sources/stdfx/offscreengl.h b/toonz/sources/stdfx/offscreengl.h index 8164f29..5a72170 100644 --- a/toonz/sources/stdfx/offscreengl.h +++ b/toonz/sources/stdfx/offscreengl.h @@ -14,7 +14,7 @@ public: // ----------------------------------------------------------------------------------- // // creo il contesto openGL // // ----------------------------------------------------------------------------------- // -#ifdef WIN32 +#ifdef _WIN32 initBITMAPINFO(m_info, width, height, bpp); m_offData = 0; // a pointer to buffer @@ -80,7 +80,7 @@ public: // ----------------------------------------------------------------------------------- // // cancello il contesto openGL // // ----------------------------------------------------------------------------------- // -#ifdef WIN32 +#ifdef _WIN32 wglDeleteContext(m_hglRC); // release object @@ -99,7 +99,7 @@ public: public: // init a BITMAPINFO structure -#ifdef WIN32 +#ifdef _WIN32 void initBITMAPINFO(BITMAPINFO &info, int width, int height, int bpp) { memset(&info, 0, sizeof(BITMAPINFOHEADER)); diff --git a/toonz/sources/stdfx/pins.cpp b/toonz/sources/stdfx/pins.cpp index d4d6fba..e0e7944 100644 --- a/toonz/sources/stdfx/pins.cpp +++ b/toonz/sources/stdfx/pins.cpp @@ -7,7 +7,7 @@ #include "tofflinegl.h" //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 #define ISNAN _isnan #else extern "C" int isnan(double); @@ -141,7 +141,7 @@ void subCompute(TRasterFxPort &m_input, TTile &tile, double frame, const TRender assert(ret == TRUE); #else TOfflineGL offScreenRendering(TDimension(rasterWidth, rasterHeight)); - //#ifdef WIN32 + //#ifdef _WIN32 offScreenRendering.makeCurrent(); //#else //#if defined(LINUX) || defined(MACOSX) diff --git a/toonz/sources/stdfx/pins.h b/toonz/sources/stdfx/pins.h index ffda932..7e52c0f 100644 --- a/toonz/sources/stdfx/pins.h +++ b/toonz/sources/stdfx/pins.h @@ -13,7 +13,7 @@ //#include "tparamset.h" #include "tgl.h" -#ifdef WIN32 +#ifdef _WIN32 #include #include #endif diff --git a/toonz/sources/stdfx/stdfx.cpp b/toonz/sources/stdfx/stdfx.cpp index 8743fe9..4f46264 100644 --- a/toonz/sources/stdfx/stdfx.cpp +++ b/toonz/sources/stdfx/stdfx.cpp @@ -13,7 +13,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif #undef max diff --git a/toonz/sources/stdfx/stdfx.h b/toonz/sources/stdfx/stdfx.h index 3aba595..2a4e1cf 100644 --- a/toonz/sources/stdfx/stdfx.h +++ b/toonz/sources/stdfx/stdfx.h @@ -18,7 +18,7 @@ static const string PLUGIN_PREFIX("STD"); public: \ const TPersistDeclaration *getDeclaration() const; -#ifdef WIN32 +#ifdef _WIN32 #ifdef TNZSTDFX_EXPORTS diff --git a/toonz/sources/tcleanupper/tcleanupper.cpp b/toonz/sources/tcleanupper/tcleanupper.cpp index 9cbe93e..3dffc5e 100644 --- a/toonz/sources/tcleanupper/tcleanupper.cpp +++ b/toonz/sources/tcleanupper/tcleanupper.cpp @@ -127,7 +127,7 @@ void restoreGlobalSettings(CleanupParameters *cp) void fatalError(string msg) { -#ifdef WIN32 +#ifdef _WIN32 msg = "Application can't start:\n" + msg; DVGui::MsgBox(CRITICAL, QString::fromStdString(msg)); //MessageBox(0,msg.c_str(),"Fatal error",MB_ICONERROR); diff --git a/toonz/sources/tcomposer/tcomposer.cpp b/toonz/sources/tcomposer/tcomposer.cpp index 1cd3a5b..600c57c 100644 --- a/toonz/sources/tcomposer/tcomposer.cpp +++ b/toonz/sources/tcomposer/tcomposer.cpp @@ -38,7 +38,7 @@ #include "tnzimage.h" #include "tflash.h" -#ifdef WIN32 +#ifdef _WIN32 #include "avicodecrestrictions.h" #endif @@ -153,7 +153,7 @@ const char *systemVarPrefix = "TOONZ"; void fatalError(string msg) { -#ifdef WIN32 +#ifdef _WIN32 std::cout << msg << std::endl; //MessageBox(0,msg.c_str(),"Fatal error",MB_ICONERROR); exit(1); @@ -462,7 +462,7 @@ std::pair generateMovie(ToonzScene *scene, string ext = fp.getType(); -#ifdef WIN32 +#ifdef _WIN32 if (ext == "avi") { TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext); string codecName = props->getProperty(0)->getValueAsString(); @@ -600,7 +600,7 @@ int main(int argc, char *argv[]) std::auto_ptr mainScope(new QObject(&app)); mainScope->setObjectName("mainScope"); -#ifdef WIN32 +#ifdef _WIN32 #ifndef x64 //Store the floating point control word. It will be re-set before Toonz initialization //has ended. @@ -616,7 +616,7 @@ int main(int argc, char *argv[]) // Install run out of contiguous memory callback TBigMemoryManager::instance()->setRunOutOfContiguousMemoryHandler(&tcomposerRunOutOfContMemHandler); -#ifdef WIN32 +#ifdef _WIN32 //Define 64-bit precision for floating-point arithmetic. Please observe that the //initImageIo() call below would already impose this precision. This just wants to be //explicit. @@ -1003,7 +1003,7 @@ int main(int argc, char *argv[]) //TCacheResourcePool::instance(); //Needs to be instanced before TPassiveCacheManager... TPassiveCacheManager::instance()->setEnabled(false); -#ifdef WIN32 +#ifdef _WIN32 #ifndef x64 //On 32-bit architecture, there could be cases in which initialization could alter the //FPU floating point control word. I've seen this happen when loading some AVI coded (VFAPI), diff --git a/toonz/sources/tnzbase/texternfx.cpp b/toonz/sources/tnzbase/texternfx.cpp index 55ceaf7..1524b08 100644 --- a/toonz/sources/tnzbase/texternfx.cpp +++ b/toonz/sources/tnzbase/texternfx.cpp @@ -293,7 +293,7 @@ void TExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSetti // poi cancellare tutto string expandedargs; char buffer[1024]; -#ifdef WIN32 +#ifdef _WIN32 ExpandEnvironmentStrings(args.c_str(), buffer, 1024); STARTUPINFO si; @@ -486,7 +486,7 @@ void ExternalProgramFx::doCompute(TTile &tile, double frame, const TRenderSettin arglist += " " + outname; string cmdline = program + arglist; -#ifdef WIN32 +#ifdef _WIN32 STARTUPINFO si; PROCESS_INFORMATION pinfo; diff --git a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp index e566d33..9c8d0ef 100644 --- a/toonz/sources/tnzbase/tscanner/tscannerepson.cpp +++ b/toonz/sources/tnzbase/tscanner/tscannerepson.cpp @@ -24,7 +24,7 @@ int scsi_maxlen() #define BW_USES_GRAYTONES -#ifndef WIN32 +#ifndef _WIN32 #define SWAPIT #endif diff --git a/toonz/sources/tnzext/NotSimmetricBezierPotential.cpp b/toonz/sources/tnzext/NotSimmetricBezierPotential.cpp index 9e1ce6b..e8a3a5e 100644 --- a/toonz/sources/tnzext/NotSimmetricBezierPotential.cpp +++ b/toonz/sources/tnzext/NotSimmetricBezierPotential.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #define NOMINMAX #endif diff --git a/toonz/sources/tnzext/OverallDesigner.cpp b/toonz/sources/tnzext/OverallDesigner.cpp index 8b286c7..4240a1f 100644 --- a/toonz/sources/tnzext/OverallDesigner.cpp +++ b/toonz/sources/tnzext/OverallDesigner.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #define NOMINMAX #endif diff --git a/toonz/sources/tnzext/Potential.cpp b/toonz/sources/tnzext/Potential.cpp index 1516270..7a39e63 100644 --- a/toonz/sources/tnzext/Potential.cpp +++ b/toonz/sources/tnzext/Potential.cpp @@ -3,7 +3,7 @@ #include "ext/Potential.h" #include -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) #pragma warning(push) #pragma warning(disable : 4290) #endif @@ -67,6 +67,6 @@ ToonzExt::Potential::value(double at) const // End Of File //----------------------------------------------------------------------------- -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) #pragma warning(pop) #endif diff --git a/toonz/sources/tnzext/Selector.cpp b/toonz/sources/tnzext/Selector.cpp index 2b7f3c7..d98caab 100644 --- a/toonz/sources/tnzext/Selector.cpp +++ b/toonz/sources/tnzext/Selector.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #define NOMINMAX #endif diff --git a/toonz/sources/tnzext/StrokeDeformationImpl.cpp b/toonz/sources/tnzext/StrokeDeformationImpl.cpp index 614b9ab..0e651c5 100644 --- a/toonz/sources/tnzext/StrokeDeformationImpl.cpp +++ b/toonz/sources/tnzext/StrokeDeformationImpl.cpp @@ -6,7 +6,7 @@ #ifdef _DEBUG #define _STLP_DEBUG 1 #endif -#ifdef WIN32 +#ifdef _WIN32 #define NOMINMAX #endif diff --git a/toonz/sources/tnzext/Types.cpp b/toonz/sources/tnzext/Types.cpp index 7ba9e57..2d6aa28 100644 --- a/toonz/sources/tnzext/Types.cpp +++ b/toonz/sources/tnzext/Types.cpp @@ -5,7 +5,7 @@ #endif #include "ext/Types.h" -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) // to avoid annoying warning #pragma warning(push) #pragma warning(disable : 4290) @@ -85,7 +85,7 @@ bool ToonzExt::EvenInt::isEven() const //----------------------------------------------------------------------------- -#if defined(WIN32) && (_MSC_VER <= 1200) +#if defined(_WIN32) && (_MSC_VER <= 1200) #pragma warning(pop) #endif diff --git a/toonz/sources/tnztools/pinchtool.cpp b/toonz/sources/tnztools/pinchtool.cpp index 2866bf5..5cb69ea 100644 --- a/toonz/sources/tnztools/pinchtool.cpp +++ b/toonz/sources/tnztools/pinchtool.cpp @@ -347,7 +347,7 @@ void PinchTool::leftButtonUp(const TPointD &pos, m_undo = 0; // to avoid red line tool on stroke -#ifdef WIN32 +#ifdef _WIN32 invalidate(status->stroke2change_->getBBox().enlarge(status->pixelSize_ * 13)); #else invalidate(); diff --git a/toonz/sources/toonz/batches.cpp b/toonz/sources/toonz/batches.cpp index 4a9c5e6..66c52b0 100644 --- a/toonz/sources/toonz/batches.cpp +++ b/toonz/sources/toonz/batches.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #define _WIN32_WINNT 0x0500 // per CreateJobObject e affini #endif diff --git a/toonz/sources/toonz/batches.h b/toonz/sources/toonz/batches.h index 1b67d24..6ff544e 100644 --- a/toonz/sources/toonz/batches.h +++ b/toonz/sources/toonz/batches.h @@ -20,7 +20,7 @@ class TFarmController; //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(push) #pragma warning(disable : 4786) #endif @@ -147,7 +147,7 @@ public: //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(pop) #endif diff --git a/toonz/sources/toonz/batchserversviewer.cpp b/toonz/sources/toonz/batchserversviewer.cpp index 8290dca..9def75e 100644 --- a/toonz/sources/toonz/batchserversviewer.cpp +++ b/toonz/sources/toonz/batchserversviewer.cpp @@ -159,7 +159,7 @@ void BatchServersViewer::updateServerInfo(const QString &id) m_tasks->setText(""); m_cpu->setText(QString::number(TSystem::getProcessorCount())); -#ifdef WIN32 +#ifdef _WIN32 //Please observe that the commented value is NOT the same reported by tfarmserver... MEMORYSTATUSEX buff; buff.dwLength = sizeof(MEMORYSTATUSEX); diff --git a/toonz/sources/toonz/filebrowser.cpp b/toonz/sources/toonz/filebrowser.cpp index ff15d79..0cda4ee 100644 --- a/toonz/sources/toonz/filebrowser.cpp +++ b/toonz/sources/toonz/filebrowser.cpp @@ -1091,7 +1091,7 @@ QMenu *FileBrowser::getContextMenu(QWidget *parent, int index) menu->addAction(cm->getAction(MI_LoadScene)); } -#ifdef WIN32 +#ifdef _WIN32 else if (files.size() == 1 && files[0].getType() == "scr") { QAction *action; action = new QAction(tr("Preview Screensaver"), menu); diff --git a/toonz/sources/toonz/filebrowsermodel.cpp b/toonz/sources/toonz/filebrowsermodel.cpp index 58f32c4..e6daed9 100644 --- a/toonz/sources/toonz/filebrowsermodel.cpp +++ b/toonz/sources/toonz/filebrowsermodel.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #include #endif @@ -32,7 +32,7 @@ namespace { TFilePath getMyDocumentsPath() { -#ifdef WIN32 +#ifdef _WIN32 WCHAR szPath[MAX_PATH]; if (SHGetSpecialFolderPath(NULL, szPath, CSIDL_PERSONAL, 0)) { return TFilePath(szPath); @@ -1101,7 +1101,7 @@ void DvDirModelNetworkNode::refreshChildren() if (!m_children.empty()) clearPointerContainer(m_children); -#ifdef WIN32 +#ifdef _WIN32 // Enumerate network nodes HANDLE enumHandle; @@ -1179,7 +1179,7 @@ void DvDirModelRootNode::refreshChildren() if (m_children.empty()) { addChild(m_myComputerNode = new DvDirModelMyComputerNode(this)); -#ifdef WIN32 +#ifdef _WIN32 addChild(m_networkNode = new DvDirModelNetworkNode(this)); #endif diff --git a/toonz/sources/toonz/flipbook.cpp b/toonz/sources/toonz/flipbook.cpp index caa980c..8d83441 100644 --- a/toonz/sources/toonz/flipbook.cpp +++ b/toonz/sources/toonz/flipbook.cpp @@ -93,7 +93,7 @@ #include // for uintptr_t -#ifdef WIN32 +#ifdef _WIN32 #include "avicodecrestrictions.h" #endif; @@ -365,7 +365,7 @@ LoadImagesPopup::LoadImagesPopup(FlipBook *flip) << "rgb" << "nol"; -#ifdef WIN32 +#ifdef _WIN32 m_appendFilterTypes << "avi"; #endif @@ -609,7 +609,7 @@ bool FlipBook::doSaveImages(TFilePath fp) return false; } -#ifdef WIN32 +#ifdef _WIN32 if (ext == "avi") { TPropertyGroup *props = outputSettings->getFileFormatProperties(ext); string codecName = props->getProperty(0)->getValueAsString(); diff --git a/toonz/sources/toonz/formatsettingspopups.cpp b/toonz/sources/toonz/formatsettingspopups.cpp index aa0aa18..eb073fb 100644 --- a/toonz/sources/toonz/formatsettingspopups.cpp +++ b/toonz/sources/toonz/formatsettingspopups.cpp @@ -13,7 +13,7 @@ #include "toonz/tcamera.h" #include "toutputproperties.h" -#ifdef WIN32 +#ifdef _WIN32 #include "avicodecrestrictions.h" #endif; @@ -37,7 +37,7 @@ FormatSettingsPopup::FormatSettingsPopup( QWidget *parent, const std::string &format, TPropertyGroup *props) : Dialog(parent), m_format(format), m_props(props), m_levelPath(TFilePath()) -#ifdef WIN32 +#ifdef _WIN32 , m_codecRestriction(0), m_codecComboBox(0), m_configureCodec(0) #endif @@ -67,7 +67,7 @@ FormatSettingsPopup::FormatSettingsPopup( assert(false); } -#ifdef WIN32 +#ifdef _WIN32 if (format == "avi") { m_codecRestriction = new QLabel(this); m_codecRestriction->setMinimumHeight(70); @@ -131,7 +131,7 @@ void FormatSettingsPopup::buildPropertyComboBox(int index, TPropertyGroup *props m_mainLayout->addWidget(new QLabel(tr(prop->getName().c_str()) + ":", this), row, 0, Qt::AlignRight | Qt::AlignVCenter); m_mainLayout->addWidget(comboBox, row, 1); -#ifdef WIN32 +#ifdef _WIN32 if (m_format == "avi") m_codecComboBox = comboBox; #endif; @@ -187,7 +187,7 @@ void FormatSettingsPopup::buildPropertyLineEdit(int index, TPropertyGroup *props //----------------------------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 void FormatSettingsPopup::onComboBoxIndexChanged(const QString codecName) { @@ -214,7 +214,7 @@ void FormatSettingsPopup::onAviCodecConfigure() void FormatSettingsPopup::showEvent(QShowEvent *se) { -#ifdef WIN32 +#ifdef _WIN32 if (m_format == "avi") { assert(m_codecComboBox); m_codecComboBox->blockSignals(true); diff --git a/toonz/sources/toonz/formatsettingspopups.h b/toonz/sources/toonz/formatsettingspopups.h index a1a63fb..3951385 100644 --- a/toonz/sources/toonz/formatsettingspopups.h +++ b/toonz/sources/toonz/formatsettingspopups.h @@ -50,7 +50,7 @@ private: QGridLayout *m_mainLayout; -#ifdef WIN32 +#ifdef _WIN32 // AVI codec - related members QLabel *m_codecRestriction; @@ -66,7 +66,7 @@ private: void buildPropertyLineEdit(int index, TPropertyGroup *props); void showEvent(QShowEvent *se); -#ifdef WIN32 +#ifdef _WIN32 private slots: diff --git a/toonz/sources/toonz/imageviewer.cpp b/toonz/sources/toonz/imageviewer.cpp index f3dc6c6..cde3e29 100644 --- a/toonz/sources/toonz/imageviewer.cpp +++ b/toonz/sources/toonz/imageviewer.cpp @@ -291,7 +291,7 @@ void ImageViewer::contextMenuEvent(QContextMenuEvent *event) fit->setShortcut(QKeySequence(CommandManager::instance()->getKeyFromId(V_ZoomFit))); connect(fit, SIGNAL(triggered()), SLOT(fitView())); -#ifdef WIN32 +#ifdef _WIN32 if (ImageUtils::FullScreenWidget *fsWidget = dynamic_cast(parentWidget())) { diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cpp index e34742b..e596b6e 100644 --- a/toonz/sources/toonz/main.cpp +++ b/toonz/sources/toonz/main.cpp @@ -132,7 +132,7 @@ const char *applicationName = "OpenToonz"; const char *applicationVersion = "1.0"; const char *dllRelativePath = "./toonz6.app/Contents/Frameworks"; -#ifdef WIN32 +#ifdef _WIN32 TEnv::StringVar EnvSoftwareCurrentFont("SoftwareCurrentFont", "Arial"); #else TEnv::StringVar EnvSoftwareCurrentFont("SoftwareCurrentFont", "Hervetica"); @@ -201,7 +201,7 @@ extern "C" void licenseObserverCB(char *msg) void toonzRunOutOfContMemHandler(unsigned long size) { -#ifdef WIN32 +#ifdef _WIN32 static bool firstTime = true; if (firstTime) { MessageBox(NULL, (LPCWSTR)L"Run out of contiguous physical memory: please save all and restart Toonz!", @@ -380,7 +380,7 @@ int main(int argc, char *argv[]) std::auto_ptr mainScope(new QObject(&a)); // A QObject destroyed before the qApp is therefore explicitly mainScope->setObjectName("mainScope"); // provided. It can be accessed by looking in the qApp's children. -#ifdef WIN32 +#ifdef _WIN32 #ifndef x64 //Store the floating point control word. It will be re-set before Toonz initialization //has ended. @@ -389,7 +389,7 @@ int main(int argc, char *argv[]) #endif #endif -#ifdef WIN32 +#ifdef _WIN32 //At least on windows, Qt's 4.5.2 native windows feature tend to create //weird flickering effects when dragging panel separators. a.setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); @@ -412,7 +412,7 @@ int main(int argc, char *argv[]) // splash screen QPixmap splashPixmap(":Resources/splash.png"); -#ifdef WIN32 +#ifdef _WIN32 a.setFont(QFont("Arial", 10)); #else a.setFont(QFont("Helvetica", 10)); @@ -696,7 +696,7 @@ int main(int argc, char *argv[]) TUndoManager::manager(), SIGNAL(somethingChanged()), TApp::instance()->getCurrentScene(), SLOT(setDirtyFlag())); -#ifdef WIN32 +#ifdef _WIN32 #ifndef x64 //On 32-bit architecture, there could be cases in which initialization could alter the //FPU floating point control word. I've seen this happen when loading some AVI coded (VFAPI), @@ -716,7 +716,7 @@ int main(int argc, char *argv[]) TUndoManager::manager()->reset(); PreviewFxManager::instance()->reset(); -#ifdef WIN32 +#ifdef _WIN32 if (consoleAttached) { ::FreeConsole(); } diff --git a/toonz/sources/toonz/rendercommand.cpp b/toonz/sources/toonz/rendercommand.cpp index 4efcfb7..dc13df1 100644 --- a/toonz/sources/toonz/rendercommand.cpp +++ b/toonz/sources/toonz/rendercommand.cpp @@ -31,7 +31,7 @@ #include "toonz/multimediarenderer.h" #include "toutputproperties.h" -#ifdef WIN32 +#ifdef _WIN32 #include "avicodecrestrictions.h" #endif @@ -530,7 +530,7 @@ void RenderCommand::rasterRender(bool isPreview) string ext = m_fp.getType(); -#ifdef WIN32 +#ifdef _WIN32 if (ext == "avi" && !isPreview) { TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext); string codecName = props->getProperty(0)->getValueAsString(); @@ -740,7 +740,7 @@ void RenderCommand::multimediaRender() ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene(); string ext = m_fp.getType(); -#ifdef WIN32 +#ifdef _WIN32 if (ext == "avi") { TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext); string codecName = props->getProperty(0)->getValueAsString(); diff --git a/toonz/sources/toonz/sceneviewer.cpp b/toonz/sources/toonz/sceneviewer.cpp index 29467a9..efa7560 100644 --- a/toonz/sources/toonz/sceneviewer.cpp +++ b/toonz/sources/toonz/sceneviewer.cpp @@ -1015,7 +1015,7 @@ void SceneViewer::drawBackground() if (glGetError() == GL_INVALID_FRAMEBUFFER_OPERATION) { /* 起動時一回目になぜか GL_FRAMEBUFFER_COMPLETE なのに invalid operation が出る */ GLenum status = 0; -#if WIN32 +#ifdef _WIN32 PROC proc = wglGetProcAddress("glCheckFramebufferStatusEXT"); if (proc != nullptr) status = reinterpret_cast(proc)(GL_FRAMEBUFFER); @@ -1028,7 +1028,7 @@ void SceneViewer::drawBackground() bool check_framebuffer_status() { -#if WIN32 +#ifdef _WIN32 PROC proc = wglGetProcAddress("glCheckFramebufferStatusEXT"); if (proc == nullptr) return true; diff --git a/toonz/sources/toonz/sceneviewerevents.cpp b/toonz/sources/toonz/sceneviewerevents.cpp index cbee6af..9a20034 100644 --- a/toonz/sources/toonz/sceneviewerevents.cpp +++ b/toonz/sources/toonz/sceneviewerevents.cpp @@ -957,7 +957,7 @@ using namespace ImageUtils; void SceneViewer::contextMenuEvent(QContextMenuEvent *e) { -#ifndef WIN32 +#ifndef _WIN32 /* On windows the widget receive the release event before the menu is shown, on linux and osx the release event is lost, never received by the widget */ diff --git a/toonz/sources/toonz/xshcellviewer.cpp b/toonz/sources/toonz/xshcellviewer.cpp index 5225407..b771c3f 100644 --- a/toonz/sources/toonz/xshcellviewer.cpp +++ b/toonz/sources/toonz/xshcellviewer.cpp @@ -1048,7 +1048,7 @@ void CellArea::drawLevelCell(QPainter &p, int row, int col, bool isReference) isRed = true; p.setPen(isRed ? m_viewer->getSelectedColumnTextColor() : m_viewer->getTextColor()); -#ifdef WIN32 +#ifdef _WIN32 static QFont font("Arial", XSHEET_FONT_SIZE, QFont::Normal); #else static QFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal); @@ -1256,7 +1256,7 @@ void CellArea::drawPaletteCell(QPainter &p, int row, int col, bool isReference) p.setPen(isRed ? m_viewer->getSelectedColumnTextColor() : m_viewer->getTextColor()); // il nome va scritto se e' diverso dalla cella precedente oppure se // siamo su una marker line -#ifndef WIN32 +#ifndef _WIN32 static QFont font("Arial", XSHEET_FONT_SIZE, QFont::Normal); #else static QFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal); diff --git a/toonz/sources/toonz/xshcolumnviewer.cpp b/toonz/sources/toonz/xshcolumnviewer.cpp index c5e60e9..0a28dc2 100644 --- a/toonz/sources/toonz/xshcolumnviewer.cpp +++ b/toonz/sources/toonz/xshcolumnviewer.cpp @@ -597,7 +597,7 @@ void ColumnArea::drawLevelColumnHead(QPainter &p, int col) TColumnSelection *selection = m_viewer->getColumnSelection(); // Preparing painter -#ifdef WIN32 +#ifdef _WIN32 QFont font("Arial", XSHEET_FONT_SIZE, QFont::Normal); #else QFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal); @@ -942,7 +942,7 @@ void ColumnArea::drawPaletteColumnHead(QPainter &p, int col) { TColumnSelection *selection = m_viewer->getColumnSelection(); -#ifdef WIN32 +#ifdef _WIN32 QFont font("Arial", XSHEET_FONT_SIZE, QFont::Normal); #else QFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal); diff --git a/toonz/sources/toonz/xsheetviewer.h b/toonz/sources/toonz/xsheetviewer.h index b40f36f..464826a 100644 --- a/toonz/sources/toonz/xsheetviewer.h +++ b/toonz/sources/toonz/xsheetviewer.h @@ -13,7 +13,7 @@ #include "cellkeyframeselection.h" #include "toonzqt/spreadsheetviewer.h" -#ifdef WIN32 +#ifdef _WIN32 #define XSHEET_FONT_SIZE 9 #define H_ADJUST 2 #else diff --git a/toonz/sources/toonz/xshrowviewer.cpp b/toonz/sources/toonz/xshrowviewer.cpp index 4cf5860..c53fe61 100644 --- a/toonz/sources/toonz/xshrowviewer.cpp +++ b/toonz/sources/toonz/xshrowviewer.cpp @@ -71,7 +71,7 @@ void RowArea::drawRows(QPainter &p, int r0, int r1) playR0 = 0; } -#ifdef WIN32 +#ifdef _WIN32 static QFont font("Arial", XSHEET_FONT_SIZE, QFont::Bold); #else static QFont font("Helvetica", XSHEET_FONT_SIZE, QFont::Normal); diff --git a/toonz/sources/toonzfarm/include/service.h b/toonz/sources/toonzfarm/include/service.h index 5e20d3d..9390df2 100644 --- a/toonz/sources/toonzfarm/include/service.h +++ b/toonz/sources/toonzfarm/include/service.h @@ -15,7 +15,7 @@ using namespace std; #undef TFARMAPI #endif -#ifdef WIN32 +#ifdef _WIN32 #ifdef TFARM_EXPORTS #define TFARMAPI __declspec(dllexport) #else diff --git a/toonz/sources/toonzfarm/include/tfarmexecutor.h b/toonz/sources/toonzfarm/include/tfarmexecutor.h index b39c0fa..d1c2da7 100644 --- a/toonz/sources/toonzfarm/include/tfarmexecutor.h +++ b/toonz/sources/toonzfarm/include/tfarmexecutor.h @@ -14,7 +14,7 @@ using std::string; #undef TFARMAPI #endif -#ifdef WIN32 +#ifdef _WIN32 #ifdef TFARM_EXPORTS #define TFARMAPI __declspec(dllexport) #else diff --git a/toonz/sources/toonzfarm/include/tfarmproxy.h b/toonz/sources/toonzfarm/include/tfarmproxy.h index cd8c5a8..dd1d955 100644 --- a/toonz/sources/toonzfarm/include/tfarmproxy.h +++ b/toonz/sources/toonzfarm/include/tfarmproxy.h @@ -14,7 +14,7 @@ using std::vector; #include "texception.h" -#ifdef WIN32 +#ifdef _WIN32 #ifdef TFARM_EXPORTS #define TFARMAPI __declspec(dllexport) #else diff --git a/toonz/sources/toonzfarm/include/tlog.h b/toonz/sources/toonzfarm/include/tlog.h index a489eea..ecc6e49 100644 --- a/toonz/sources/toonzfarm/include/tlog.h +++ b/toonz/sources/toonzfarm/include/tlog.h @@ -12,7 +12,7 @@ class TFilePath; #undef TFARMAPI #endif -#ifdef WIN32 +#ifdef _WIN32 #ifdef TFARM_EXPORTS #define TFARMAPI __declspec(dllexport) #else diff --git a/toonz/sources/toonzfarm/tfarm/service.cpp b/toonz/sources/toonzfarm/tfarm/service.cpp index 7fcc4eb..141c551 100644 --- a/toonz/sources/toonzfarm/tfarm/service.cpp +++ b/toonz/sources/toonzfarm/tfarm/service.cpp @@ -6,7 +6,7 @@ #include "tfilepath.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include #include @@ -20,7 +20,7 @@ #define SZDEPENDENCIES "" -#ifdef WIN32 +#ifdef _WIN32 //------------------------------------------------------------------------------ @@ -52,14 +52,14 @@ LPTSTR GetLastErrorText(LPTSTR lpszBuf, DWORD dwSize) return lpszBuf; } -#endif // WIN32 +#endif // _WIN32 //------------------------------------------------------------------------------ string getLastErrorText() { string errText; -#ifdef WIN32 +#ifdef _WIN32 char errBuff[256]; errText = GetLastErrorText(errBuff, sizeof(errBuff)); #else @@ -79,7 +79,7 @@ class TService::Imp public: Imp() {} -#ifdef WIN32 +#ifdef _WIN32 static void WINAPI serviceMain(DWORD dwArgc, LPTSTR *lpszArgv); static void WINAPI serviceCtrl(DWORD dwCtrlCode); @@ -93,7 +93,7 @@ public: string m_displayName; static bool m_console; -#ifdef WIN32 +#ifdef _WIN32 static SERVICE_STATUS_HANDLE m_hService; static SERVICE_STATUS m_ssStatus; // current status of the service static DWORD m_dwErr; @@ -101,7 +101,7 @@ public: #endif }; -#ifdef WIN32 +#ifdef _WIN32 SERVICE_STATUS_HANDLE TService::Imp::m_hService = 0; SERVICE_STATUS TService::Imp::m_ssStatus; DWORD TService::Imp::m_dwErr = 0; @@ -140,7 +140,7 @@ TService *TService::m_instance = 0; void TService::setStatus(Status status, long exitCode, long waitHint) { -#ifdef WIN32 +#ifdef _WIN32 if (!isRunningAsConsoleApp()) TService::Imp::reportStatusToSCMgr(status, exitCode, waitHint); else { @@ -169,7 +169,7 @@ string TService::getDisplayName() const //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 void WINAPI TService::Imp::serviceCtrl(DWORD dwCtrlCode) { @@ -379,7 +379,7 @@ void TService::run(int argc, char *argv[], bool console) #endif */ -#ifdef WIN32 +#ifdef _WIN32 if (console) { _tprintf(TEXT("Starting %s.\n"), TService::instance()->getDisplayName().c_str()); @@ -427,7 +427,7 @@ bool TService::isRunningAsConsoleApp() const void TService::install(const string &name, const string &displayName, const TFilePath &appPath) { -#ifdef WIN32 +#ifdef _WIN32 SC_HANDLE schService; SC_HANDLE schSCManager; @@ -469,7 +469,7 @@ void TService::install(const string &name, const string &displayName, const TFil void TService::remove(const string &name) { -#ifdef WIN32 +#ifdef _WIN32 string displayName = name; SC_HANDLE schService; @@ -531,7 +531,7 @@ void TService::addToMessageLog(const QString &msg) void TService::addToMessageLog(const string &msg) { -#ifdef WIN32 +#ifdef _WIN32 TCHAR szMsg[256]; HANDLE hEventSource; LPCTSTR lpszStrings[2]; diff --git a/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp b/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp index 2e366c9..3c5838f 100644 --- a/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp +++ b/toonz/sources/toonzfarm/tfarm/tfarmtask.cpp @@ -342,7 +342,7 @@ QString getExeName(bool isComposer) { QString name = isComposer ? "tcomposer" : "tcleanup"; -#ifdef WIN32 +#ifdef _WIN32 return name + ".exe "; #else return "\"./Toonz 7.1.app/Contents/MacOS/" + name + "\" "; diff --git a/toonz/sources/toonzfarm/tfarm/tlog.cpp b/toonz/sources/toonzfarm/tfarm/tlog.cpp index 1c7457c..ed687f0 100644 --- a/toonz/sources/toonzfarm/tfarm/tlog.cpp +++ b/toonz/sources/toonzfarm/tfarm/tlog.cpp @@ -5,7 +5,7 @@ #include "tfilepath_io.h" #include -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include #include @@ -33,7 +33,7 @@ enum LEVEL { LEVEL_INFO }; -#ifdef WIN32 +#ifdef _WIN32 WORD Level2WinEventType(LEVEL level) { switch (level) { @@ -71,7 +71,7 @@ int Level2XPriority(LEVEL level) void notify(LEVEL level, const QString &msg) { -#ifdef WIN32 +#ifdef _WIN32 TCHAR buf[_MAX_PATH + 1]; GetModuleFileName(0, buf, _MAX_PATH); diff --git a/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp b/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp index 1abe361..0ae72e5 100644 --- a/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp +++ b/toonz/sources/toonzfarm/tfarm/ttcpipclient.cpp @@ -3,7 +3,7 @@ #include "ttcpip.h" #include "tconvert.h" -#ifdef WIN32 +#ifdef _WIN32 #include #else #include /* obligatory includes */ @@ -17,7 +17,7 @@ #include #endif -#ifndef WIN32 +#ifndef _WIN32 #define SOCKET_ERROR -1 #endif @@ -25,7 +25,7 @@ TTcpIpClient::TTcpIpClient() { -#ifdef WIN32 +#ifdef _WIN32 WSADATA wsaData; WORD wVersionRequested = MAKEWORD(1, 1); int irc = WSAStartup(wVersionRequested, &wsaData); @@ -36,7 +36,7 @@ TTcpIpClient::TTcpIpClient() TTcpIpClient::~TTcpIpClient() { -#ifdef WIN32 +#ifdef _WIN32 WSACleanup(); #endif } @@ -57,7 +57,7 @@ int TTcpIpClient::connect(const QString &hostName, const QString &addrStr, int p struct hostent *he = gethostbyname(hostName.toAscii()); #endif if (!he) { -#ifdef WIN32 +#ifdef _WIN32 int err = WSAGetLastError(); #else #endif @@ -76,7 +76,7 @@ int TTcpIpClient::connect(const QString &hostName, const QString &addrStr, int p if (rcConnect == SOCKET_ERROR) { sock = -1; -#ifdef WIN32 +#ifdef _WIN32 int err = WSAGetLastError(); switch (err) { case WSAECONNREFUSED: @@ -108,7 +108,7 @@ int TTcpIpClient::connect(const string &hostName, const string &addrStr, int por struct hostent *he = gethostbyname (hostName.c_str()); if (!he) { -#ifdef WIN32 +#ifdef _WIN32 int err = WSAGetLastError(); #else #endif @@ -127,7 +127,7 @@ int TTcpIpClient::connect(const string &hostName, const string &addrStr, int por if (rcConnect == SOCKET_ERROR) { sock = -1; -#ifdef WIN32 +#ifdef _WIN32 int err = WSAGetLastError(); switch (err) { @@ -152,7 +152,7 @@ int TTcpIpClient::connect(const string &hostName, const string &addrStr, int por int TTcpIpClient::disconnect(int sock) { -#ifdef WIN32 +#ifdef _WIN32 closesocket(sock); #else close(sock); @@ -178,7 +178,7 @@ int TTcpIpClient::send(int sock, const QString &data) int nLeft = packet.size(); int idx = 0; while (nLeft > 0) { -#ifdef WIN32 +#ifdef _WIN32 int ret = ::send(sock, packet.c_str() + idx, nLeft, 0); #else int ret = write(sock, packet.c_str() + idx, nLeft); @@ -186,7 +186,7 @@ int TTcpIpClient::send(int sock, const QString &data) if (ret == SOCKET_ERROR) { // Error -#ifdef WIN32 +#ifdef _WIN32 int err = WSAGetLastError(); #else #endif @@ -208,7 +208,7 @@ int readData(int sock, QString &data) char buff[1024]; memset(buff, 0, sizeof(buff)); -#ifdef WIN32 +#ifdef _WIN32 if ((cnt = recv(sock, buff, sizeof(buff), 0)) < 0) { int err = WSAGetLastError(); // GESTIRE L'ERRORE SPECIFICO @@ -243,7 +243,7 @@ int readData(int sock, QString &data) while (size > 0) { memset(buff, 0, sizeof(buff)); -#ifdef WIN32 +#ifdef _WIN32 if ((cnt = recv(sock, buff, sizeof(buff), 0)) < 0) { int err = WSAGetLastError(); // GESTIRE L'ERRORE SPECIFICO @@ -286,7 +286,7 @@ int readData(int sock, string &data) { memset (buff,0,sizeof(buff)); -#ifdef WIN32 +#ifdef _WIN32 if (( cnt = recv(sock, buff, sizeof(buff), 0)) < 0 ) { int err = WSAGetLastError(); @@ -327,7 +327,7 @@ int readData(int sock, string &data) do { memset(buff, 0, sizeof(buff)); -#ifdef WIN32 +#ifdef _WIN32 if ((cnt = recv(sock, buff, sizeof(buff), 0)) < 0) { int err = WSAGetLastError(); // GESTIRE L'ERRORE SPECIFICO diff --git a/toonz/sources/toonzfarm/tfarm/ttcpipserver.cpp b/toonz/sources/toonzfarm/tfarm/ttcpipserver.cpp index 8b200ce..d78f8da 100644 --- a/toonz/sources/toonzfarm/tfarm/ttcpipserver.cpp +++ b/toonz/sources/toonzfarm/tfarm/ttcpipserver.cpp @@ -3,7 +3,7 @@ #include "ttcpip.h" #include "tconvert.h" -#ifdef WIN32 +#ifdef _WIN32 #include #else #include /* obligatory includes */ @@ -19,7 +19,7 @@ #include "tthreadmessage.h" #include "tthread.h" -#ifndef WIN32 +#ifndef _WIN32 #define SOCKET_ERROR -1 #endif @@ -62,7 +62,7 @@ int TTcpIpServerImp::readData(int sock, QString &data) char buff[1025]; memset(buff, 0, sizeof(buff)); -#ifdef WIN32 +#ifdef _WIN32 if ((cnt = recv(sock, buff, sizeof(buff) - 1, 0)) < 0) { int err = WSAGetLastError(); // GESTIRE L'ERRORE SPECIFICO @@ -103,7 +103,7 @@ int TTcpIpServerImp::readData(int sock, QString &data) while (size > 0) { memset(buff, 0, sizeof(buff)); -#ifdef WIN32 +#ifdef _WIN32 if ((cnt = recv(sock, buff, sizeof(buff) - 1, 0)) < 0) { int err = WSAGetLastError(); // GESTIRE L'ERRORE SPECIFICO @@ -161,7 +161,7 @@ int TTcpIpServerImp::readData(int sock, string &data) { memset (buff,0,sizeof(buff)); -#ifdef WIN32 +#ifdef _WIN32 if (( cnt = recv(sock, buff, sizeof(buff), 0)) < 0 ) { int err = WSAGetLastError(); @@ -202,7 +202,7 @@ int TTcpIpServerImp::readData(int sock, string &data) do { memset(buff, 0, sizeof(buff)); -#ifdef WIN32 +#ifdef _WIN32 if ((cnt = recv(sock, buff, sizeof(buff), 0)) < 0) { int err = WSAGetLastError(); // GESTIRE L'ERRORE SPECIFICO @@ -246,7 +246,7 @@ TTcpIpServer::TTcpIpServer(int port) { m_imp->m_server = this; -#ifdef WIN32 +#ifdef _WIN32 // Windows Socket startup WSADATA wsaData; WORD wVersionRequested = MAKEWORD(1, 1); @@ -261,7 +261,7 @@ TTcpIpServer::TTcpIpServer(int port) TTcpIpServer::~TTcpIpServer() { if (m_imp->m_s != -1) -#ifdef WIN32 +#ifdef _WIN32 closesocket(m_imp->m_s); WSACleanup(); #else @@ -307,7 +307,7 @@ void DataReader::run() Sthutdown = true; else m_serverImp->onReceive(m_clientSocket, data); -#ifdef WIN32 +#ifdef _WIN32 closesocket(m_clientSocket); #else close(m_clientSocket); @@ -335,7 +335,7 @@ public: void DataReceiver::run() { m_serverImp->onReceive(m_clientSocket, m_data); -#ifdef WIN32 +#ifdef _WIN32 closesocket(m_clientSocket); #else close(m_clientSocket); @@ -347,7 +347,7 @@ void DataReceiver::run() void TTcpIpServer::run() { try { -#ifdef WIN32 +#ifdef _WIN32 int err = establish(m_imp->m_port, m_imp->m_s); if (!err && m_imp->m_s != -1) { @@ -382,7 +382,7 @@ void TTcpIpServer::run() return; } -#else // !WIN32 +#else // !_WIN32 int err = establish(m_imp->m_port, m_imp->m_s); if (!err && m_imp->m_s != -1) { @@ -417,7 +417,7 @@ void TTcpIpServer::run() return; } -#endif // WIN32 +#endif // _WIN32 } catch (...) { m_exitCode = 2000; return; @@ -450,7 +450,7 @@ void TTcpIpServer::sendReply(int socket, const QString &reply) int nLeft = packet.size(); int idx = 0; while (nLeft > 0) { -#ifdef WIN32 +#ifdef _WIN32 int ret = send(socket, packet.c_str() + idx, nLeft, 0); #else int ret = write(socket, packet.c_str() + idx, nLeft); @@ -485,7 +485,7 @@ int establish(unsigned short portnum, int &sock) sa.sin_port = htons(portnum); /* this is our port number */ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) /* create socket */ { -#ifdef WIN32 +#ifdef _WIN32 int err = WSAGetLastError(); return err; #else @@ -494,7 +494,7 @@ int establish(unsigned short portnum, int &sock) } if (::bind(sock, (struct sockaddr *)&sa, sizeof(struct sockaddr_in)) < 0) { -#ifdef WIN32 +#ifdef _WIN32 int err = WSAGetLastError(); closesocket(sock); return err; @@ -519,7 +519,7 @@ int get_connection(int s) return (t); } -#ifndef WIN32 +#ifndef _WIN32 //----------------------------------------------------------------------- /* as children die we should get catch their returns or else we get * zombies, A Bad Thing. fireman() catches falling children. diff --git a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp index 5a9f70f..6f55f56 100644 --- a/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp +++ b/toonz/sources/toonzfarm/tfarmcontroller/tfarmcontroller.cpp @@ -23,7 +23,7 @@ #include using namespace std; -#ifndef WIN32 +#ifndef _WIN32 #include #include #include @@ -39,14 +39,14 @@ int inline STRICMP(const char *a, const char *b) return str.compare(QString(b), Qt::CaseSensitive); } /* -#ifdef WIN32 +#ifdef _WIN32 #define STRICMP stricmp #else #define STRICMP strcasecmp #endif */ -#ifndef WIN32 +#ifndef _WIN32 #define NO_ERROR 0 #endif @@ -59,7 +59,7 @@ TFilePath getGlobalRoot() { TFilePath rootDir; -#ifdef WIN32 +#ifdef _WIN32 TFilePath name(L"SOFTWARE\\OpenToonz\\OpenToonz\\1.0\\FARMROOT"); rootDir = TFilePath(TSystem::getSystemValue(name).toStdString()); #else @@ -94,7 +94,7 @@ TFilePath getLocalRoot() { TFilePath lroot; -#ifdef WIN32 +#ifdef _WIN32 TFilePath name(L"SOFTWARE\\OpenToonz\\OpenToonz\\1.0\\TOONZROOT"); lroot = TFilePath(TSystem::getSystemValue(name).toStdString()) + TFilePath("toonzfarm"); #else @@ -132,7 +132,7 @@ TFilePath getLocalRoot() bool myDoesExists(const TFilePath &fp) { bool exists = false; -#ifdef WIN32 +#ifdef _WIN32 TFileStatus fs(fp); exists = fs.doesExist(); #else @@ -147,7 +147,7 @@ bool myDoesExists(const TFilePath &fp) bool dirExists(const TFilePath &dirFp) { bool exists = false; -#ifdef WIN32 +#ifdef _WIN32 TFileStatus fs(dirFp); exists = fs.isDirectory(); #else @@ -179,7 +179,7 @@ bool isAScript(TFarmTask *task) { return false; //todo per gli script /* -#ifdef WIN32 +#ifdef _WIN32 return task->m_cmdline.contains(".bat"); #else return (task->m_cmdline.contains(".csh")|| @@ -483,7 +483,7 @@ bool doTestConnection(const QString &hostName, const QString &addr, int port) int sock; int ret = client.connect(hostName, addr, port, sock); if (ret == OK) { -#ifdef WIN32 +#ifdef _WIN32 closesocket(sock); #else close(sock); @@ -494,7 +494,7 @@ bool doTestConnection(const QString &hostName, const QString &addr, int port) } //------------------------------------------------------------------------------ -#ifdef WIN32 +#ifdef _WIN32 class ConnectionTest : public TThread::Runnable { public: @@ -521,7 +521,7 @@ void ConnectionTest::run() bool FarmServerProxy::testConnection(int timeout) { -#ifdef WIN32 +#ifdef _WIN32 HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); if (!hEvent) { @@ -550,7 +550,7 @@ bool FarmServerProxy::testConnection(int timeout) int sock; int ret = client.connect(m_hostName, m_addr, m_port, sock); if (ret == OK) { -#ifdef WIN32 +#ifdef _WIN32 closesocket(sock); #else close(sock); @@ -2524,7 +2524,7 @@ int main(int argc, char **argv) if (!usage.parse(argc, argv)) exit(1); -#ifdef WIN32 +#ifdef _WIN32 if (installQualifier.isSelected()) { char szPath[512]; diff --git a/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp b/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp index fc74e17..f0b2b4a 100644 --- a/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp +++ b/toonz/sources/toonzfarm/tfarmserver/tfarmserver.cpp @@ -22,7 +22,7 @@ #include "tthread.h" -#ifdef WIN32 +#ifdef _WIN32 #include using namespace std; #else @@ -33,7 +33,7 @@ using namespace std; //#define REDIRECT_OUPUT -#ifdef WIN32 +#ifdef _WIN32 #define QUOTE_STR "\"" #define CASMPMETER "casmpmeter.exe" #else @@ -41,7 +41,7 @@ using namespace std; #define CASMPMETER "casmpmeter" #endif -#ifndef WIN32 +#ifndef _WIN32 #define NO_ERROR 0 #endif @@ -66,7 +66,7 @@ TFilePath getGlobalRoot() { TFilePath rootDir; -#ifdef WIN32 +#ifdef _WIN32 TFilePath name(L"SOFTWARE\\OpenToonz\\OpenToonz\\1.0\\FARMROOT"); rootDir = TFilePath(TSystem::getSystemValue(name).toStdString()); #else @@ -101,7 +101,7 @@ TFilePath getLocalRoot() { TFilePath lroot; -#ifdef WIN32 +#ifdef _WIN32 TFilePath name("SOFTWARE\\OpenToonz\\OpenToonz\\1.0\\TOONZROOT"); lroot = TFilePath(TSystem::getSystemValue(name).toStdString()) + TFilePath("toonzfarm"); #else @@ -140,7 +140,7 @@ TFilePath getAppsCfgFilePath() TFilePath getBinRoot() { -#ifdef WIN32 +#ifdef _WIN32 return TSystem::getBinDir(); #else return getLocalRoot() + "bin"; @@ -151,7 +151,7 @@ TFilePath getBinRoot() /* string myGetHostName() { -#ifdef WIN32 +#ifdef _WIN32 return TSystem::getHostName(); #else char hostName[MAXHOSTNAMELEN]; @@ -165,7 +165,7 @@ string myGetHostName() bool dirExists(const TFilePath &dirFp) { bool exists = false; -#ifdef WIN32 +#ifdef _WIN32 TFileStatus fs(dirFp); exists = fs.isDirectory(); #else @@ -180,7 +180,7 @@ bool dirExists(const TFilePath &dirFp) bool myDoesExists(const TFilePath &fp) { bool exists = false; -#ifdef WIN32 +#ifdef _WIN32 TFileStatus fs(fp); exists = fs.doesExist(); #else @@ -217,7 +217,7 @@ public: void onStop(); void loadControllerData(QString &hostName, string &ipAddr, int &port); -#ifdef WIN32 +#ifdef _WIN32 void loadDiskMountingPoints(const TFilePath &fp); void mountDisks(); @@ -421,7 +421,7 @@ void Task::run() // =========== -#ifdef WIN32 +#ifdef _WIN32 if (m_cmdline.contains("runcasm")) service.mountDisks(); #endif @@ -648,7 +648,7 @@ int FarmServer::addTask(const QString &id, const QString &cmdline) int FarmServer::terminateTask(const QString &taskid) { -#ifdef WIN32 +#ifdef _WIN32 HANDLE hJob = OpenJobObject( MAXIMUM_ALLOWED, // access right TRUE, // inheritance state @@ -681,7 +681,7 @@ int FarmServer::getTasks(vector &tasks) void FarmServer::queryHwInfo(HwInfo &hwInfo) { -#ifdef WIN32 +#ifdef _WIN32 MEMORYSTATUS buff; GlobalMemoryStatus(&buff); @@ -790,7 +790,7 @@ bool loadServerData(const QString &hostname, QString &addr, int &port) TFilePath fp = rootDir + "config" + "servers.txt"; -#ifndef WIN32 +#ifndef _WIN32 int acc = access(toString(fp.getWideString()).c_str(), 00); // 00 == solo esistenza bool fileExists = acc != -1; if (!fileExists) @@ -834,7 +834,7 @@ void FarmServerService::onStart(int argc, char *argv[]) // Initialize thread components TThread::init(); -#ifdef WIN32 +#ifdef _WIN32 // DebugBreak(); #endif @@ -950,7 +950,7 @@ void FarmServerService::onStart(int argc, char *argv[]) } catch (TException & /*e*/) { } -#ifdef WIN32 +#ifdef _WIN32 TFilePath diskMountingsFilePath = lRootDir + "config" + "diskmap.cfg"; if (myDoesExists(diskMountingsFilePath)) { loadDiskMountingPoints(diskMountingsFilePath); @@ -1008,7 +1008,7 @@ void FarmServerService::onStart(int argc, char *argv[]) string msg("An error occurred starting the ToonzFarm Server"); msg += "\n"; -#ifdef WIN32 +#ifdef _WIN32 LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | @@ -1051,7 +1051,7 @@ void FarmServerService::onStop() // i dischi vengono montati al primo task di tipo "runcasm" // e smontati allo stop del servizio -#ifdef WIN32 +#ifdef _WIN32 unmountDisks(); #endif @@ -1064,7 +1064,7 @@ void FarmServerService::onStop() } } -#ifdef WIN32 +#ifdef _WIN32 //------------------------------------------------------------------------------ @@ -1210,7 +1210,7 @@ int main(int argc, char **argv) if (!usage.parse(argc, argv)) exit(1); -#ifdef WIN32 +#ifdef _WIN32 if (installQualifier.isSelected()) { char szPath[512]; diff --git a/toonz/sources/toonzlib/cleanupparameters.cpp b/toonz/sources/toonzlib/cleanupparameters.cpp index 5f07208..5692ce6 100644 --- a/toonz/sources/toonzlib/cleanupparameters.cpp +++ b/toonz/sources/toonzlib/cleanupparameters.cpp @@ -12,7 +12,7 @@ #include "cleanuppalette.h" #include "tpalette.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.cpp b/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.cpp index 82410be..0af80d1 100644 --- a/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/BlurMatrix.cpp @@ -3,7 +3,7 @@ // BlurMatrix.cpp: implementation of the CBlurMatrix class. // ////////////////////////////////////////////////////////////////////// -#ifdef WIN32 +#ifdef _WIN32 #include "Windows.h" #else #ifdef __sgi diff --git a/toonz/sources/toonzlib/sandor_fxs/CIL.cpp b/toonz/sources/toonzlib/sandor_fxs/CIL.cpp index 564fd85..0991275 100644 --- a/toonz/sources/toonzlib/sandor_fxs/CIL.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/CIL.cpp @@ -3,7 +3,7 @@ // CIL.cpp: implementation of the CCIL class. // ////////////////////////////////////////////////////////////////////// -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/toonzlib/sandor_fxs/InputParam.h b/toonz/sources/toonzlib/sandor_fxs/InputParam.h index 06cd8be..f7d2366 100644 --- a/toonz/sources/toonzlib/sandor_fxs/InputParam.h +++ b/toonz/sources/toonzlib/sandor_fxs/InputParam.h @@ -11,7 +11,7 @@ #pragma once #endif // _MSC_VER > 1000 -#ifdef WIN32 +#ifdef _WIN32 #include "Windows.h" #endif #include diff --git a/toonz/sources/toonzlib/sandor_fxs/Params.h b/toonz/sources/toonzlib/sandor_fxs/Params.h index 1541b11..9a48740 100644 --- a/toonz/sources/toonzlib/sandor_fxs/Params.h +++ b/toonz/sources/toonzlib/sandor_fxs/Params.h @@ -11,7 +11,7 @@ #pragma once #endif // _MSC_VER > 1000 -#ifdef WIN32 +#ifdef _WIN32 #include "Windows.h" #endif #include diff --git a/toonz/sources/toonzlib/sandor_fxs/Pattern.cpp b/toonz/sources/toonzlib/sandor_fxs/Pattern.cpp index c8ebad3..905d0fb 100644 --- a/toonz/sources/toonzlib/sandor_fxs/Pattern.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/Pattern.cpp @@ -3,7 +3,7 @@ // Pattern.cpp: implementation of the CPattern class. // ////////////////////////////////////////////////////////////////////// -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/toonzlib/sandor_fxs/PatternMapParam.cpp b/toonz/sources/toonzlib/sandor_fxs/PatternMapParam.cpp index a2d8f34..74ecf2b 100644 --- a/toonz/sources/toonzlib/sandor_fxs/PatternMapParam.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/PatternMapParam.cpp @@ -4,7 +4,7 @@ // ////////////////////////////////////////////////////////////////////// -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif #include diff --git a/toonz/sources/toonzlib/sandor_fxs/PatternPosition.cpp b/toonz/sources/toonzlib/sandor_fxs/PatternPosition.cpp index 5a9bd42..fa158a3 100644 --- a/toonz/sources/toonzlib/sandor_fxs/PatternPosition.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/PatternPosition.cpp @@ -4,7 +4,7 @@ // ////////////////////////////////////////////////////////////////////// -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h index 6d1b237..a2a6ea8 100644 --- a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h +++ b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h @@ -15,7 +15,7 @@ #pragma once #endif // _MSC_VER > 1000 -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif #include diff --git a/toonz/sources/toonzlib/sandor_fxs/YOMBInputParam.cpp b/toonz/sources/toonzlib/sandor_fxs/YOMBInputParam.cpp index 4357333..a4b6a1e 100644 --- a/toonz/sources/toonzlib/sandor_fxs/YOMBInputParam.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/YOMBInputParam.cpp @@ -10,7 +10,7 @@ #include #include "YOMBInputParam.h" //#include "tmsg.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif ////////////////////////////////////////////////////////////////////// diff --git a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.cpp b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.cpp index e1aa37a..da2fdb8 100644 --- a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.cpp @@ -3,7 +3,7 @@ // YOMBParam.cpp: implementation of the CYOMBParam class. // ////////////////////////////////////////////////////////////////////// -#ifdef WIN32 +#ifdef _WIN32 #include "Windows.h" #endif #include @@ -72,7 +72,7 @@ void CYOMBParam::null() m_color.resize(0); } -#ifdef WIN32 +#ifdef _WIN32 bool CYOMBParam::read(basic_ifstream &in) { char token[1000] = ""; diff --git a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h index bcce4cc..1c92e8e 100644 --- a/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h +++ b/toonz/sources/toonzlib/sandor_fxs/YOMBParam.h @@ -80,7 +80,7 @@ public: void print(); void null(); void read(const CInputParam &ip); -#ifdef WIN32 +#ifdef _WIN32 bool read(basic_ifstream &in); #endif void makeColorsUS(); diff --git a/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp b/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp index 6e29095..b2a2084 100644 --- a/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/calligraph.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include "windows.h" #endif diff --git a/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp b/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp index 83fc4d6..9ef7c5d 100644 --- a/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/patternmap.cpp @@ -1,6 +1,6 @@ -#ifdef WIN32 +#ifdef _WIN32 #include "Windows.h" #endif #include diff --git a/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp b/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp index 53baf05..0d8f851 100644 --- a/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp +++ b/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp @@ -5,7 +5,7 @@ #include "tconvert.h" #include "toonz4.6/toonz.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #endif //--------------------------------------------------------------------- diff --git a/toonz/sources/toonzlib/screensavermaker.cpp b/toonz/sources/toonzlib/screensavermaker.cpp index 1234e92..360aff8 100644 --- a/toonz/sources/toonzlib/screensavermaker.cpp +++ b/toonz/sources/toonzlib/screensavermaker.cpp @@ -5,7 +5,7 @@ #include "tsystem.h" -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include diff --git a/toonz/sources/toonzlib/tcolumnfx.cpp b/toonz/sources/toonzlib/tcolumnfx.cpp index 2d75e7d..be90606 100644 --- a/toonz/sources/toonzlib/tcolumnfx.cpp +++ b/toonz/sources/toonzlib/tcolumnfx.cpp @@ -65,7 +65,7 @@ extern "C" { // Preliminaries //**************************************************************************************** -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TFxDeclarationT; template class DV_EXPORT_API TFxDeclarationT; template class DV_EXPORT_API TFxDeclarationT; diff --git a/toonz/sources/toonzlib/texturemanager.cpp b/toonz/sources/toonzlib/texturemanager.cpp index fb9f9e3..37ab2f9 100644 --- a/toonz/sources/toonzlib/texturemanager.cpp +++ b/toonz/sources/toonzlib/texturemanager.cpp @@ -17,7 +17,7 @@ TextureManager *TextureManager::instance() return m_instance; } -#ifdef WIN32 +#ifdef _WIN32 TDimensionI TextureManager::getMaxSize(bool isRGBM) { GLenum fmt, type; diff --git a/toonz/sources/toonzlib/tlog.cpp b/toonz/sources/toonzlib/tlog.cpp index 64204d1..4aa6a46 100644 --- a/toonz/sources/toonzlib/tlog.cpp +++ b/toonz/sources/toonzlib/tlog.cpp @@ -6,7 +6,7 @@ #include -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4996) #include #include @@ -35,7 +35,7 @@ enum LEVEL { LEVEL_INFO }; -#ifdef WIN32 +#ifdef _WIN32 WORD Level2WinEventType(LEVEL level) { switch (level) { @@ -73,7 +73,7 @@ int Level2XPriority(LEVEL level) void notify(LEVEL level, const string &msg) { -#ifdef WIN32 +#ifdef _WIN32 TCHAR buf[_MAX_PATH + 1]; GetModuleFileName(0, buf, _MAX_PATH); diff --git a/toonz/sources/toonzlib/toutlinevectorizer.cpp b/toonz/sources/toonzlib/toutlinevectorizer.cpp index 6b391b3..425c04e 100644 --- a/toonz/sources/toonzlib/toutlinevectorizer.cpp +++ b/toonz/sources/toonzlib/toutlinevectorizer.cpp @@ -59,7 +59,7 @@ public: }; //--------------------------------------------------------- -#ifdef WIN32 +#ifdef _WIN32 template class DV_EXPORT_API TSmartPointerT>; #endif typedef TRasterPT DataRasterP; diff --git a/toonz/sources/toonzlib/tstageobject.cpp b/toonz/sources/toonzlib/tstageobject.cpp index 92ba32c..67fb3d7 100644 --- a/toonz/sources/toonzlib/tstageobject.cpp +++ b/toonz/sources/toonzlib/tstageobject.cpp @@ -43,14 +43,14 @@ using namespace std; // il problema si verifica ruotando gli oggetti sul camera stand // -#ifdef WIN32 +#ifdef _WIN32 #pragma optimize("", off) #endif TAffine makeRotation(double ang) { return TRotation(ang); } -#ifdef WIN32 +#ifdef _WIN32 #pragma optimize("", on) #endif diff --git a/toonz/sources/toonzlib/txshsimplelevel.cpp b/toonz/sources/toonzlib/txshsimplelevel.cpp index de6ac66..567097c 100644 --- a/toonz/sources/toonzlib/txshsimplelevel.cpp +++ b/toonz/sources/toonzlib/txshsimplelevel.cpp @@ -1510,7 +1510,7 @@ void TXshSimpleLevel::save(const TFilePath &fp, const TFilePath &oldFp, bool ove // Copy mesh level sl->save(app); -#ifdef WIN32 +#ifdef _WIN32 //hides files oldFilePaths.clear(); @@ -1767,7 +1767,7 @@ void TXshSimpleLevel::saveSimpleLevel(const TFilePath &decodedFp, bool overwrite hookSet = getHookSet(); } -#ifdef WIN32 +#ifdef _WIN32 // Remove the hidden attribute (since TOStream's fopen fails on hidden files) if (getType() == OVL_XSHLEVEL && !m_editableRange.empty()) SetFileAttributesW(hookFile.getWideString().c_str(), FILE_ATTRIBUTE_NORMAL); @@ -1785,7 +1785,7 @@ void TXshSimpleLevel::saveSimpleLevel(const TFilePath &decodedFp, bool overwrite } } -#ifdef WIN32 +#ifdef _WIN32 if (getType() == OVL_XSHLEVEL && !m_editableRange.empty()) TSystem::hideFileOrLevel(hookFile); #endif diff --git a/toonz/sources/toonzqt/flipconsole.cpp b/toonz/sources/toonzqt/flipconsole.cpp index 873a549..b8f163a 100644 --- a/toonz/sources/toonzqt/flipconsole.cpp +++ b/toonz/sources/toonzqt/flipconsole.cpp @@ -1334,7 +1334,7 @@ void FlipConsole::onLoadBox(bool isDefine) Preferences::instance()->getViewValues(shrink, dummy); if (shrink != 1) { -#ifdef WIN32 +#ifdef _WIN32 MessageBox(0, "Cannot use loading box with a shrink factor! ", "Warning", MB_OK); #endif setChecked(eUseLoadBox, false); diff --git a/toonz/sources/toonzqt/functionsheet.cpp b/toonz/sources/toonzqt/functionsheet.cpp index ef49b13..3635b39 100644 --- a/toonz/sources/toonzqt/functionsheet.cpp +++ b/toonz/sources/toonzqt/functionsheet.cpp @@ -664,7 +664,7 @@ void FunctionSheetCellViewer::drawCells(QPainter &painter, int r0, int c0, int r text.append("~"); } -#ifdef WIN32 +#ifdef _WIN32 static QFont font("Arial", 9, QFont::Normal); #else static QFont font("Helvetica", 9, QFont::Normal); @@ -712,7 +712,7 @@ void FunctionSheetCellViewer::mouseDoubleClickEvent(QMouseEvent *e) } else m_lineEdit->setText(""); -#ifdef WIN32 +#ifdef _WIN32 static QFont font("Arial", 9, QFont::Normal); #else static QFont font("Helvetica", 9, QFont::Normal); diff --git a/toonz/sources/toonzqt/imageutils.cpp b/toonz/sources/toonzqt/imageutils.cpp index 2ef497e..67be463 100644 --- a/toonz/sources/toonzqt/imageutils.cpp +++ b/toonz/sources/toonzqt/imageutils.cpp @@ -14,7 +14,7 @@ #include "toonz/tproject.h" #include "toonz/Naa2TlvConverter.h" -#ifdef WIN32 +#ifdef _WIN32 #include "avicodecrestrictions.h" #endif @@ -602,7 +602,7 @@ void convert(const TFilePath &source, const TFilePath &dest, TLevelReaderP lr(source); TLevelP level = lr->loadInfo(); -#ifdef WIN32 +#ifdef _WIN32 if (dstExt == "avi") { TDimension res(0, 0); diff --git a/toonz/sources/toonzqt/keyframenavigator.cpp b/toonz/sources/toonzqt/keyframenavigator.cpp index 1666a22..d8431cd 100644 --- a/toonz/sources/toonzqt/keyframenavigator.cpp +++ b/toonz/sources/toonzqt/keyframenavigator.cpp @@ -19,7 +19,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #pragma warning(disable : 4251) #endif diff --git a/toonz/sources/toonzqt/spreadsheetviewer.cpp b/toonz/sources/toonzqt/spreadsheetviewer.cpp index 7a9a4c1..06bf19e 100644 --- a/toonz/sources/toonzqt/spreadsheetviewer.cpp +++ b/toonz/sources/toonzqt/spreadsheetviewer.cpp @@ -285,7 +285,7 @@ DragTool *RowPanel::createDragTool(QMouseEvent *) void RowPanel::drawRows(QPainter &p, int r0, int r1) { -#ifdef WIN32 +#ifdef _WIN32 static QFont font("Arial", 9, QFont::Bold); #else static QFont font("Helvetica", 9, QFont::Bold);