From: <sil...@li...> - 2003-04-01 09:01:36
|
Update of /cvsroot/silgraphite/silgraphite/src/lib In directory sc8-pr-cvs1:/tmp/cvs-serv1418 Modified Files: Platform.cpp Log Message: rename include files and add stub platform functions for linux Index: Platform.cpp =================================================================== RCS file: /cvsroot/silgraphite/silgraphite/src/lib/Platform.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Platform.cpp 11 Nov 2002 23:58:07 -0000 1.2 +++ Platform.cpp 1 Apr 2003 09:01:28 -0000 1.3 @@ -1,6 +1,7 @@ +#include "GrPlatform.h" + #ifdef _WIN32 #include "windows.h" -#include "platform.h" int Platform_UnicodeToANSI(const wchar_t * prgchwSrc, int cchwSrc, char * prgchsDst, int cchsDst) { @@ -16,4 +17,30 @@ { return ::MulDiv(nNumber, nNumerator, nDenominator); } +#else + +#include <iostream> + +int Platform_UnicodeToANSI(const wchar_t * prgchwSrc, int cchwSrc, char * prgchsDst, int cchsDst) +{ + //return ::WideCharToMultiByte(CP_ACP, 0, prgchwSrc, cchwSrc, prgchsDst, cchsDst, NULL, NULL); + std::cerr << "WideCharToMultiByte" << std::endl; + return 0; +} + +int Platform_AnsiToUnicode(const char * prgchsSrc, int cchsSrc, wchar_t * prgchwDst, int cchwDst) +{ + //return ::MultiByteToWideChar(CP_ACP, 0, prgchsSrc, cchsSrc, prgchwDst, cchwDst); + std::cerr << "AnsiToUnicode" << std::endl; + return 0; +} + +int Platform_MulDiv(int nNumber, int nNumerator, int nDenominator) +{ + //return MulDiv(nNumber, nNumerator, nDenominator); + return (nNumber * nNumerator) / nDenominator; +} + + + #endif |